]> git.lizzy.rs Git - rust.git/blob - src/test/ui/nll/issue-42574-diagnostic-in-nested-closure.rs
Rollup merge of #83807 - sjakobi:77548-remove-ignore-annotations, r=Mark-Simulacrum
[rust.git] / src / test / ui / nll / issue-42574-diagnostic-in-nested-closure.rs
1 // This test illustrates a case where full NLL (enabled by the feature
2 // switch below) produces superior diagnostics to the NLL-migrate
3 // mode.
4
5 #![feature(nll)]
6
7 fn doit(data: &'static mut ()) {
8     || doit(data);
9     //~^ ERROR lifetime may not live long enough
10     //~| ERROR `data` does not live long enough
11 }
12
13 fn main() { }