summaryrefslogtreecommitdiffstats
path: root/tests/ui/issues/issue-10291.rs
blob: 31b9e1240461eafe32719de2908edc99888fcf11 (plain)
1
2
3
4
5
6
7
8
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() {}