Provide appropriate suggestions for some of the discussed await syntaxes #60613
Labels
A-async-await
Area: Async & Await
A-diagnostics
Area: Messages for errors, warnings, and lints
A-suggestion-diagnostics
Area: Suggestions generated by the compiler applied by `cargo fix`
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Regardless of the final syntax selected for
await
, given the prevalence of prefix keyword in other languages, and the possibility of thinking it is a method, the parser should support these syntaxes and error with an appropriate targeted diagnostic. Furthermore, should the field or method syntax were to be chosen, we should have reasonable behavior with explanations when accidentally usingawait
when trying to access a field or call a similar method both inside and outside ofasync
blocks.The text was updated successfully, but these errors were encountered: