]> git.lizzy.rs Git - rust.git/blob - tests/ui/self/self_lifetime-async.rs
Rollup merge of #107091 - clubby789:infer-ftl-missing-dollar, r=compiler-errors
[rust.git] / tests / ui / self / self_lifetime-async.rs
1 // check-pass
2 // edition:2018
3
4 struct Foo<'a>(&'a ());
5 impl<'a> Foo<'a> {
6     async fn foo<'b>(self: &'b Foo<'a>) -> &() { self.0 }
7 }
8
9 type Alias = Foo<'static>;
10 impl Alias {
11     async fn bar<'a>(self: &Alias, arg: &'a ()) -> &() { arg }
12 }
13
14 fn main() {}