summary refs log tree commit diff
path: root/tests/ui/generics/generic-higher-ranked-lifetime-issue-122714.rs
blob: b2ac332b4f08e805517490a4205a176b94ab5184 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#![allow(dead_code)]

trait Trait1<T>
  where T: for<'a> Trait1<T> + 'b { } //~ ERROR use of undeclared lifetime name `'b`

trait Trait2<T>
where
    T: B<'b> + for<'a> A<'a>, //~ ERROR use of undeclared lifetime name `'b`
{
}

trait Trait3<T>
where
    T: B<'b> + for<'a> A<'a> + 'c {}
    //~^ ERROR use of undeclared lifetime name `'b`
    //~| ERROR use of undeclared lifetime name `'c`

trait Trait4<T>
where
    T: for<'a> A<'a> + 'x + for<'b> B<'b>, //~ ERROR use of undeclared lifetime name `'x`
{
}

trait A<'a> {}
trait B<'a> {}


fn main() {}