-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Open
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.A-macrosArea: All kinds of macros (custom derive, macro_rules!, proc macros, ..)Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..)C-bugCategory: This is a bug.Category: This is a bug.L-false-negativeLint: False negative (should have fired but didn't).Lint: False negative (should have fired but didn't).L-unused_parensLint: unused_parensLint: unused_parensT-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.
Description
fn main() {
let x = vec![((8))];
println!("Hello, world!, {:?}",x);
}
and
fn main() {
println!("Hello, world!, {:?}", ((8)));
}
do not have any warnings while
fn main() {
let x = ((8));
println!("Hello, world!, {:?}",x);
}
emits unused_parens
.
I expect the first two snippets to also cause this warning.
note: is there a way to add labels to an issue without being a member?
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.A-macrosArea: All kinds of macros (custom derive, macro_rules!, proc macros, ..)Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..)C-bugCategory: This is a bug.Category: This is a bug.L-false-negativeLint: False negative (should have fired but didn't).Lint: False negative (should have fired but didn't).L-unused_parensLint: unused_parensLint: unused_parensT-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.