]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-46471-1.stderr
Auto merge of #53085 - ljedrz:cleanup_syntax_structures, r=ljedrz
[rust.git] / src / test / ui / issues / issue-46471-1.stderr
1 error[E0597]: `z` does not live long enough (Ast)
2   --> $DIR/issue-46471-1.rs:16:14
3    |
4 LL |         &mut z
5    |              ^ borrowed value does not live long enough
6 LL |     };
7    |     - `z` dropped here while still borrowed
8 ...
9 LL | }
10    | - borrowed value needs to live until here
11
12 error[E0597]: `z` does not live long enough (Mir)
13   --> $DIR/issue-46471-1.rs:16:9
14    |
15 LL |       let y = {
16    |  _____________-
17 LL | |         let mut z = 0;
18 LL | |         &mut z
19    | |         ^^^^^^ borrowed value does not live long enough
20 LL | |     };
21    | |     -
22    | |     |
23    | |_____`z` dropped here while still borrowed
24    |       borrow later used here
25
26 error: aborting due to 2 previous errors
27
28 For more information about this error, try `rustc --explain E0597`.