// Check that we validate associated type bounds for trait objects when they // have bound lifetimes trait X<'a> { type F: FnOnce(&i32) -> &'a i32; } fn f X<'r> + ?Sized>() { None::.map(|f| f(&0)); } fn main() { f:: X<'x, F = i32>>(); //~^ expected a `FnOnce<(&i32,)>` closure, found `i32` }