-
-
Notifications
You must be signed in to change notification settings - Fork 14.9k
"irrefutable_let_patterns" shouldn't fire for leading if-let guards #98361
Copy link
Copy link
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.F-if_let_guard`#![feature(if_let_guard)]``#![feature(if_let_guard)]`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.
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.F-if_let_guard`#![feature(if_let_guard)]``#![feature(if_let_guard)]`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.
Type
Fields
Give feedbackNo fields configured for issues without a type.
sample code:
yields this warning:
However, the suggestion to move it out of the construct doesn't make sense, as
yisn't bound until we've entered the match arm in the first place.