about summary refs log tree commit diff
path: root/tests/ui/consts/raw-ptr-temp-const.rs
blob: deb51cd505c7a95161c01c690bfd57169f3211fd (plain)
1
2
3
4
5
6
// A variant of raw-ptr-const that directly constructs a raw pointer.

const CONST_RAW: *const Vec<i32> = std::ptr::addr_of!(Vec::new());
//~^ ERROR cannot take address of a temporary

fn main() {}