rust/tests/ui/self/self_lifetime-async.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

15 lines
254 B
Rust
Raw Normal View History

2019-08-13 01:13:59 +00:00
// 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() {}