Skip to content

Unused imports sometimes reports used imports #6935

Closed
@msullivan

Description

@msullivan

One example, minimized from something in rustpkg:

extern mod extra(name = "extra");

use extra::getopts::groups::getopts;
use extra::getopts;

fn main() { getopts([], []); }

It reports that the first import is unused. If that import is removed, compilation fails. It is actually the second import that is unused.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.A-resolveArea: Name/path resolution done by `rustc_resolve` specifically

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions