summaryrefslogtreecommitdiffstats
path: root/tests/ui/where-clauses/where-lifetime-resolution.rs
blob: d8677ee959abded82e73e4449e49f72be5dab3de (plain)
1
2
3
4
5
6
7
8
9
10
11
12
trait Trait1<'a> {}
trait Trait2<'a, 'b> {}

fn f() where
    for<'a> dyn Trait1<'a>: Trait1<'a>, // OK
    (dyn for<'a> Trait1<'a>): Trait1<'a>,
    //~^ ERROR use of undeclared lifetime name `'a`
    for<'a> dyn for<'b> Trait2<'a, 'b>: Trait2<'a, 'b>,
    //~^ ERROR use of undeclared lifetime name `'b`
{}

fn main() {}