1 // As documented in Issue #45983, this test is evaluating the quality
2 // of our diagnostics on erroneous code using higher-ranked closures.
4 fn give_any<F: for<'r> FnOnce(&'r ())>(f: F) {
10 give_any(|y| x = Some(y));
11 //~^ ERROR borrowed data escapes outside of closure