1 error[E0631]: type mismatch in closure arguments
2 --> $DIR/issue-41366.rs:10:5
4 LL | (&|_|()) as &dyn for<'x> Fn(<u32 as T<'x>>::V);
7 | | found signature of `fn(_) -> _`
8 | expected signature of `for<'x> fn(<u32 as T<'x>>::V) -> _`
10 = note: required for the cast to the object type `dyn for<'x> std::ops::Fn(<u32 as T<'x>>::V)`
12 error[E0271]: type mismatch resolving `for<'x> <[closure@$DIR/issue-41366.rs:10:7: 10:12] as std::ops::FnOnce<(<u32 as T<'x>>::V,)>>::Output == ()`
13 --> $DIR/issue-41366.rs:10:5
15 LL | (&|_|()) as &dyn for<'x> Fn(<u32 as T<'x>>::V);
16 | ^^^^^^^^ expected bound lifetime parameter 'x, found concrete lifetime
18 = note: required for the cast to the object type `dyn for<'x> std::ops::Fn(<u32 as T<'x>>::V)`
20 error: aborting due to 2 previous errors
22 Some errors have detailed explanations: E0271, E0631.
23 For more information about an error, try `rustc --explain E0271`.