suggest on Self return type

This commit is contained in:
csmoe 2020-05-16 16:08:56 +08:00
parent 008d90a66a
commit 633e4aafe6
2 changed files with 43 additions and 36 deletions

View file

@ -1,12 +0,0 @@
// edition:2018
struct S<'a>(&'a i32);
impl<'a> S<'a> {
async fn new(i: &'a i32) -> Self {
//~^ ERROR `async fn` return type cannot contain a projection or `Self` that references lifetimes from a parent scope
S(&22)
}
}
fn main() {}