-
-
Notifications
You must be signed in to change notification settings - Fork 15k
Red highlighting in the wrong spot in the "help: remove the extra argument" message #147070
Copy link
Copy link
Closed
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsC-bugCategory: This is a bug.Category: This is a bug.D-diagnostic-infraDiagnostics: Issues that affect all diagnostics, or relate to the diagnostic machinery itself.Diagnostics: Issues that affect all diagnostics, or relate to the diagnostic machinery itself.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.
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsC-bugCategory: This is a bug.Category: This is a bug.D-diagnostic-infraDiagnostics: Issues that affect all diagnostics, or relate to the diagnostic machinery itself.Diagnostics: Issues that affect all diagnostics, or relate to the diagnostic machinery itself.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.
Type
Fields
Give feedbackNo fields configured for issues without a type.
The one time where a screenshot is needed rather than copy-pasting the output! 🤣
Code
When I attempt to compile:
Current output
I'm seeing this, note the "n" in "argument" that's highlighted:
Desired output
I think the intention is for the whole
23 - String::from(""),line to be red?When I change the code to:
then I see this:
Which is also weird? Why is the comma on the previous line red instead of the line that needs to be removed?
Other cases
I have some proprietary code that whenever I try to reduce or obfuscate it, the behavior goes away, but instead of just an "n" I'm seeing "he extra argument" in red:
Rust Version
I'm seeing this behavior with stable, beta, and nightly as follows:
Other info
I'm on macos Sequoia 15.7 using iTerm2 3.6.2 and zsh. Happy to provide more env info or try eliminating various causes!
Also note that this isn't reproducible in the playground because the playground has its own highlighting system and doesn't use the terminal's highlighting at all 😭