Skip to content

Mentions of builtin types mark an import with the same name as used. #44311

Closed
@eddyb

Description

@eddyb

Found when implementing #44240: turns out panic!() in a module marks std::u32 imports as used, even if they aren't actually needed.
Simple testcase:

// This should always warn:
use std::u32;
// If only the builtin type is used:
fn main() { let _: u32; }

cc @petrochenkov

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions