mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-12-23 19:43:20 +00:00
39 lines
1.4 KiB
Text
39 lines
1.4 KiB
Text
error[E0512]: cannot transmute between types of different sizes, or dependently-sized types
|
|
--> $DIR/transmute_32bit.rs:6:31
|
|
|
|
|
LL | let _: *const usize = std::mem::transmute(6.0f32);
|
|
| ^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
= note: source type: `f32` (32 bits)
|
|
= note: target type: `*const usize` (64 bits)
|
|
|
|
error[E0512]: cannot transmute between types of different sizes, or dependently-sized types
|
|
--> $DIR/transmute_32bit.rs:8:29
|
|
|
|
|
LL | let _: *mut usize = std::mem::transmute(6.0f32);
|
|
| ^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
= note: source type: `f32` (32 bits)
|
|
= note: target type: `*mut usize` (64 bits)
|
|
|
|
error[E0512]: cannot transmute between types of different sizes, or dependently-sized types
|
|
--> $DIR/transmute_32bit.rs:10:31
|
|
|
|
|
LL | let _: *const usize = std::mem::transmute('x');
|
|
| ^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
= note: source type: `char` (32 bits)
|
|
= note: target type: `*const usize` (64 bits)
|
|
|
|
error[E0512]: cannot transmute between types of different sizes, or dependently-sized types
|
|
--> $DIR/transmute_32bit.rs:12:29
|
|
|
|
|
LL | let _: *mut usize = std::mem::transmute('x');
|
|
| ^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
= note: source type: `char` (32 bits)
|
|
= note: target type: `*mut usize` (64 bits)
|
|
|
|
error: aborting due to 4 previous errors
|
|
|
|
For more information about this error, try `rustc --explain E0512`.
|