rust/tests/ui/where-clauses/where-lifetime-resolution.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

13 lines
323 B
Rust
Raw Normal View History

trait Trait1<'a> {}
trait Trait2<'a, 'b> {}
2017-01-18 14:41:57 +00:00
fn f() where
2019-05-28 18:46:13 +00:00
for<'a> dyn Trait1<'a>: Trait1<'a>, // OK
(dyn for<'a> Trait1<'a>): Trait1<'a>,
2017-01-18 14:41:57 +00:00
//~^ ERROR use of undeclared lifetime name `'a`
2019-05-28 18:46:13 +00:00
for<'a> dyn for<'b> Trait2<'a, 'b>: Trait2<'a, 'b>,
2017-01-18 14:41:57 +00:00
//~^ ERROR use of undeclared lifetime name `'b`
{}
fn main() {}