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

16 lines
487 B
Plaintext

error[E0308]: mismatched types
--> $DIR/hkl_forbidden3.rs:10:5
|
LL | type Opaque<'a> = impl Sized + 'a;
| --------------- the expected opaque type
...
LL | foo
| ^^^ one type is more general than the other
|
= note: expected fn pointer `for<'a> fn(&'a ()) -> Opaque<'a>`
found fn pointer `for<'a> fn(&'a ()) -> &'a ()`
error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.