Skip to content

Swap primary/secondary spans in multiple unused formatting arguments diagnostic #55350

Closed
@estebank

Description

@estebank

For tooling's sake, make the following string literal the primary span:

error: multiple unused formatting arguments
 --> src/main.rs:1:30
  |
1 | fn main() { println!("Test", 1, 2) }
  |                      ------  ^  ^
  |                      |
  |                      multiple missing formatting specifiers

This way we can keep the current visual output, while giving the primary span a label that can be used by dev-tools.

CC dense-analysis/ale#1696

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-diagnosticsArea: Messages for errors, warnings, and lintsE-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.T-dev-toolsRelevant to the dev-tools subteam, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions