Skip to content

Unused type alias does not produce warning #37455

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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