summaryrefslogtreecommitdiffstats
path: root/src/test/ui/type-alias-impl-trait/issue-58662-simplified.rs
blob: 27ca7d0fdc9fa4fd76a7da1e1a95e8a3debcbefa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// check-pass

#![feature(generators, generator_trait)]
#![feature(type_alias_impl_trait)]

trait Trait {}

impl<T> Trait for T {}

type Foo<'c> = impl Trait + 'c;
fn foo<'a>(rng: &'a ()) -> Foo<'a> {
    fn helper<'b>(rng: &'b ()) -> impl 'b + Trait {
        rng
    }

    helper(rng)
}

fn main() {
}