]> git.proxmox.com Git - rustc.git/blob - tests/ui/nll/issue-42574-diagnostic-in-nested-closure.stderr
New upstream version 1.68.2+dfsg1
[rustc.git] / tests / ui / nll / issue-42574-diagnostic-in-nested-closure.stderr
1 error: lifetime may not live long enough
2 --> $DIR/issue-42574-diagnostic-in-nested-closure.rs:6:8
3 |
4 LL | || doit(data);
5 | -- ^^^^^^^^^^ argument requires that `'1` must outlive `'static`
6 | |
7 | lifetime `'1` represents this closure's body
8 |
9 = note: closure implements `FnMut`, so references to captured variables can't escape the closure
10
11 error[E0597]: `data` does not live long enough
12 --> $DIR/issue-42574-diagnostic-in-nested-closure.rs:6:13
13 |
14 LL | || doit(data);
15 | -- -----^^^^-
16 | | | |
17 | | | borrowed value does not live long enough
18 | | argument requires that `data` is borrowed for `'static`
19 | value captured here
20 ...
21 LL | }
22 | - `data` dropped here while still borrowed
23
24 error: aborting due to 2 previous errors
25
26 For more information about this error, try `rustc --explain E0597`.