fork/rust

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

borsAuto merge of #68568 - pietroalbini:stable-next, r=pietroalbini5e1a799842b

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