You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Improve error message for "return type cannot contain a projection or Self..." #78600
Following the improvement for the diagnostic of the error reported in this issue #69276, it would be nice (depending on how #61949 is prioritized) to have the same error message when instead of returning Self the function returns Result<Self, Error>.
When Self is returned I get a nice error message (on rustc 1.47):
error[E0760]: `async fn` return type cannot contain a projection or `Self` that references lifetimes from a parent scope
--> src/lib.rs:4:33
|
4 | async fn new(i: &'a i32) -> Self {
| ^^^^ help: consider spelling out the type instead: `S<'a>`
Activity
tmandry commentedon Jan 28, 2021
@rustbot remove-assignment
@csmoe feel free to re-claim if you are working on this.
Rollup merge of rust-lang#82021 - csmoe:issue-78600, r=tmandry