summaryrefslogtreecommitdiffstats
path: root/tests/ui/self/self_lifetime-async.rs
blob: c3c6e56582d9f25af18404520bdb2dc113afc35e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// check-pass
// edition:2018

struct Foo<'a>(&'a ());
impl<'a> Foo<'a> {
    async fn foo<'b>(self: &'b Foo<'a>) -> &() { self.0 }
}

type Alias = Foo<'static>;
impl Alias {
    async fn bar<'a>(self: &Alias, arg: &'a ()) -> &() { arg }
}

fn main() {}