mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 00:03:43 +00:00
23 lines
797 B
Plaintext
23 lines
797 B
Plaintext
|
error: transmuting a known null pointer into a reference.
|
||
|
--> $DIR/transmuting_null.rs:10:23
|
||
|
|
|
||
|
LL | let _: &u64 = std::mem::transmute(0 as *const u64);
|
||
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||
|
|
|
||
|
= note: `-D clippy::transmuting-null` implied by `-D warnings`
|
||
|
|
||
|
error: transmuting a known null pointer into a reference.
|
||
|
--> $DIR/transmuting_null.rs:11:23
|
||
|
|
|
||
|
LL | let _: &u64 = std::mem::transmute(std::ptr::null::<u64>());
|
||
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||
|
|
||
|
error: transmuting a known null pointer into a reference.
|
||
|
--> $DIR/transmuting_null.rs:21:23
|
||
|
|
|
||
|
LL | let _: &u64 = std::mem::transmute(ZPTR);
|
||
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||
|
|
||
|
error: aborting due to 3 previous errors
|
||
|
|