// Regression test for . fn example(x: T) -> impl FnMut(&mut ()) { move |_: &mut ()| { move || needs_static_lifetime(x); //~^ ERROR the parameter type `T` may not live long enough } } fn needs_static_lifetime(obj: T) {} fn main() {}