Skip to content

Unused imports lint should detect redundant prelude imports #28296

Closed
@jonas-schievink

Description

@jonas-schievink

This code produces no warning:

use std::vec::Vec;

fn main() {
    Vec::<u8>::new();
}

A warning would be useful for old code that imports items which have since made it into the prelude.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.C-enhancementCategory: An issue proposing an enhancement or a PR with one.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions