]> git.lizzy.rs Git - rust.git/blob - src/test/ui/span/send-is-not-static-ensures-scoping.stderr
Add 'src/tools/rust-analyzer/' from commit '977e12a0bdc3e329af179ef3a9d466af9eb613bb'
[rust.git] / src / test / ui / span / send-is-not-static-ensures-scoping.stderr
1 error[E0597]: `x` does not live long enough
2   --> $DIR/send-is-not-static-ensures-scoping.rs:16:17
3    |
4 LL |     let bad = {
5    |         --- borrow later stored here
6 LL |         let x = 1;
7 LL |         let y = &x;
8    |                 ^^ borrowed value does not live long enough
9 ...
10 LL |     };
11    |     - `x` dropped here while still borrowed
12
13 error[E0597]: `y` does not live long enough
14   --> $DIR/send-is-not-static-ensures-scoping.rs:20:22
15    |
16 LL |     let bad = {
17    |         --- borrow later stored here
18 ...
19 LL |         scoped(|| {
20    |                -- value captured here
21 LL |             let _z = y;
22    |                      ^ borrowed value does not live long enough
23 ...
24 LL |     };
25    |     - `y` dropped here while still borrowed
26
27 error: aborting due to 2 previous errors
28
29 For more information about this error, try `rustc --explain E0597`.