Clippy 1.63 fails to detect vec-init-then-push #9364
Labels
C-bug
Category: Clippy is not doing the correct thing
I-false-negative
Issue: The lint should have been triggered on code, but wasn't
Uh oh!
There was an error while loading. Please reload this page.
Summary
Clippy 1.63 fails to detect vec-init-then-push but it is detected with 1.62. This seems to only happen when there is an
if
statement after the initial push that conditionally pushes a subsequent element to the vec.Lint Name
vec-init-then-push
Reproducer
I tried this code:
I expected to see this happen:
Instead, this happened:
Version
False negative:
Detects:
The text was updated successfully, but these errors were encountered: