Skip to content

Unused type alias does not produce warning #37455

Closed
@matthew-piziak

Description

@matthew-piziak

I created the following main.rs:

type Unused = String;

fn main() {
    println!("Hello, world!");
}

Note that Unused is not pub and not used. Nevertheless no "unused" warning is given.

Here is the full (empty) output of cargo build:

Finished debug [unoptimized + debuginfo] target(s) in 0.0 secs

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