Closed
Description
I tried this code:
fn main() {
move async {
};
}
This should give a suggestion to reorder the keywords to async move
, something like:
`move async` is not a valid order for these keywords. Did you mean `async move`?
Right now it gives this error, which is not very helpful:
Compiling playground v0.0.1 (/playground)
error: expected one of `|` or `||`, found keyword `async`
--> src/main.rs:2:10
|
2 | move async {
| ^^^^^ expected one of `|` or `||`
error: aborting due to previous error
error: could not compile `playground`
To learn more, run the command again with --verbose.
Tested on 1.48.0 and 1.50.0-nightly (2020-12-03 5be3f9f)
Metadata
Metadata
Assignees
Labels
Area: Async & AwaitArea: Messages for errors, warnings, and lintsArea: The lexing & parsing of Rust source code to an ASTAsync-await issues that have been triaged during a working group meeting.Category: An issue proposing an enhancement or a PR with one.Diagnostics: Confusing error or lint that should be reworked.Diagnostics: Confusing error or lint; hard to understand for new users.Call for participation: Help is requested to fix this issue.
Type
Projects
Status
Done