[INFO] crate indextree-ng 1.0.5 is already in cache [INFO] extracting crate indextree-ng 1.0.5 into work/ex/clippy-test-run/sources/stable/reg/indextree-ng/1.0.5 [INFO] extracting crate indextree-ng 1.0.5 into work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/reg/indextree-ng/1.0.5 [INFO] validating manifest of indextree-ng-1.0.5 on toolchain stable [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+stable" "read-manifest" "--manifest-path" "Cargo.toml"` [INFO] validating manifest of indextree-ng-1.0.5 on toolchain stable+rustflags=-Dclippy::into_iter_on_array [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+stable" "read-manifest" "--manifest-path" "Cargo.toml"` [INFO] started frobbing indextree-ng-1.0.5 [INFO] finished frobbing indextree-ng-1.0.5 [INFO] frobbed toml for indextree-ng-1.0.5 written to work/ex/clippy-test-run/sources/stable/reg/indextree-ng/1.0.5/Cargo.toml [INFO] started frobbing indextree-ng-1.0.5 [INFO] finished frobbing indextree-ng-1.0.5 [INFO] frobbed toml for indextree-ng-1.0.5 written to work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/reg/indextree-ng/1.0.5/Cargo.toml [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+stable" "generate-lockfile" "--manifest-path" "Cargo.toml" "-Zno-index-update"` [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+stable" "generate-lockfile" "--manifest-path" "Cargo.toml" "-Zno-index-update"` [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+stable" "fetch" "--locked" "--manifest-path" "Cargo.toml"` [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+stable" "fetch" "--locked" "--manifest-path" "Cargo.toml"` [INFO] linting indextree-ng-1.0.5 against stable+rustflags=-Dclippy::into_iter_on_array for clippy-test-run [INFO] running `"docker" "create" "-v" "/mnt/big/crater/work/local/target-dirs/clippy-test-run/worker-2/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array:/opt/crater/target:rw,Z" "-v" "/mnt/big/crater/work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/reg/indextree-ng/1.0.5:/opt/crater/workdir:ro,Z" "-v" "/mnt/big/crater/work/local/cargo-home:/opt/crater/cargo-home:ro,Z" "-v" "/mnt/big/crater/work/local/rustup-home:/opt/crater/rustup-home:ro,Z" "-e" "USER_ID=1000" "-e" "SOURCE_DIR=/opt/crater/workdir" "-e" "MAP_USER_ID=1000" "-e" "CARGO_TARGET_DIR=/opt/crater/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid -Dclippy::into_iter_on_array" "-e" "CARGO_HOME=/opt/crater/cargo-home" "-e" "RUSTUP_HOME=/opt/crater/rustup-home" "-w" "/opt/crater/workdir" "-m" "1536M" "--network" "none" "rustops/crates-build-env" "/opt/crater/cargo-home/bin/cargo" "+stable" "clippy" "--frozen" "--all" "--all-targets"` [INFO] [stdout] 05582a29ae35c85f14603a58b7a3ad600475d7ebbd95873f15ece716a106f7f1 [INFO] running `"docker" "start" "-a" "05582a29ae35c85f14603a58b7a3ad600475d7ebbd95873f15ece716a106f7f1"` [INFO] [stderr] Checking indextree-ng v1.0.5 (/opt/crater/workdir) [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/lib.rs:126:13 [INFO] [stderr] | [INFO] [stderr] 126 | data: data, [INFO] [stderr] | ^^^^^^^^^^ help: replace it with: `data` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::redundant_field_names)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/lib.rs:241:13 [INFO] [stderr] | [INFO] [stderr] 241 | arena: arena, [INFO] [stderr] | ^^^^^^^^^^^^ help: replace it with: `arena` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/lib.rs:251:13 [INFO] [stderr] | [INFO] [stderr] 251 | arena: arena, [INFO] [stderr] | ^^^^^^^^^^^^ help: replace it with: `arena` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/lib.rs:261:13 [INFO] [stderr] | [INFO] [stderr] 261 | arena: arena, [INFO] [stderr] | ^^^^^^^^^^^^ help: replace it with: `arena` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/lib.rs:269:13 [INFO] [stderr] | [INFO] [stderr] 269 | arena: arena, [INFO] [stderr] | ^^^^^^^^^^^^ help: replace it with: `arena` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/lib.rs:277:13 [INFO] [stderr] | [INFO] [stderr] 277 | arena: arena, [INFO] [stderr] | ^^^^^^^^^^^^ help: replace it with: `arena` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/lib.rs:293:13 [INFO] [stderr] | [INFO] [stderr] 293 | arena: arena, [INFO] [stderr] | ^^^^^^^^^^^^ help: replace it with: `arena` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/lib.rs:302:13 [INFO] [stderr] | [INFO] [stderr] 302 | arena: arena, [INFO] [stderr] | ^^^^^^^^^^^^ help: replace it with: `arena` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/lib.rs:126:13 [INFO] [stderr] | [INFO] [stderr] 126 | data: data, [INFO] [stderr] | ^^^^^^^^^^ help: replace it with: `data` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::redundant_field_names)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/lib.rs:241:13 [INFO] [stderr] | [INFO] [stderr] 241 | arena: arena, [INFO] [stderr] | ^^^^^^^^^^^^ help: replace it with: `arena` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/lib.rs:251:13 [INFO] [stderr] | [INFO] [stderr] 251 | arena: arena, [INFO] [stderr] | ^^^^^^^^^^^^ help: replace it with: `arena` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/lib.rs:261:13 [INFO] [stderr] | [INFO] [stderr] 261 | arena: arena, [INFO] [stderr] | ^^^^^^^^^^^^ help: replace it with: `arena` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/lib.rs:269:13 [INFO] [stderr] | [INFO] [stderr] 269 | arena: arena, [INFO] [stderr] | ^^^^^^^^^^^^ help: replace it with: `arena` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/lib.rs:277:13 [INFO] [stderr] | [INFO] [stderr] 277 | arena: arena, [INFO] [stderr] | ^^^^^^^^^^^^ help: replace it with: `arena` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/lib.rs:293:13 [INFO] [stderr] | [INFO] [stderr] 293 | arena: arena, [INFO] [stderr] | ^^^^^^^^^^^^ help: replace it with: `arena` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/lib.rs:302:13 [INFO] [stderr] | [INFO] [stderr] 302 | arena: arena, [INFO] [stderr] | ^^^^^^^^^^^^ help: replace it with: `arena` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: you should consider deriving a `Default` implementation for `Arena` [INFO] [stderr] --> src/lib.rs:111:5 [INFO] [stderr] | [INFO] [stderr] 111 | / pub fn new() -> Arena { [INFO] [stderr] 112 | | Arena { nodes: Vec::new(), [INFO] [stderr] 113 | | lookup: HashMap::new(), } [INFO] [stderr] 114 | | } [INFO] [stderr] | |_____^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::new_without_default_derive)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default_derive [INFO] [stderr] help: try this [INFO] [stderr] | [INFO] [stderr] 104 | #[derive(Default)] [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: using `clone` on a `Copy` type [INFO] [stderr] --> src/lib.rs:138:27 [INFO] [stderr] | [INFO] [stderr] 138 | children.push(child.clone()); [INFO] [stderr] | ^^^^^^^^^^^^^ help: try removing the `clone` call: `child` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::clone_on_copy)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stderr] [INFO] [stderr] warning: this if-then-else expression returns a bool literal [INFO] [stderr] --> src/lib.rs:165:9 [INFO] [stderr] | [INFO] [stderr] 165 | / if self.len() == 0 { [INFO] [stderr] 166 | | true [INFO] [stderr] 167 | | } [INFO] [stderr] 168 | | else { [INFO] [stderr] 169 | | false [INFO] [stderr] 170 | | } [INFO] [stderr] | |_________^ help: you can reduce it to: `self.len() == 0` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::needless_bool)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool [INFO] [stderr] [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/lib.rs:174:35 [INFO] [stderr] | [INFO] [stderr] 174 | fn get_pair_mut(&mut self, a: &NodeId, b: &NodeId) -> Result<(&mut Node, &mut Node), IndexTreeError> { [INFO] [stderr] | ^^^^^^^ help: consider passing by value instead: `NodeId` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::trivially_copy_pass_by_ref)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stderr] [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/lib.rs:174:47 [INFO] [stderr] | [INFO] [stderr] 174 | fn get_pair_mut(&mut self, a: &NodeId, b: &NodeId) -> Result<(&mut Node, &mut Node), IndexTreeError> { [INFO] [stderr] | ^^^^^^^ help: consider passing by value instead: `NodeId` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stderr] [INFO] [stderr] warning: you should consider deriving a `Default` implementation for `Arena` [INFO] [stderr] --> src/lib.rs:111:5 [INFO] [stderr] | [INFO] [stderr] 111 | / pub fn new() -> Arena { [INFO] [stderr] 112 | | Arena { nodes: Vec::new(), [INFO] [stderr] 113 | | lookup: HashMap::new(), } [INFO] [stderr] 114 | | } [INFO] [stderr] | |_____^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::new_without_default_derive)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default_derive [INFO] [stderr] help: try this [INFO] [stderr] | [INFO] [stderr] 104 | #[derive(Default)] [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: using `clone` on a `Copy` type [INFO] [stderr] --> src/lib.rs:138:27 [INFO] [stderr] | [INFO] [stderr] 138 | children.push(child.clone()); [INFO] [stderr] | ^^^^^^^^^^^^^ help: try removing the `clone` call: `child` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::clone_on_copy)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stderr] [INFO] [stderr] warning: this if-then-else expression returns a bool literal [INFO] [stderr] --> src/lib.rs:165:9 [INFO] [stderr] | [INFO] [stderr] 165 | / if self.len() == 0 { [INFO] [stderr] 166 | | true [INFO] [stderr] 167 | | } [INFO] [stderr] 168 | | else { [INFO] [stderr] 169 | | false [INFO] [stderr] 170 | | } [INFO] [stderr] | |_________^ help: you can reduce it to: `self.len() == 0` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::needless_bool)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool [INFO] [stderr] [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/lib.rs:174:35 [INFO] [stderr] | [INFO] [stderr] 174 | fn get_pair_mut(&mut self, a: &NodeId, b: &NodeId) -> Result<(&mut Node, &mut Node), IndexTreeError> { [INFO] [stderr] | ^^^^^^^ help: consider passing by value instead: `NodeId` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::trivially_copy_pass_by_ref)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stderr] [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/lib.rs:174:47 [INFO] [stderr] | [INFO] [stderr] 174 | fn get_pair_mut(&mut self, a: &NodeId, b: &NodeId) -> Result<(&mut Node, &mut Node), IndexTreeError> { [INFO] [stderr] | ^^^^^^^ help: consider passing by value instead: `NodeId` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stderr] [INFO] [stderr] warning: identical conversion [INFO] [stderr] --> tests/lib.rs:65:16 [INFO] [stderr] | [INFO] [stderr] 65 | assert_eq!(b.ancestors(arena).into_iter().count(), 2); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into_iter()`: `b.ancestors(arena)` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::identity_conversion)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_conversion [INFO] [stderr] [INFO] [stderr] warning: identical conversion [INFO] [stderr] --> tests/lib.rs:67:16 [INFO] [stderr] | [INFO] [stderr] 67 | assert_eq!(b.ancestors(arena).into_iter().count(), 1); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into_iter()`: `b.ancestors(arena)` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_conversion [INFO] [stderr] [INFO] [stderr] warning: identical conversion [INFO] [stderr] --> tests/lib.rs:93:16 [INFO] [stderr] | [INFO] [stderr] 93 | assert_eq!(b.ancestors(arena).into_iter().count(), 1); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into_iter()`: `b.ancestors(arena)` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_conversion [INFO] [stderr] [INFO] [stderr] warning: identical conversion [INFO] [stderr] --> tests/lib.rs:94:16 [INFO] [stderr] | [INFO] [stderr] 94 | assert_eq!(c.ancestors(arena).into_iter().count(), 1); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into_iter()`: `c.ancestors(arena)` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_conversion [INFO] [stderr] [INFO] [stderr] warning: identical conversion [INFO] [stderr] --> tests/lib.rs:95:16 [INFO] [stderr] | [INFO] [stderr] 95 | assert_eq!(d.ancestors(arena).into_iter().count(), 2); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into_iter()`: `d.ancestors(arena)` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_conversion [INFO] [stderr] [INFO] [stderr] Finished dev [unoptimized + debuginfo] target(s) in 1.42s [INFO] running `"docker" "inspect" "05582a29ae35c85f14603a58b7a3ad600475d7ebbd95873f15ece716a106f7f1"` [INFO] running `"docker" "rm" "-f" "05582a29ae35c85f14603a58b7a3ad600475d7ebbd95873f15ece716a106f7f1"` [INFO] [stdout] 05582a29ae35c85f14603a58b7a3ad600475d7ebbd95873f15ece716a106f7f1