]> git.lizzy.rs Git - rust.git/blob - src/test/ui/consts/const-eval/union_promotion.stderr
Merge commit 'd0cf3481a84e3aa68c2f185c460e282af36ebc42' into clippyup
[rust.git] / src / test / ui / consts / const-eval / union_promotion.stderr
1 error[E0716]: temporary value dropped while borrowed
2   --> $DIR/union_promotion.rs:10:29
3    |
4 LL |       let x: &'static bool = &unsafe {
5    |  ____________-------------____^
6    | |            |
7    | |            type annotation requires that borrow lasts for `'static`
8 LL | |         Foo { a: &1 }.b == Foo { a: &2 }.b
9 LL | |     };
10    | |_____^ creates a temporary which is freed while still in use
11 LL |   }
12    |   - temporary value is freed at the end of this statement
13
14 error: aborting due to previous error
15
16 For more information about this error, try `rustc --explain E0716`.