rust/tests/ui/type-alias-impl-trait/higher_kinded_params2.stderr

21 lines
768 B
Plaintext

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