type Lazy = Box T + 'static>; fn test(x: &i32) -> Lazy { Box::new(|| { //~^ ERROR lifetime may not live long enough //~| ERROR closure may outlive the current function *x }) } fn main() {}