1 // Test for diagnostics when we have mismatched lifetime due to implicit 'static lifetime in GATs
7 impl A for Box<dyn A> {}
14 // `'a` doesn't match implicit `'static`: suggest `'_`
15 type T<'a> = Box<dyn A + 'a>; //~ incompatible lifetime on type
19 impl C for Box<dyn A + 'static> {}
24 // `'a` doesn't match explicit `'static`: we *should* suggest removing `'static`
25 type T<'a> = Box<dyn A + 'a>; //~ incompatible lifetime on type
29 impl E for (Box<dyn A>, Box<dyn A>) {}
34 // `'a` doesn't match explicit `'static`: suggest `'_`
35 type T<'a> = (Box<dyn A + 'a>, Box<dyn A + 'a>); //~ incompatible lifetime on type