fork/rust

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

borsAuto merge of #71365 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum4fb7144ed15

1.43.0
1.2 KiB35 linesraw
1error[E0716]: temporary value dropped while borrowed
2  --> $DIR/interior-mutability.rs:44:26
3   |
4LL |     let x: &'static _ = &X;
5   |            ----------    ^ creates a temporary which is freed while still in use
6   |            |
7   |            type annotation requires that borrow lasts for `'static`
8...
9LL | }
10   | - temporary value is freed at the end of this statement
11
12error[E0716]: temporary value dropped while borrowed
13  --> $DIR/interior-mutability.rs:45:26
14   |
15LL |     let y: &'static _ = &Y;
16   |            ----------    ^ creates a temporary which is freed while still in use
17   |            |
18   |            type annotation requires that borrow lasts for `'static`
19LL |     let z: &'static _ = &Z;
20LL | }
21   | - temporary value is freed at the end of this statement
22
23error[E0716]: temporary value dropped while borrowed
24  --> $DIR/interior-mutability.rs:46:26
25   |
26LL |     let z: &'static _ = &Z;
27   |            ----------    ^ creates a temporary which is freed while still in use
28   |            |
29   |            type annotation requires that borrow lasts for `'static`
30LL | }
31   | - temporary value is freed at the end of this statement
32
33error: aborting due to 3 previous errors
34
35For more information about this error, try `rustc --explain E0716`.