We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 289216f commit c6a3f5dCopy full SHA for c6a3f5d
compiler/rustc_error_codes/src/error_codes/E0760.md
@@ -1,4 +1,4 @@
1
-`async fn`/`impl trait` return type cannot contain a projection
+`impl trait` return type cannot contain a projection
2
or `Self` that references lifetimes from a parent scope.
3
4
Erroneous code example:
@@ -7,7 +7,7 @@ Erroneous code example:
7
struct S<'a>(&'a i32);
8
9
impl<'a> S<'a> {
10
- async fn new(i: &'a i32) -> Self {
+ fn new(i: &'a i32) -> impl Into<Self> {
11
S(&22)
12
}
13
@@ -19,7 +19,7 @@ To fix this error we need to spell out `Self` to `S<'a>`:
19
20
21
22
- async fn new(i: &'a i32) -> S<'a> {
+ fn new(i: &'a i32) -> impl Into<S<'a>> {
23
24
25
0 commit comments