summaryrefslogtreecommitdiffstats
path: root/src/test/ui/issues/issue-7246.stderr
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/test/ui/issues/issue-7246.stderr24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/test/ui/issues/issue-7246.stderr b/src/test/ui/issues/issue-7246.stderr
new file mode 100644
index 000000000..a9bf2bf76
--- /dev/null
+++ b/src/test/ui/issues/issue-7246.stderr
@@ -0,0 +1,24 @@
+error: unreachable statement
+ --> $DIR/issue-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/issue-7246.rs:1:9
+ |
+LL | #![deny(unreachable_code)]
+ | ^^^^^^^^^^^^^^^^
+
+warning: dereferencing a null pointer
+ --> $DIR/issue-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 previous error; 1 warning emitted
+