-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
False positive for break_with_label_and_loop lint & incorrect suggestion #137414
Copy link
Copy link
Closed
Closed
Copy link
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.L-break_with_label_and_loopLint: break_with_label_and_loopLint: break_with_label_and_loopL-false-positiveLint: False positive (should not have fired).Lint: False positive (should not have fired).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.L-break_with_label_and_loopLint: break_with_label_and_loopLint: break_with_label_and_loopL-false-positiveLint: False positive (should not have fired).Lint: False positive (should not have fired).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.
I tried this code:
I expected
func_1to compile without warning but it produced:func_2is the same asfunc_1, but it follows the compilers suggestion and produces this warning:func_3compiles without warnings, but it adds a needless assignment.Meta
rustc --version --verbose:The issue is also present on latest stable (1.85)