Skip to content

rustc: Improve unexpected close delimiter hint #68987

Closed
@frostyplanet

Description

@frostyplanet

I found writing rust often confused by missing closing "}" or ")" error message. when editting large file. the line number in error message is completely wrong, looking through my code the changes are no where near the line. It takes a long time for me to spot the syntax problem.

error: unexpected close delimiter: `}`
    --> core/src/tx_file.rs:1218:1
     |
1179 |             None=>{},
     |                   -- this block is empty, you might have not meant to close it
...
1218 | }
     | ^ unexpected close delimiter

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