about summary refs log tree commit diff
path: root/tests/ui/unreachable-code/unreachable-bool-read-7246.stderr
blob: 6072160cb5f130f0356972c1f07ef6fe8f2c968f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
error: unreachable statement
  --> $DIR/unreachable-bool-read-7246.rs:7:5
   |
LL |     return;
   |     ------ any code following this expression is unreachable
LL |     if *ptr::null() {};
   |     ^^^^^^^^^^^^^^^^^^^ unreachable statement
   |
note: the lint level is defined here
  --> $DIR/unreachable-bool-read-7246.rs:1:9
   |
LL | #![deny(unreachable_code)]
   |         ^^^^^^^^^^^^^^^^

warning: dereferencing a null pointer
  --> $DIR/unreachable-bool-read-7246.rs:7:8
   |
LL |     if *ptr::null() {};
   |        ^^^^^^^^^^^^ this code causes undefined behavior when executed
   |
   = note: `#[warn(deref_nullptr)]` on by default

error: aborting due to 1 previous error; 1 warning emitted