blob: f42337d53406216a492778bf9691a8c4306b8b17 [file] [log] [blame]
// edition:2018
use std::pin::Pin;
struct Foo;
impl Foo {
async fn a(self: Pin<&Foo>, f: &Foo) -> &Foo { f }
//~^ ERROR lifetime mismatch
async fn c(self: Pin<&Self>, f: &Foo, g: &Foo) -> (Pin<&Foo>, &Foo) { (self, f) }
//~^ ERROR lifetime mismatch
}
type Alias<T> = Pin<T>;
impl Foo {
async fn bar<'a>(self: Alias<&Self>, arg: &'a ()) -> &() { arg } //~ ERROR E0623
}
fn main() {}