2024-01-25 18:17:36 +00:00
|
|
|
error: transmute from a `u32` to a `char`
|
2024-04-04 17:52:55 +00:00
|
|
|
--> tests/ui/transmute_int_to_char.rs:5:28
|
2024-01-25 18:17:36 +00:00
|
|
|
|
|
|
|
|
LL | let _: char = unsafe { std::mem::transmute(0_u32) };
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `std::char::from_u32(0_u32).unwrap()`
|
|
|
|
|
|
|
|
|
= note: `-D clippy::transmute-int-to-char` implied by `-D warnings`
|
|
|
|
= help: to override `-D warnings` add `#[allow(clippy::transmute_int_to_char)]`
|
|
|
|
|
|
|
|
error: transmute from a `i32` to a `char`
|
2024-04-04 17:52:55 +00:00
|
|
|
--> tests/ui/transmute_int_to_char.rs:8:28
|
2024-01-25 18:17:36 +00:00
|
|
|
|
|
|
|
|
LL | let _: char = unsafe { std::mem::transmute(0_i32) };
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `std::char::from_u32(0_i32 as u32).unwrap()`
|
|
|
|
|
|
|
|
error: aborting due to 2 previous errors
|
|
|
|
|