]>
git.proxmox.com Git - rustc.git/blob - src/test/ui/generic-associated-types/issue-78113-lifetime-mismatch-dyn-trait-box.rs
1 // Test for diagnostics when we have mismatched lifetime due to implict 'static lifetime in GATs
5 #![feature(generic_associated_types)]
9 impl A
for Box
<dyn A
> {}
16 // `'a` doesn't match implicit `'static`: suggest `'_`
17 type T
<'a
> = Box
<dyn A
+ 'a
>; //~ incompatible lifetime on type
21 impl C
for Box
<dyn A
+ '
static> {}
26 // `'a` doesn't match explicit `'static`: we *should* suggest removing `'static`
27 type T
<'a
> = Box
<dyn A
+ 'a
>; //~ incompatible lifetime on type
31 impl E
for (Box
<dyn A
>, Box
<dyn A
>) {}
36 // `'a` doesn't match explicit `'static`: suggest `'_`
37 type T
<'a
> = (Box
<dyn A
+ 'a
>, Box
<dyn A
+ 'a
>); //~ incompatible lifetime on type