1
Fork 0

Revert "Auto merge of #91403 - cjgillot:inherit-async, r=oli-obk"

This reverts commit 3cfa4def7c, reversing
changes made to 5d8767cb22.
This commit is contained in:
Oli Scherer 2022-02-17 16:00:04 +00:00
parent 30b3f35c42
commit 86d17b98f2
34 changed files with 281 additions and 227 deletions

View file

@ -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)
}
}