1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
|
error[E0207]: the type parameter `U` is not constrained by the impl trait, self type, or predicates
--> $DIR/issue-87735.rs:25:13
|
LL | impl<'b, T, U> AsRef2 for Foo<T>
| ^ unconstrained type parameter
error[E0309]: the parameter type `U` may not live long enough
--> $DIR/issue-87735.rs:34:21
|
LL | type Output<'a> = FooRef<'a, U> where Self: 'a;
| -- ^^^^^^^^^^^^^ ...so that the type `U` will meet its required lifetime bounds...
| |
| the parameter type `U` must be valid for the lifetime `'a` as defined here...
|
note: ...that is required by this bound
--> $DIR/issue-87735.rs:23:22
|
LL | struct FooRef<'a, U>(&'a [U]);
| ^^^^^^^
help: consider adding an explicit lifetime bound
|
LL | type Output<'a> = FooRef<'a, U> where Self: 'a, U: 'a;
| +++++++
error: aborting due to 2 previous errors
Some errors have detailed explanations: E0207, E0309.
For more information about an error, try `rustc --explain E0207`.
|