rust/tests/ui/consts/dangling_raw_ptr.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

9 lines
141 B
Rust
Raw Normal View History

const FOO: *const u32 = { //~ ERROR encountered dangling pointer in final constant
let x = 42;
&x
};
fn main() {
let x = FOO;
}