error: implementation of `FnOnce` is not general enough --> $DIR/issue-57611-trait-alias.rs:20:16 | LL | type Bar = impl Baz; | ^^^^^^^^^^^^^^^^^^^^ implementation of `FnOnce` is not general enough | = note: closure with signature `fn(&'2 X) -> &X` must implement `FnOnce<(&'1 X,)>`, for any lifetime `'1`... = note: ...but it actually implements `FnOnce<(&'2 X,)>`, for some specific lifetime `'2` error[E0308]: mismatched types --> $DIR/issue-57611-trait-alias.rs:20:16 | LL | type Bar = impl Baz; | ^^^^^^^^^^^^^^^^^^^^ one type is more general than the other | = note: expected type `for<'r> Fn<(&'r X,)>` found type `Fn<(&' X,)>` note: this closure does not fulfill the lifetime requirements --> $DIR/issue-57611-trait-alias.rs:28:9 | LL | |x| x | ^^^^^ error: implementation of `FnOnce` is not general enough --> $DIR/issue-57611-trait-alias.rs:20:16 | LL | type Bar = impl Baz; | ^^^^^^^^^^^^^^^^^^^^ implementation of `FnOnce` is not general enough | = note: closure with signature `fn(&'2 X) -> &'2 X` must implement `FnOnce<(&'1 X,)>`, for any lifetime `'1`... = note: ...but it actually implements `FnOnce<(&'2 X,)>`, for some specific lifetime `'2` error[E0308]: mismatched types --> $DIR/issue-57611-trait-alias.rs:20:16 | LL | type Bar = impl Baz; | ^^^^^^^^^^^^^^^^^^^^ one type is more general than the other | = note: expected type `for<'r> Fn<(&'r X,)>` found type `Fn<(&' X,)>` note: this closure does not fulfill the lifetime requirements --> $DIR/issue-57611-trait-alias.rs:28:9 | LL | |x| x | ^^^^^ error: implementation of `FnOnce` is not general enough --> $DIR/issue-57611-trait-alias.rs:20:16 | LL | type Bar = impl Baz; | ^^^^^^^^^^^^^^^^^^^^ implementation of `FnOnce` is not general enough | = note: closure with signature `fn(&'2 X) -> &'2 X` must implement `FnOnce<(&'1 X,)>`, for any lifetime `'1`... = note: ...but it actually implements `FnOnce<(&'2 X,)>`, for some specific lifetime `'2` error: aborting due to 5 previous errors For more information about this error, try `rustc --explain E0308`.