blob: 42dc6c2cafad8ecd7885210aa0c8bb2ac93d5921 (
plain)
1
2
3
4
5
6
7
8
9
10
|
//! Regression test for https://github.com/rust-lang/rust/issues/10291
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() {}
|