Use indentation for delimiter mismatch detecting may get wrong help message #103882
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
D-confusing
Diagnostics: Confusing error or lint that should be reworked.
D-incorrect
Diagnostics: A diagnostic that is giving misleading or incorrect information.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
For code
Current output is:
It's error because indentation mismatch at line 8 and 10, ideally, we should report there is an extra
{
at line 16.Or we only show line 4~22 has
unclosed delimiter
, wrong help message may mislead user.The root cause is we use indentation width for checking possible position:
rust/compiler/rustc_parse/src/lexer/tokentrees.rs
Line 112 in a876a4d
The text was updated successfully, but these errors were encountered: