error: item constrains opaque type that is not in its signature --> $DIR/higher_kinded_params3.rs:26:13 | LL | f = g; | ^ | = note: this item must mention the opaque type in its signature in order to be able to register hidden types note: this item must mention the opaque type in its signature in order to be able to register hidden types --> $DIR/higher_kinded_params3.rs:25:8 | LL | fn successors(&self, mut f: for<'x> fn(&'x ()) -> <&'x A as B>::C) -> Successors<'_> { | ^^^^^^^^^^ error[E0308]: mismatched types --> $DIR/higher_kinded_params3.rs:26:9 | LL | type Tait<'a> = impl std::fmt::Debug + 'a; | ------------------------- the expected opaque type ... LL | f = g; | ^^^^^ one type is more general than the other | = note: expected fn pointer `for<'x> fn(&'x ()) -> Tait<'x>` found fn pointer `for<'a> fn(&'a ()) -> &'a ()` error: aborting due to 2 previous errors For more information about this error, try `rustc --explain E0308`.