Skip to content

Same span pointed to multiple times for unused_imports lint #59895

Closed
@estebank

Description

@estebank

My codebase manages to produce the following output under todays nightly:

warning: the item `Foo` is imported redundantly
   --> src/lib.rs:243:9
    |
8   |   Foo, Bar,
    |   ---
    |   |
    |   the item `Foo` is already imported here
    |   the item `Foo` is already imported here
...
243 |     use foo::bar::Foo;
    |         ^^^^^^^^^^^^^
    |
    = note: #[warn(unused_imports)] on by default

I haven't been able to reduce it, but have a patch to fix it (without a test).

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions