suggest on Self return type
This commit is contained in:
parent
008d90a66a
commit
633e4aafe6
2 changed files with 43 additions and 36 deletions
|
|
@ -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() {}
|
||||
Loading…
Add table
Add a link
Reference in a new issue