Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Confusing error message for async move in the 2015 edition #74115

Open
goffrie opened this issue Jul 6, 2020 · 0 comments
Open

Confusing error message for async move in the 2015 edition #74115

goffrie opened this issue Jul 6, 2020 · 0 comments
Labels
A-async-await A-diagnostics AsyncAwait-Triaged C-enhancement D-edition T-compiler

Comments

@goffrie
Copy link
Contributor

goffrie commented Jul 6, 2020

Playground:

fn main() {
    async move { };
}

yields this error:

error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found keyword `move`
 --> src/main.rs:2:11
  |
2 |     async move { };
  |           ^^^^ expected one of 8 possible tokens

#71783 added a hint about the edition for async {}, but it seems that async move {} doesn't get it.

@jonas-schievink jonas-schievink added A-async-await A-diagnostics T-compiler labels Jul 6, 2020
@estebank estebank added the D-edition label Jul 7, 2020
@tmandry tmandry added this to On deck in wg-async work via automation Jul 7, 2020
@tmandry tmandry added the AsyncAwait-Triaged label Jul 7, 2020
@JohnTitor JohnTitor added the C-enhancement label Jul 8, 2020
@tmandry tmandry removed this from On deck in wg-async work Jul 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-async-await A-diagnostics AsyncAwait-Triaged C-enhancement D-edition T-compiler
Projects
None yet
Development

No branches or pull requests

5 participants