]> git.lizzy.rs Git - rust.git/blob - src/test/ui/generic-associated-types/unsatisfied-outlives-bound.rs
Merge commit '5ff7b632a95bac6955611d85040859128902c580' into sync-rustfmt-subtree
[rust.git] / src / test / ui / generic-associated-types / unsatisfied-outlives-bound.rs
1 #![feature(generic_associated_types)]
2
3 trait ATy {
4     type Item<'a>: 'a;
5 }
6
7 impl<'b> ATy for &'b () {
8     type Item<'a> = &'b ();
9     //~^ ERROR  the type `&'b ()` does not fulfill the required lifetime
10 }
11
12 trait StaticTy {
13     type Item<'a>: 'static;
14 }
15
16 impl StaticTy for () {
17     type Item<'a> = &'a ();
18     //~^ ERROR  the type `&'a ()` does not fulfill the required lifetime
19 }
20
21 fn main() {}