]> git.proxmox.com Git - rustc.git/blame - src/test/ui/consts/raw-ptr-const.rs
New upstream version 1.64.0+dfsg1
[rustc.git] / src / test / ui / consts / raw-ptr-const.rs
CommitLineData
f9f354fc
XL
1#![allow(const_err)] // make sure we hit the `delay_span_bug`
2
3// This is a regression test for a `delay_span_bug` during interning when a constant
4// evaluates to a (non-dangling) raw pointer. For now this errors; potentially it
5// could also be allowed.
6
7const CONST_RAW: *const Vec<i32> = &Vec::new() as *const _;
8//~^ ERROR untyped pointers are not allowed in constant
9
10fn main() {}