-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
C-bugCategory: Clippy is not doing the correct thingCategory: Clippy is not doing the correct thingI-false-positiveIssue: The lint was triggered on code it shouldn't haveIssue: The lint was triggered on code it shouldn't have
Description
Lint name: clippy::same_item_push
I tried this code:
fn main() {
let mut v = Vec::new();
for _ in 0..10 {
v.push(1);
v.extend(&[2]);
}
}
I expected to see this happen: the code passes clippy check.
Instead, this happened: clippy warns clippy::same_item_push
.
Meta
cargo clippy -V
: clippy 0.1.51 (2fd73fab 2021-03-23)rustc -Vv
:rustc 1.51.0 (2fd73fabe 2021-03-23) binary: rustc commit-hash: 2fd73fabe469357a12c2c974c140f67e7cdd76d0 commit-date: 2021-03-23 host: x86_64-pc-windows-msvc release: 1.51.0 LLVM version: 11.0.1
Metadata
Metadata
Assignees
Labels
C-bugCategory: Clippy is not doing the correct thingCategory: Clippy is not doing the correct thingI-false-positiveIssue: The lint was triggered on code it shouldn't haveIssue: The lint was triggered on code it shouldn't have