rust/src/test/ui/consts/dangling_raw_ptr.rs
2018-11-30 09:44:15 +01:00

10 lines
160 B
Rust

#![feature(const_let)]
const FOO: *const u32 = { //~ ERROR any use of this value will cause an error
let x = 42;
&x
};
fn main() {
let x = FOO;
}