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

dead_code lint doesn't catch unused const values #17925

Closed
japaric opened this issue Oct 10, 2014 · 0 comments
Closed

dead_code lint doesn't catch unused const values #17925

japaric opened this issue Oct 10, 2014 · 0 comments
Labels
A-lints Area: Lints (warnings about flaws in source code) such as unused_mut.

Comments

@japaric
Copy link
Member

japaric commented Oct 10, 2014

STR

const FOO: int = 0;
static BAR: int = 0;

fn main() {}

Output

const.rs:2:1: 2:21 warning: static item is never used: `BAR`, #[warn(dead_code)] on by default
const.rs:2 static BAR: int = 0;

Version

rustc 0.13.0-dev (45797a076 2014-10-10 07:52:00 +0000)
@thestinger thestinger added the A-lints Area: Lints (warnings about flaws in source code) such as unused_mut. label Oct 10, 2014
lnicola pushed a commit to lnicola/rust that referenced this issue Aug 29, 2024
Include generics when lowering extern type

Fixes rust-lang#17767
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-lints Area: Lints (warnings about flaws in source code) such as unused_mut.
Projects
None yet
Development

No branches or pull requests

2 participants