2021-03-12 14:30:50 +00:00
|
|
|
error: transmuting a known null pointer into a reference
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/transmuting_null.rs:10:23
|
2019-03-26 14:12:14 +00:00
|
|
|
|
|
|
|
|
LL | let _: &u64 = std::mem::transmute(0 as *const u64);
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= note: `-D clippy::transmuting-null` implied by `-D warnings`
|
2023-08-01 12:02:21 +00:00
|
|
|
= help: to override `-D warnings` add `#[allow(clippy::transmuting_null)]`
|
2019-03-26 14:12:14 +00:00
|
|
|
|
2021-03-12 14:30:50 +00:00
|
|
|
error: transmuting a known null pointer into a reference
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/transmuting_null.rs:13:23
|
2019-03-26 14:12:14 +00:00
|
|
|
|
|
|
|
|
LL | let _: &u64 = std::mem::transmute(std::ptr::null::<u64>());
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
2021-03-12 14:30:50 +00:00
|
|
|
error: transmuting a known null pointer into a reference
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/transmuting_null.rs:24:23
|
2019-03-26 14:12:14 +00:00
|
|
|
|
|
|
|
|
LL | let _: &u64 = std::mem::transmute(ZPTR);
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: aborting due to 3 previous errors
|
|
|
|
|