Skip to content

Incorrect this block is empty, you might have not meant to close it on any channel #69259

Closed
@olegnn

Description

@olegnn

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) {}

(Playground)

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 lintsA-parserArea: The lexing & parsing of Rust source code to an ASTC-enhancementCategory: 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.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions