rust/tests/ui/impl-trait/nested-rpit-hrtb-2.rs

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

10 lines
278 B
Rust
Raw Normal View History

// The nested impl Trait references a higher-ranked region
trait Trait<'a> { type Assoc; }
impl<'a> Trait<'a> for () { type Assoc = &'a str; }
fn test() -> impl for<'a> Trait<'a, Assoc = impl Sized> {}
//~^ ERROR captures lifetime that does not appear in bounds
fn main() {}