]> git.proxmox.com Git - rustc.git/blame - src/test/ui/generic-associated-types/unsatisfied-outlives-bound.rs
New upstream version 1.55.0+dfsg1
[rustc.git] / src / test / ui / generic-associated-types / unsatisfied-outlives-bound.rs
CommitLineData
f035d41b
XL
1#![feature(generic_associated_types)]
2
3trait ATy {
4 type Item<'a>: 'a;
5}
6
7impl<'b> ATy for &'b () {
8 type Item<'a> = &'b ();
29967ef6 9 //~^ ERROR the type `&'b ()` does not fulfill the required lifetime
f035d41b
XL
10}
11
12trait StaticTy {
13 type Item<'a>: 'static;
14}
15
16impl StaticTy for () {
17 type Item<'a> = &'a ();
29967ef6 18 //~^ ERROR the type `&'a ()` does not fulfill the required lifetime
f035d41b
XL
19}
20
21fn main() {}