]> git.lizzy.rs Git - rust.git/blob - src/test/ui/nll/issue-42574-diagnostic-in-nested-closure.rs
Auto merge of #105145 - Ayush1325:sequential-remote-server, 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 fn doit(data: &'static mut ()) {
6     || doit(data);
7     //~^ ERROR lifetime may not live long enough
8     //~| ERROR `data` does not live long enough
9 }
10
11 fn main() { }