// Tests that a closure type containing 'b cannot be returned from a type where
// only 'a was expected.
fn move_lifetime_into_fn<'a, 'b>(x: &'a u32, y: &'b u32) -> impl Fn(&'a u32) {
- //~^ ERROR: captures lifetime that does not appear in bounds
move |_| println!("{}", y)
+ //~^ ERROR: captures lifetime that does not appear in bounds
}
fn ty_param_wont_outlive_static<T:Debug>(x: T) -> impl Debug + 'static {
//~^ ERROR the parameter type `T` may not live long enough
+ //~| ERROR the parameter type `T` may not live long enough
x
}