Skip to content

Unused import lint does not trigger if imported item is used through another path #30078

Closed
@wthrowe

Description

@wthrowe

This gives no warnings:

mod a {
    pub fn foo() {}
}

fn main() {
    use a::foo; // Should trigger unused_imports
    a::foo();
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions