rust/src/test/ui/consts/const-eval/union_promotion.stderr

17 lines
576 B
Plaintext
Raw Normal View History

2018-06-03 12:00:22 -05:00
error[E0597]: borrowed value does not live long enough
2018-12-25 09:56:47 -06:00
--> $DIR/union_promotion.rs:9:29
2018-06-03 12:00:22 -05:00
|
LL | let x: &'static bool = &unsafe { //~ borrowed value does not live long enough
| _____________________________^
LL | | Foo { a: &1 }.b == Foo { a: &2 }.b
LL | | };
| |_____^ temporary value does not live long enough
LL | }
| - temporary value only lives until here
|
= note: borrowed value must be valid for the static lifetime...
error: aborting due to previous error
For more information about this error, try `rustc --explain E0597`.