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

21 lines
790 B
Plaintext

error[E0308]: mismatched types
--> $DIR/higher_kinded_params3.rs:26:13
|
LL | type Tait<'a> = impl std::fmt::Debug + 'a;
| ------------------------- the expected opaque type
...
LL | f = g;
| ^ expected fn pointer, found fn item
|
= note: expected fn pointer `for<'x> fn(&'x ()) -> Tait<'x>`
found fn item `for<'a> fn(&'a ()) -> &'a () {g}`
note: this item must have 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: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.