Revert "Auto merge of #91403 - cjgillot:inherit-async, r=oli-obk"
This reverts commit3cfa4def7c
, reversing changes made to5d8767cb22
.
This commit is contained in:
parent
30b3f35c42
commit
86d17b98f2
34 changed files with 281 additions and 227 deletions
|
@ -1,4 +1,4 @@
|
|||
`impl trait` return type cannot contain a projection
|
||||
`async fn`/`impl trait` return type cannot contain a projection
|
||||
or `Self` that references lifetimes from a parent scope.
|
||||
|
||||
Erroneous code example:
|
||||
|
@ -7,7 +7,7 @@ Erroneous code example:
|
|||
struct S<'a>(&'a i32);
|
||||
|
||||
impl<'a> S<'a> {
|
||||
fn new(i: &'a i32) -> impl Into<Self> {
|
||||
async fn new(i: &'a i32) -> Self {
|
||||
S(&22)
|
||||
}
|
||||
}
|
||||
|
@ -19,7 +19,7 @@ To fix this error we need to spell out `Self` to `S<'a>`:
|
|||
struct S<'a>(&'a i32);
|
||||
|
||||
impl<'a> S<'a> {
|
||||
fn new(i: &'a i32) -> impl Into<S<'a>> {
|
||||
async fn new(i: &'a i32) -> S<'a> {
|
||||
S(&22)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue