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

15 lines
590 B
Plaintext

error[E0700]: hidden type for `Opaque2<T>` captures lifetime that does not appear in bounds
--> $DIR/missing_lifetime_bound.rs:5:47
|
LL | type Opaque2<T> = impl Sized;
| ---------- opaque type defined here
LL | type Opaque<'a, T> = Opaque2<T>;
LL | fn defining<'a, T>(x: &'a i32) -> Opaque<T> { x }
| -- ^
| |
| hidden type `&'a i32` captures the lifetime `'a` as defined here
error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0700`.