diff options
| author | Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de> | 2022-02-17 16:00:04 +0000 |
|---|---|---|
| committer | Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de> | 2022-02-17 16:00:04 +0000 |
| commit | 86d17b98f2dbb732049d9671c354903b19203b56 (patch) | |
| tree | 6cb98cbb9e252ed1b140c9f1569fe90b1ea92bf6 /compiler/rustc_error_codes | |
| parent | 30b3f35c420694a4f24e5a4df00f06073f4f3a37 (diff) | |
| download | rust-86d17b98f2dbb732049d9671c354903b19203b56.tar.gz rust-86d17b98f2dbb732049d9671c354903b19203b56.zip | |
Revert "Auto merge of #91403 - cjgillot:inherit-async, r=oli-obk"
This reverts commit 3cfa4def7c87d571bd46d92fed608edf8fad236e, reversing changes made to 5d8767cb229b097fedb1dd4bd9420d463c37774f.
Diffstat (limited to 'compiler/rustc_error_codes')
| -rw-r--r-- | compiler/rustc_error_codes/src/error_codes/E0760.md | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_error_codes/src/error_codes/E0760.md b/compiler/rustc_error_codes/src/error_codes/E0760.md index 65acd4fabdf..e1dcfefebcd 100644 --- a/compiler/rustc_error_codes/src/error_codes/E0760.md +++ b/compiler/rustc_error_codes/src/error_codes/E0760.md @@ -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) } } |
