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

Mention expectation of { for parse error immediately after async in expressions #80931

Open
estebank opened this issue Jan 12, 2021 · 0 comments
Labels
A-diagnostics Area: Messages for errors, warnings, and lints A-parser Area: The parsing of Rust source code to an AST C-enhancement Category: An issue proposing an enhancement or a PR with one. D-papercut Diagnostics: An error or lint that needs small tweaks. P-low Low priority T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@estebank
Copy link
Contributor

The following code

error: expected one of `move`, `|`, or `||`, found keyword `let`
--> $DIR/block-no-opening-brace.rs:30:9
|
LL | async
| - expected one of `move`, `|`, or `||`
LL | let x = 0;
| ^^^ unexpected token

should also mention an expectation for an open brace {, and potentially even suggesting a new block, like the other test cases in that file.

@estebank estebank added A-diagnostics Area: Messages for errors, warnings, and lints A-parser Area: The parsing of Rust source code to an AST P-low Low priority T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. D-papercut Diagnostics: An error or lint that needs small tweaks. labels Jan 12, 2021
@JohnTitor JohnTitor added the C-enhancement Category: An issue proposing an enhancement or a PR with one. label Jan 12, 2021
workingjubilee added a commit to workingjubilee/rustc that referenced this issue Sep 23, 2024
…e, r=jieyouxu

Add more test cases for block-no-opening-brace

Also add FIXME's for rust-lang#80931 & rust-lang#78168
workingjubilee added a commit to workingjubilee/rustc that referenced this issue Sep 23, 2024
…e, r=jieyouxu

Add more test cases for block-no-opening-brace

Also add FIXME's for rust-lang#80931 & rust-lang#78168
rust-timer added a commit to rust-lang-ci/rust that referenced this issue Sep 23, 2024
Rollup merge of rust-lang#130721 - GrigorenkoPV:block-no-opening-brace, r=jieyouxu

Add more test cases for block-no-opening-brace

Also add FIXME's for rust-lang#80931 & rust-lang#78168
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-diagnostics Area: Messages for errors, warnings, and lints A-parser Area: The parsing of Rust source code to an AST C-enhancement Category: An issue proposing an enhancement or a PR with one. D-papercut Diagnostics: An error or lint that needs small tweaks. P-low Low priority T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

2 participants