[INFO] crate subset-map 0.3.2 is already in cache [INFO] extracting crate subset-map 0.3.2 into work/ex/clippy-test-run/sources/stable/reg/subset-map/0.3.2 [INFO] extracting crate subset-map 0.3.2 into work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/reg/subset-map/0.3.2 [INFO] validating manifest of subset-map-0.3.2 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 subset-map-0.3.2 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 subset-map-0.3.2 [INFO] finished frobbing subset-map-0.3.2 [INFO] frobbed toml for subset-map-0.3.2 written to work/ex/clippy-test-run/sources/stable/reg/subset-map/0.3.2/Cargo.toml [INFO] started frobbing subset-map-0.3.2 [INFO] finished frobbing subset-map-0.3.2 [INFO] frobbed toml for subset-map-0.3.2 written to work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/reg/subset-map/0.3.2/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 subset-map-0.3.2 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-1/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/subset-map/0.3.2:/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] 84dce4dc43f55b8de151b3ce36b36567c0ac792b8bce40500902c517b85347ed [INFO] running `"docker" "start" "-a" "84dce4dc43f55b8de151b3ce36b36567c0ac792b8bce40500902c517b85347ed"` [INFO] [stderr] Checking subset-map v0.3.2 (/opt/crater/workdir) [INFO] [stderr] warning: unneeded return statement [INFO] [stderr] --> src/lib.rs:705:9 [INFO] [stderr] | [INFO] [stderr] 705 | return true; [INFO] [stderr] | ^^^^^^^^^^^^ help: remove `return` as shown: `true` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::needless_return)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stderr] [INFO] [stderr] warning: unneeded return statement [INFO] [stderr] --> src/lib.rs:705:9 [INFO] [stderr] | [INFO] [stderr] 705 | return true; [INFO] [stderr] | ^^^^^^^^^^^^ help: remove `return` as shown: `true` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::needless_return)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stderr] [INFO] [stderr] warning: an inclusive range would be more readable [INFO] [stderr] --> src/lib.rs:904:43 [INFO] [stderr] | [INFO] [stderr] 904 | let payload = init_with(&elements[fixed..fixed + 1])?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^ help: use: `fixed..=fixed` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::range_plus_one)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#range_plus_one [INFO] [stderr] [INFO] [stderr] warning: an inclusive range would be more readable [INFO] [stderr] --> src/lib.rs:904:43 [INFO] [stderr] | [INFO] [stderr] 904 | let payload = init_with(&elements[fixed..fixed + 1])?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^ help: use: `fixed..=fixed` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::range_plus_one)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#range_plus_one [INFO] [stderr] [INFO] [stderr] warning: called `cloned().collect()` on a slice to create a `Vec`. Calling `to_vec()` is both faster and more readable [INFO] [stderr] --> src/lib.rs:1040:54 [INFO] [stderr] | [INFO] [stderr] 1040 | let sample = SubsetMap::fill(&[1, 2, 3], |x| x.iter().cloned().collect::>()); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::iter_cloned_collect)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_cloned_collect [INFO] [stderr] [INFO] [stderr] warning: the function has a cyclomatic complexity of 45 [INFO] [stderr] --> src/lib.rs:1052:5 [INFO] [stderr] | [INFO] [stderr] 1052 | / fn test_lookup_result() { [INFO] [stderr] 1053 | | let subset_map = SubsetMap::new(&[1u32, 2, 3, 4], |x| { [INFO] [stderr] 1054 | | if x == &[2, 3] { [INFO] [stderr] 1055 | | None [INFO] [stderr] ... | [INFO] [stderr] 1124 | | assert_eq!(match_result.is_match(), true); [INFO] [stderr] 1125 | | } [INFO] [stderr] | |_____^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::cyclomatic_complexity)] on by default [INFO] [stderr] = help: you could split it up into multiple smaller functions [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cyclomatic_complexity [INFO] [stderr] [INFO] [stderr] warning: taken reference of right operand [INFO] [stderr] --> src/lib.rs:1054:16 [INFO] [stderr] | [INFO] [stderr] 1054 | if x == &[2, 3] { [INFO] [stderr] | ^^^^^------- [INFO] [stderr] | | [INFO] [stderr] | help: use the right value directly: `[2, 3]` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::op_ref)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stderr] [INFO] [stderr] warning: called `cloned().collect()` on a slice to create a `Vec`. Calling `to_vec()` is both faster and more readable [INFO] [stderr] --> src/lib.rs:1057:31 [INFO] [stderr] | [INFO] [stderr] 1057 | let payload = x.iter().cloned().collect::>(); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_cloned_collect [INFO] [stderr] [INFO] [stderr] Finished dev [unoptimized + debuginfo] target(s) in 1.39s [INFO] running `"docker" "inspect" "84dce4dc43f55b8de151b3ce36b36567c0ac792b8bce40500902c517b85347ed"` [INFO] running `"docker" "rm" "-f" "84dce4dc43f55b8de151b3ce36b36567c0ac792b8bce40500902c517b85347ed"` [INFO] [stdout] 84dce4dc43f55b8de151b3ce36b36567c0ac792b8bce40500902c517b85347ed