rust/tests/ui/consts/raw-ptr-const.rs
Nicholas Nethercote 5d1d384443 Rename HandlerInner::delay_span_bug as HandlerInner::span_delayed_bug.
Because the corresponding `Level` is `DelayedBug` and `span_delayed_bug`
follows the pattern used everywhere else: `span_err`, `span_warning`,
etc.
2023-12-02 09:01:19 +11:00

9 lines
322 B
Rust

// 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() {}