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(u16) -> _`
8 | expected signature of `fn(<u32 as T<'x>>::V) -> _`
10 = note: required for the cast to the object type `dyn for<'x> Fn(<u32 as T<'x>>::V)`
12 error[E0277]: the size for values of type `<u32 as T<'_>>::V` cannot be known at compilation time
13 --> $DIR/issue-41366.rs:10:8
15 LL | (&|_| ()) as &dyn for<'x> Fn(<u32 as T<'x>>::V);
16 | ^ doesn't have a size known at compile-time
18 = help: the trait `Sized` is not implemented for `<u32 as T<'_>>::V`
19 = help: unsized fn params are gated as an unstable feature
20 help: consider further restricting the associated type
22 LL | fn main() where <u32 as T<'_>>::V: Sized {
23 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
24 help: function arguments must have a statically known size, borrowed types always have a known size
26 LL | (&|&_| ()) as &dyn for<'x> Fn(<u32 as T<'x>>::V);
29 error: aborting due to 2 previous errors
31 Some errors have detailed explanations: E0277, E0631.
32 For more information about an error, try `rustc --explain E0277`.