]> git.lizzy.rs Git - rust.git/blob - src/test/ui/consts/dangling_raw_ptr.rs
7fc773412f2f8e55f87de5331c9090c3cc852514
[rust.git] / src / test / ui / consts / dangling_raw_ptr.rs
1 #![feature(const_let)]
2
3 const FOO: *const u32 = { //~ ERROR any use of this value will cause an error
4     let x = 42;
5     &x
6 };
7
8 fn main() {
9     let x = FOO;
10 }