-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
unused_assignments not shown for vec overwrite - Rust 1.92.0-beta.3 #148960
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.L-unused_assignmentsLint: unused_assignmentsLint: unused_assignmentsP-highHigh priorityHigh priorityS-has-bisectionStatus: A bisection has been found for this issueStatus: A bisection has been found for this issueT-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-betaPerformance or correctness regression from stable to beta.Performance or correctness regression from stable to beta.
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-unused_assignmentsLint: unused_assignmentsLint: unused_assignmentsP-highHigh priorityHigh priorityS-has-bisectionStatus: A bisection has been found for this issueStatus: A bisection has been found for this issueT-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-betaPerformance or correctness regression from stable to beta.Performance or correctness regression from stable to beta.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Summary
Clippy shipped with Rust 1.92.0-beta.3 doesn't report unused_assignments when a vector is initialized and then replaced with another value unconditionally.
Lint Name
unused_assignments
Reproducer
I tried this code:
I expected to see this happen:
Instead, this happened:
Nightly is affected too.
Version