1error: incompatible lifetime on type 2 --> $DIR/issue-78113-lifetime-mismatch-dyn-trait-box.rs:17:5 3 | 4LL | type T<'a> = Box<dyn A + 'a>; 5 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 6 | 7note: because this has an unmet lifetime requirement 8 --> $DIR/issue-78113-lifetime-mismatch-dyn-trait-box.rs:12:17 9 | 10LL | type T<'a>: A; 11 | ^ introduces a `'static` lifetime requirement 12note: the lifetime `'a` as defined here... 13 --> $DIR/issue-78113-lifetime-mismatch-dyn-trait-box.rs:17:12 14 | 15LL | type T<'a> = Box<dyn A + 'a>; 16 | ^^ 17 = note: ...does not necessarily outlive the static lifetime introduced by the compatible `impl` 18note: this has an implicit `'static` lifetime requirement 19 --> $DIR/issue-78113-lifetime-mismatch-dyn-trait-box.rs:9:20 20 | 21LL | impl A for Box<dyn A> {} 22 | ^ 23help: consider relaxing the implicit `'static` requirement 24 | 25LL | impl A for Box<dyn A + '_> {} 26 | ++++ 27 28error: incompatible lifetime on type 29 --> $DIR/issue-78113-lifetime-mismatch-dyn-trait-box.rs:27:5 30 | 31LL | type T<'a> = Box<dyn A + 'a>; 32 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 33 | 34note: because this has an unmet lifetime requirement 35 --> $DIR/issue-78113-lifetime-mismatch-dyn-trait-box.rs:23:17 36 | 37LL | type T<'a>: C; 38 | ^ introduces a `'static` lifetime requirement 39note: the lifetime `'a` as defined here... 40 --> $DIR/issue-78113-lifetime-mismatch-dyn-trait-box.rs:27:12 41 | 42LL | type T<'a> = Box<dyn A + 'a>; 43 | ^^ 44note: ...does not necessarily outlive the static lifetime introduced by the compatible `impl` 45 --> $DIR/issue-78113-lifetime-mismatch-dyn-trait-box.rs:21:1 46 | 47LL | impl C for Box<dyn A + 'static> {} 48 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 49 50error: incompatible lifetime on type 51 --> $DIR/issue-78113-lifetime-mismatch-dyn-trait-box.rs:37:5 52 | 53LL | type T<'a> = (Box<dyn A + 'a>, Box<dyn A + 'a>); 54 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 55 | 56note: because this has an unmet lifetime requirement 57 --> $DIR/issue-78113-lifetime-mismatch-dyn-trait-box.rs:33:17 58 | 59LL | type T<'a>: E; 60 | ^ introduces a `'static` lifetime requirement 61note: the lifetime `'a` as defined here... 62 --> $DIR/issue-78113-lifetime-mismatch-dyn-trait-box.rs:37:12 63 | 64LL | type T<'a> = (Box<dyn A + 'a>, Box<dyn A + 'a>); 65 | ^^ 66 = note: ...does not necessarily outlive the static lifetime introduced by the compatible `impl` 67note: this has an implicit `'static` lifetime requirement 68 --> $DIR/issue-78113-lifetime-mismatch-dyn-trait-box.rs:31:21 69 | 70LL | impl E for (Box<dyn A>, Box<dyn A>) {} 71 | ^ 72note: this has an implicit `'static` lifetime requirement 73 --> $DIR/issue-78113-lifetime-mismatch-dyn-trait-box.rs:31:33 74 | 75LL | impl E for (Box<dyn A>, Box<dyn A>) {} 76 | ^ 77help: consider relaxing the implicit `'static` requirement 78 | 79LL | impl E for (Box<dyn A + '_>, Box<dyn A>) {} 80 | ++++ 81help: consider relaxing the implicit `'static` requirement 82 | 83LL | impl E for (Box<dyn A>, Box<dyn A + '_>) {} 84 | ++++ 85 86error: aborting due to 3 previous errors 87 88