summaryrefslogtreecommitdiffstats
path: root/tests/ui/type-alias-impl-trait/missing_lifetime_bound.stderr
blob: 6bcae6e531648705c01a88dd1d39eb12bbe5d8cd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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 previous error

For more information about this error, try `rustc --explain E0700`.