$ rustc --explain E0760
`async fn`/`impl trait` return type cannot contain a projection or `Self` that references lifetimes from a parent scope.
Erroneous code example:
```
struct S<'a>(&'a i32);
impl<'a> S<'a> {
async fn new(i: &'a i32) -> Self {
S(&22)
}
}
```
To fix this error we need to spell out `Self` to `S<'a>`:
```
struct S<'a>(&'a i32);
impl<'a> S<'a> {
async fn new(i: &'a i32) -> S<'a> {
S(&22)
}
}
```
This will be allowed at some point in the future,
but the implementation is not yet complete.
See the [issue-61949] for this limitation.
[issue-61949]: https://github.com/rust-lang/rust/issues/61949
lifetime 딸린 Self는 async에서는 못쓴대 장난까냐 ㅡㅡ
그래도 그나마 지들 잘못된 줄은 알고 있음
못 하는 게 맞지 않음? 대기상태 중에 라이프사이클이 끝나는 것까지 추적하려면 너무 어려워질 것같은데?
Self를 원래형태로 치환만해도 되는거보면 그건 아님