about summary refs log tree commit diff
path: root/src/test/ui/const-suggest-feature.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/const-suggest-feature.rs')
-rw-r--r--src/test/ui/const-suggest-feature.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/test/ui/const-suggest-feature.rs b/src/test/ui/const-suggest-feature.rs
new file mode 100644
index 00000000000..89fafbbe6f0
--- /dev/null
+++ b/src/test/ui/const-suggest-feature.rs
@@ -0,0 +1,9 @@
+const WRITE: () = unsafe {
+    *std::ptr::null_mut() = 0;
+    //~^ ERROR dereferencing raw pointers in constants is unstable
+    //~| HELP add `#![feature(const_raw_ptr_deref)]` to the crate attributes to enable
+    //~| ERROR constant contains unimplemented expression type
+    //~| HELP add `#![feature(const_mut_refs)]` to the crate attributes to enable
+};
+
+fn main() {}