fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
655 B24 linesraw
1error: unreachable statement
2  --> $DIR/issue-7246.rs:7:5
3   |
4LL |     return;
5   |     ------ any code following this expression is unreachable
6LL |     if *ptr::null() {};
7   |     ^^^^^^^^^^^^^^^^^^^ unreachable statement
8   |
9note: the lint level is defined here
10  --> $DIR/issue-7246.rs:1:9
11   |
12LL | #![deny(unreachable_code)]
13   |         ^^^^^^^^^^^^^^^^
14
15warning: dereferencing a null pointer
16  --> $DIR/issue-7246.rs:7:8
17   |
18LL |     if *ptr::null() {};
19   |        ^^^^^^^^^^^^ this code causes undefined behavior when executed
20   |
21   = note: `#[warn(deref_nullptr)]` on by default
22
23error: aborting due to previous error; 1 warning emitted
24