fork/rust

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

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

master
905 B30 linesraw
1error[E0597]: `x` does not live long enough
2  --> $DIR/send-is-not-static-ensures-scoping.rs:16:17
3   |
4LL |     let bad = {
5   |         --- borrow later stored here
6LL |         let x = 1;
7   |             - binding `x` declared here
8LL |         let y = &x;
9   |                 ^^ borrowed value does not live long enough
10...
11LL |     };
12   |     - `x` dropped here while still borrowed
13
14error[E0597]: `y` does not live long enough
15  --> $DIR/send-is-not-static-ensures-scoping.rs:20:22
16   |
17LL |     let bad = {
18   |         --- borrow later stored here
19...
20LL |         scoped(|| {
21   |                -- value captured here
22LL |             let _z = y;
23   |                      ^ borrowed value does not live long enough
24...
25LL |     };
26   |     - `y` dropped here while still borrowed
27
28error: aborting due to 2 previous errors
29
30For more information about this error, try `rustc --explain E0597`.