Better handling of missing closing or opening delimiters, well distinct by type of delimiter #138401
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Code
This code is wrong, it lacks an open "(" to call abs():
Current output
rustc 1.87.0-nightly gives the error messages:
Desired output
On this code I'd like rustc to give only one error, that says "- missing open
(
for this delimiter", or something similar.Rationale and extra context
I think rustc should consider {} () [] as totally distinct pairs of things. I think it isn't common for a programmer to mix them by mistake. It happens, but I think it happens quite less often than missing a correct pairing of { with } or ( with ) or [ with ] by mistake.
Other cases
Rust Version
Anything else?
No response
The text was updated successfully, but these errors were encountered: