fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #66089 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum4560ea788cb

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