summary refs log tree commit diff
path: root/tests/ui/consts/raw-ptr-const.rs
blob: 541c5fd1ab1340e59322b202ea167cb8ffadfc9f (plain)
1
2
3
4
5
6
7
8
// This is a regression test for a `span_delayed_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 unsupported untyped pointer in constant

fn main() {}