summaryrefslogtreecommitdiffstats
path: root/tests/ui/consts/raw-ptr-const.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/consts/raw-ptr-const.rs')
-rw-r--r--tests/ui/consts/raw-ptr-const.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/ui/consts/raw-ptr-const.rs b/tests/ui/consts/raw-ptr-const.rs
new file mode 100644
index 000000000..b9c542d03
--- /dev/null
+++ b/tests/ui/consts/raw-ptr-const.rs
@@ -0,0 +1,8 @@
+// This is a regression test for a `delay_span_bug` during interning when a constant
+// evaluates to a (non-dangling) raw pointer. For now this errors; potentially it
+// could also be allowed.
+
+const CONST_RAW: *const Vec<i32> = &Vec::new() as *const _;
+//~^ ERROR untyped pointers are not allowed in constant
+
+fn main() {}