-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Closed
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsA-parserArea: The lexing & parsing of Rust source code to an ASTArea: The lexing & parsing of Rust source code to an ASTC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
Any code which has correct ()
and incorrect braces like f)
after them will produce incorrect this block is empty, you might have not meant to close it
which will point at the valid parentheses. This behaviour is the same on all channels.
fn main() {}
fn f) {}
Errors:
Compiling playground v0.0.1 (/playground)
error: unexpected closing delimiter: `)`
--> src/main.rs:3:5
|
1 | fn main() {}
| -- this block is empty, you might have not meant to close it
2 |
3 | fn f) {}
| ^ unexpected closing delimiter
error: aborting due to previous error
error: could not compile `playground`.
To learn more, run the command again with --verbose.
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsA-parserArea: The lexing & parsing of Rust source code to an ASTArea: The lexing & parsing of Rust source code to an ASTC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.