Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unused type alias does not produce warning #37455

Closed
matthew-piziak opened this issue Oct 28, 2016 · 0 comments
Closed

Unused type alias does not produce warning #37455

matthew-piziak opened this issue Oct 28, 2016 · 0 comments
Labels
A-lint Area: Lints (warnings about flaws in source code) such as unused_mut.

Comments

@matthew-piziak
Copy link
Contributor

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
@sanxiyn sanxiyn added the A-lint Area: Lints (warnings about flaws in source code) such as unused_mut. label Oct 31, 2016
sophiajt pushed a commit to sophiajt/rust that referenced this issue Nov 2, 2016
Remove unused type aliases

Found by extending the dead code lint. The lint itself is work in progress because of false positives.

cc rust-lang#37455.
bors added a commit that referenced this issue Dec 18, 2016
 Warn unused type aliases, reimplemented

Reimplementation of #37631. Fix #37455.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-lint Area: Lints (warnings about flaws in source code) such as unused_mut.
Projects
None yet
Development

No branches or pull requests

2 participants