]> git.lizzy.rs Git - rust.git/blob - tests/ui/consts/dangling_raw_ptr.rs
Rollup merge of #106962 - compiler-errors:use-sugg-span, r=oli-obk
[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 }