summary refs log tree commit diff
path: root/src/test/ui/consts/dangling-alloc-id-ice.stderr
blob: 2cd8711f03d3168ed8e696c4c8b40b6a49a1f3d8 (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-alloc-id-ice.rs:8:1
   |
LL | / const FOO: &() = { //~ ERROR any use of this value will cause an error
LL | |     let y = ();
LL | |     unsafe { Foo { y: &y }.long_live_the_unit }
LL | | };
   | |__^ type validation failed: encountered dangling pointer in final constant
   |
   = note: #[deny(const_err)] on by default

error: aborting due to previous error