about summary refs log tree commit diff
path: root/tests/ui/type-alias-impl-trait/issue-58662-simplified.rs
blob: aef13947f5540381affed0ba4e33b080f1987cb2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
//@ check-pass

#![feature(coroutines, coroutine_trait)]
#![feature(type_alias_impl_trait)]

trait Trait {}

impl<T> Trait for T {}

type Foo<'c> = impl Trait + 'c;

#[define_opaque(Foo)]
fn foo<'a>(rng: &'a ()) -> Foo<'a> {
    fn helper<'b>(rng: &'b ()) -> impl 'b + Trait {
        rng
    }

    helper(rng)
}

fn main() {}