]> git.lizzy.rs Git - rust.git/blob - tests/ui/consts/dangling_raw_ptr.rs
Auto merge of #105102 - compiler-errors:copy-impl-considering-regions, r=lcnr
[rust.git] / tests / ui / consts / dangling_raw_ptr.rs
1 const FOO: *const u32 = { //~ ERROR encountered dangling pointer in final constant
2     let x = 42;
3     &x
4 };
5
6 fn main() {
7     let x = FOO;
8 }