summary refs log tree commit diff
path: root/src/test/ui/consts/dangling_raw_ptr.stderr
blob: 0168c08f011d4c49426ce4b38dccf3be86f582dd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
error: any use of this value will cause an error
  --> $DIR/dangling_raw_ptr.rs:1:1
   |
LL | / const FOO: *const u32 = {
LL | |     let x = 42;
LL | |     &x
LL | | };
   | |__^ type validation failed: encountered dangling pointer in final constant
   |
   = note: #[deny(const_err)] on by default

error: aborting due to previous error