]> git.lizzy.rs Git - rust.git/blob - tests/ui/consts/const-eval/union_promotion.stderr
Rollup merge of #107146 - compiler-errors:unsizing-params, r=cjgillot
[rust.git] / tests / ui / consts / const-eval / union_promotion.stderr
1 error[E0716]: temporary value dropped while borrowed
2   --> $DIR/union_promotion.rs:8: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 value 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`.