summary refs log tree commit diff
path: root/src/test/ui/consts/dangling_raw_ptr.rs
blob: 7fc773412f2f8e55f87de5331c9090c3cc852514 (plain)
1
2
3
4
5
6
7
8
9
10
#![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;
}