- 
                Notifications
    You must be signed in to change notification settings 
- Fork 13.9k
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.D-invalid-suggestionDiagnostics: A structured suggestion resulting in incorrect code.Diagnostics: A structured suggestion resulting in incorrect code.F-let_chains`#![feature(let_chains)]``#![feature(let_chains)]`T-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
warning: unnecessary parentheses around `if let` head expression
 --> src/lib.rs:2:19
  |
2 |     if let true = (false && true) {}
  |                   ^^^^^^^^^^^^^^^ help: remove these parentheses
  |
  = note: #[warn(unused_parens)] on by defaultIf we remove the parens we correctly get:
error: ambiguous use of `&&`
 --> src/lib.rs:2:19
  |
2 |     if let true = false && true {}
  |                   ^^^^^^^^^^^^^ help: consider adding parentheses: `(false && true)`
  |
  = note: this will be a error until the `let_chains` feature is stabilized
  = note: see rust-lang/rust#53668 for more informationThe lint should take let_chains into account.
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.D-invalid-suggestionDiagnostics: A structured suggestion resulting in incorrect code.Diagnostics: A structured suggestion resulting in incorrect code.F-let_chains`#![feature(let_chains)]``#![feature(let_chains)]`T-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.