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