fork/rust
git clone https://git.julia.blue/fork/rust
73528e339aa
1.40.0
1error: lifetime may not live long enough 2 --> $DIR/issue-42574-diagnostic-in-nested-closure.rs:8:8 3 | 4LL | || 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 11error[E0597]: `data` does not live long enough 12 --> $DIR/issue-42574-diagnostic-in-nested-closure.rs:8:13 13 | 14LL | || 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... 21LL | } 22 | - `data` dropped here while still borrowed 23 24error: aborting due to 2 previous errors 25 26For more information about this error, try `rustc --explain E0597`.