summaryrefslogtreecommitdiffstats
path: root/tests/ui/consts/const-deref-ptr.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/consts/const-deref-ptr.stderr')
-rw-r--r--tests/ui/consts/const-deref-ptr.stderr9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/ui/consts/const-deref-ptr.stderr b/tests/ui/consts/const-deref-ptr.stderr
new file mode 100644
index 000000000..22cb6451e
--- /dev/null
+++ b/tests/ui/consts/const-deref-ptr.stderr
@@ -0,0 +1,9 @@
+error[E0080]: could not evaluate static initializer
+ --> $DIR/const-deref-ptr.rs:4:29
+ |
+LL | static C: u64 = unsafe {*(0xdeadbeef as *const u64)};
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ dereferencing pointer failed: 0xdeadbeef[noalloc] is a dangling pointer (it has no provenance)
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0080`.