Closed
Description
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.
error: multiple unused formatting arguments
--> /Users/nickvernij/Programming/rust/src/test/ui/macros/format-foreign.rs:12:5
|
12 | println!("%.*3$s %s!/n", "Hello,", "World", 4);
| ^^^^^^^^^^^^^^^^^^^^^^^^^--------^^-------^^-^^
| | | |
| | | unused
| | unused
| unused
|
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:
error: multiple unused formatting arguments
--> /Users/nickvernij/Programming/rust/src/test/ui/macros/format-foreign.rs:12:5
|
12 | println!("%.*3$s %s!/n", "Hello,", "World", 4);
| ^^^^^^^^ ^^^^^^^ ^
| | | |
| ------------------------- unused