]> git.lizzy.rs Git - rust.git/blob - tests/ui/generic-associated-types/unsatisfied-outlives-bound.rs
Rollup merge of #103702 - WaffleLapkin:lift-sized-bounds-from-pointer-methods-where...
[rust.git] / tests / ui / generic-associated-types / unsatisfied-outlives-bound.rs
1 trait ATy {
2     type Item<'a>: 'a;
3 }
4
5 impl<'b> ATy for &'b () {
6     type Item<'a> = &'b ();
7     //~^ ERROR  the type `&'b ()` does not fulfill the required lifetime
8 }
9
10 trait StaticTy {
11     type Item<'a>: 'static;
12 }
13
14 impl StaticTy for () {
15     type Item<'a> = &'a ();
16     //~^ ERROR  the type `&'a ()` does not fulfill the required lifetime
17 }
18
19 fn main() {}