fork/rust

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

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

1.43.0
830 B27 linesraw
1error[E0597]: `n` does not live long enough
2  --> $DIR/issue-69114-static-mut-ty.rs:19:15
3   |
4LL |         BAR = &n;
5   |         ------^^
6   |         |     |
7   |         |     borrowed value does not live long enough
8   |         assignment requires that `n` is borrowed for `'static`
9...
10LL | }
11   | - `n` dropped here while still borrowed
12
13error[E0597]: `n` does not live long enough
14  --> $DIR/issue-69114-static-mut-ty.rs:27:22
15   |
16LL |         BAR_ELIDED = &n;
17   |         -------------^^
18   |         |            |
19   |         |            borrowed value does not live long enough
20   |         assignment requires that `n` is borrowed for `'static`
21...
22LL | }
23   | - `n` dropped here while still borrowed
24
25error: aborting due to 2 previous errors
26
27For more information about this error, try `rustc --explain E0597`.