-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.Area: Lints (warnings about flaws in source code) such as unused_mut.C-bugCategory: This is a bug.Category: This is a bug.P-highHigh priorityHigh priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-nightlyPerformance or correctness regression from stable to nightly.Performance or correctness regression from stable to nightly.
Description
The current nightly version (rustc 1.21.0-nightly (df511d5 2017-08-14)) warns about an unused variable, even if it's flagged with allow(). The stable version doesn't do so.
fn main() {
#[allow(unused_variables)] let x = 12;
let y = 11;
}
warning: unused variable: `x`
--> src/main.rs:2:36
|
2 | #[allow(unused_variables)] let x = 12;
| ^
|
= note: #[warn(unused_variables)] on by default
https://play.rust-lang.org/?gist=9b81da266dd1f4383760de35d94f7ff6&version=nightly
Metadata
Metadata
Assignees
Labels
A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.Area: Lints (warnings about flaws in source code) such as unused_mut.C-bugCategory: This is a bug.Category: This is a bug.P-highHigh priorityHigh priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-nightlyPerformance or correctness regression from stable to nightly.Performance or correctness regression from stable to nightly.