1 error[E0495]: cannot infer an appropriate lifetime for lifetime parameter `'a` due to conflicting requirements
2 --> $DIR/async-associated-types.rs:19:43
4 LL | async fn foo(&'a self, key: &'b T) -> (&'a U, &'b T) {
7 note: first, the lifetime cannot outlive the lifetime `'a` as defined here...
8 --> $DIR/async-associated-types.rs:16:6
10 LL | impl<'a, 'b, T: Debug + Sized + 'b, U: 'a> MyTrait<'a, 'b, T> for U {
12 note: ...so that the types are compatible
13 --> $DIR/async-associated-types.rs:19:43
15 LL | async fn foo(&'a self, key: &'b T) -> (&'a U, &'b T) {
17 = note: expected `(&'a U, &'b T)`
19 = note: but, the lifetime must be valid for the static lifetime...
20 note: ...so that the types are compatible
21 --> $DIR/async-associated-types.rs:19:43
23 LL | async fn foo(&'a self, key: &'b T) -> (&'a U, &'b T) {
25 = note: expected `MyTrait<'static, 'static, T>`
26 found `MyTrait<'_, '_, T>`
28 error[E0495]: cannot infer an appropriate lifetime for lifetime parameter `'b` due to conflicting requirements
29 --> $DIR/async-associated-types.rs:19:43
31 LL | async fn foo(&'a self, key: &'b T) -> (&'a U, &'b T) {
34 note: first, the lifetime cannot outlive the lifetime `'b` as defined here...
35 --> $DIR/async-associated-types.rs:16:10
37 LL | impl<'a, 'b, T: Debug + Sized + 'b, U: 'a> MyTrait<'a, 'b, T> for U {
39 note: ...so that the types are compatible
40 --> $DIR/async-associated-types.rs:19:43
42 LL | async fn foo(&'a self, key: &'b T) -> (&'a U, &'b T) {
44 = note: expected `(&'a U, &'b T)`
46 = note: but, the lifetime must be valid for the static lifetime...
47 note: ...so that the types are compatible
48 --> $DIR/async-associated-types.rs:19:43
50 LL | async fn foo(&'a self, key: &'b T) -> (&'a U, &'b T) {
52 = note: expected `MyTrait<'static, 'static, T>`
53 found `MyTrait<'_, '_, T>`
55 error: aborting due to 2 previous errors
57 For more information about this error, try `rustc --explain E0495`.