summaryrefslogtreecommitdiffstats
path: root/tests/ui/impl-trait/nested-rpit-hrtb-2.rs
blob: 4d72962157b7641013b08a993441cb2a18f7c0fc (plain)
1
2
3
4
5
6
7
8
9
// 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() {}