summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui/transmuting_null.stderr
blob: 402de38fe9e2fdc9d6aff5f5ac9d93b197a9a81b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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`
   = help: to override `-D warnings` add `#[allow(clippy::transmuting_null)]`

error: transmuting a known null pointer into a reference
  --> $DIR/transmuting_null.rs:13:23
   |
LL |         let _: &u64 = std::mem::transmute(std::ptr::null::<u64>());
   |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: transmuting a known null pointer into a reference
  --> $DIR/transmuting_null.rs:24:23
   |
LL |         let _: &u64 = std::mem::transmute(ZPTR);
   |                       ^^^^^^^^^^^^^^^^^^^^^^^^^

error: aborting due to 3 previous errors