-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Avoid having both primary and secondary underlines on the same spans by supporting multiple primary errors. #41850
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
Comments
Mark-Simulacrum
added
the
A-diagnostics
Area: Messages for errors, warnings, and lints
label
Jun 22, 2017
bors
added a commit
that referenced
this issue
Jul 22, 2017
Less verbose output for unused arguments Closes #37718 This is my first contribution to rust, so sorry if I'm missing anything! The output now looks like this: <img width="831" alt="screen shot 2017-07-18 at 5 01 32 pm" src="https://user-images.githubusercontent.com/12972285/28347566-dbfa9962-6c05-11e7-8730-c2e8062a04cc.png"> It's not the prettiest, but whenever #41850 gets resolved, this should be able to be improved. **EDIT:** This also does not seem r? @Mark-Simulacrum
Mark-Simulacrum
added
the
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
label
Jul 26, 2017
kennytm
added a commit
to kennytm/rust
that referenced
this issue
Jan 17, 2018
Point at unused arguments for format string Avoid overlapping spans by only pointing at the arguments that are not being used in the argument string. Enable libsyntax to have diagnostics with multiple primary spans by accepting `Into<MultiSpan>` instead of `Span`. Partially addresses rust-lang#41850.
kennytm
added a commit
to kennytm/rust
that referenced
this issue
Jan 17, 2018
Point at unused arguments for format string Avoid overlapping spans by only pointing at the arguments that are not being used in the argument string. Enable libsyntax to have diagnostics with multiple primary spans by accepting `Into<MultiSpan>` instead of `Span`. Partially addresses rust-lang#41850.
Multiple primary spans are supported by using a
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
While working on #41256, @jonathandturner proposed a specific syntax for having multiple primary errors on one line, like the example below. This required changes to the way the
DiagnosticBuilder
works and since I don't have enough knowledge of the codebase I am writing this follow-up issue.An error with multiple unused arguments will look like the example below after merging #41256.
This example is having the same kind of error multiple times in one expression, and would ultimately look something like the example below since we try to avoid having both primary and secondary underlines on the same spans:
The text was updated successfully, but these errors were encountered: