rust/src/test/ui/consts/dangling-alloc-id-ice.stderr
2019-03-23 13:05:30 -07:00

13 lines
378 B
Text

error: any use of this value will cause an error
--> $DIR/dangling-alloc-id-ice.rs:8:1
|
LL | / const FOO: &() = {
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