rust/tests/ui/issues/issue-10291.rs
2023-01-11 09:32:08 +00:00

9 lines
190 B
Rust

fn test<'x>(x: &'x isize) {
drop::<Box<dyn for<'z> FnMut(&'z isize) -> &'z isize>>(Box::new(|z| {
x
//~^ ERROR lifetime may not live long enough
}));
}
fn main() {}