2020-01-20 02:16:50 +00:00
|
|
|
error: transmute from a pointer to a pointer
|
2022-01-13 12:18:19 +00:00
|
|
|
--> $DIR/transmute_ptr_to_ptr.rs:30:29
|
2020-01-20 02:16:50 +00:00
|
|
|
|
|
|
|
|
LL | let _: *const f32 = std::mem::transmute(ptr);
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `ptr as *const f32`
|
|
|
|
|
|
|
|
|
= note: `-D clippy::transmute-ptr-to-ptr` implied by `-D warnings`
|
2023-08-01 12:02:21 +00:00
|
|
|
= help: to override `-D warnings` add `#[allow(clippy::transmute_ptr_to_ptr)]`
|
2020-01-20 02:16:50 +00:00
|
|
|
|
|
|
|
error: transmute from a pointer to a pointer
|
2023-08-24 19:32:12 +00:00
|
|
|
--> $DIR/transmute_ptr_to_ptr.rs:33:27
|
2020-01-20 02:16:50 +00:00
|
|
|
|
|
|
|
|
LL | let _: *mut f32 = std::mem::transmute(mut_ptr);
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `mut_ptr as *mut f32`
|
|
|
|
|
|
|
|
error: transmute from a reference to a reference
|
2023-08-24 19:32:12 +00:00
|
|
|
--> $DIR/transmute_ptr_to_ptr.rs:36:23
|
2020-01-20 02:16:50 +00:00
|
|
|
|
|
|
|
|
LL | let _: &f32 = std::mem::transmute(&1u32);
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&*(&1u32 as *const u32 as *const f32)`
|
|
|
|
|
|
|
|
error: transmute from a reference to a reference
|
2023-08-24 19:32:12 +00:00
|
|
|
--> $DIR/transmute_ptr_to_ptr.rs:38:23
|
2020-01-20 02:16:50 +00:00
|
|
|
|
|
2023-12-17 16:28:24 +00:00
|
|
|
LL | let _: &f32 = std::mem::transmute(&1f64);
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&*(&1f64 as *const f64 as *const f32)`
|
2020-01-20 02:16:50 +00:00
|
|
|
|
|
|
|
error: transmute from a reference to a reference
|
2023-08-24 19:32:12 +00:00
|
|
|
--> $DIR/transmute_ptr_to_ptr.rs:42:27
|
2020-01-20 02:16:50 +00:00
|
|
|
|
|
|
|
|
LL | let _: &mut f32 = std::mem::transmute(&mut 1u32);
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&mut *(&mut 1u32 as *mut u32 as *mut f32)`
|
|
|
|
|
|
|
|
error: transmute from a reference to a reference
|
2023-08-24 19:32:12 +00:00
|
|
|
--> $DIR/transmute_ptr_to_ptr.rs:44:37
|
2020-01-20 02:16:50 +00:00
|
|
|
|
|
|
|
|
LL | let _: &GenericParam<f32> = std::mem::transmute(&GenericParam { t: 1u32 });
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&*(&GenericParam { t: 1u32 } as *const GenericParam<u32> as *const GenericParam<f32>)`
|
|
|
|
|
2023-12-01 17:21:58 +00:00
|
|
|
error: transmute from a reference to a reference
|
2023-12-17 16:28:24 +00:00
|
|
|
--> $DIR/transmute_ptr_to_ptr.rs:47:36
|
2023-12-01 17:21:58 +00:00
|
|
|
|
|
2023-12-17 16:28:24 +00:00
|
|
|
LL | let u8_ref: &u8 = unsafe { std::mem::transmute(u64_ref) };
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&*(u64_ref as *const u64 as *const u8)`
|
2023-12-01 17:21:58 +00:00
|
|
|
|
|
|
|
error: aborting due to 7 previous errors
|
2020-01-20 02:16:50 +00:00
|
|
|
|