fork/rust

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

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

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