[INFO] crate sliding_puzzle 1.0.0 is already in cache [INFO] extracting crate sliding_puzzle 1.0.0 into work/ex/clippy-test-run/sources/stable/reg/sliding_puzzle/1.0.0 [INFO] extracting crate sliding_puzzle 1.0.0 into work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/reg/sliding_puzzle/1.0.0 [INFO] validating manifest of sliding_puzzle-1.0.0 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 sliding_puzzle-1.0.0 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 sliding_puzzle-1.0.0 [INFO] finished frobbing sliding_puzzle-1.0.0 [INFO] frobbed toml for sliding_puzzle-1.0.0 written to work/ex/clippy-test-run/sources/stable/reg/sliding_puzzle/1.0.0/Cargo.toml [INFO] started frobbing sliding_puzzle-1.0.0 [INFO] finished frobbing sliding_puzzle-1.0.0 [INFO] frobbed toml for sliding_puzzle-1.0.0 written to work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/reg/sliding_puzzle/1.0.0/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 sliding_puzzle-1.0.0 against stable for clippy-test-run [INFO] running `"docker" "create" "-v" "/mnt/big/crater/work/local/target-dirs/clippy-test-run/worker-7/stable:/opt/crater/target:rw,Z" "-v" "/mnt/big/crater/work/ex/clippy-test-run/sources/stable/reg/sliding_puzzle/1.0.0:/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" "-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] 9980e3f1f7c26215aed670954676d7048b26aaaa2c61deb85920b8946fdafc9c [INFO] running `"docker" "start" "-a" "9980e3f1f7c26215aed670954676d7048b26aaaa2c61deb85920b8946fdafc9c"` [INFO] [stderr] warning: An explicit [[bench]] section is specified in Cargo.toml which currently [INFO] [stderr] disables Cargo from automatically inferring other benchmark targets. [INFO] [stderr] This inference behavior will change in the Rust 2018 edition and the following [INFO] [stderr] files will be included as a benchmark target: [INFO] [stderr] [INFO] [stderr] * /opt/crater/workdir/benches/slide.rs [INFO] [stderr] * /opt/crater/workdir/benches/from_decimal_unchecked.rs [INFO] [stderr] * /opt/crater/workdir/benches/clone.rs [INFO] [stderr] * /opt/crater/workdir/benches/to_decimal_unchecked.rs [INFO] [stderr] * /opt/crater/workdir/benches/new.rs [INFO] [stderr] * /opt/crater/workdir/benches/slide_mut.rs [INFO] [stderr] * /opt/crater/workdir/benches/slide_mut_unchecked.rs [INFO] [stderr] * /opt/crater/workdir/benches/slide_unchecked.rs [INFO] [stderr] * /opt/crater/workdir/benches/to_decimal.rs [INFO] [stderr] * /opt/crater/workdir/benches/scramble.rs [INFO] [stderr] * /opt/crater/workdir/benches/moves.rs [INFO] [stderr] * /opt/crater/workdir/benches/from_decimal.rs [INFO] [stderr] [INFO] [stderr] This is likely to break cargo build or cargo test as these files may not be [INFO] [stderr] ready to be compiled as a benchmark target today. You can future-proof yourself [INFO] [stderr] and disable this warning by adding `autobenches = false` to your [package] [INFO] [stderr] section. You may also move the files to a location where Cargo would not [INFO] [stderr] automatically infer them to be a target, such as in subfolders. [INFO] [stderr] [INFO] [stderr] For more information on this warning you can consult [INFO] [stderr] https://github.com/rust-lang/cargo/issues/5330 [INFO] [stderr] Checking sliding_puzzle v1.0.0 (/opt/crater/workdir) [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/base/mod.rs:35:22 [INFO] [stderr] | [INFO] [stderr] 35 | .map(|c| c.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: length comparison to zero [INFO] [stderr] --> src/base/mod.rs:149:23 [INFO] [stderr] | [INFO] [stderr] 149 | let no_rows = slice_2d.len() == 0; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `slice_2d.is_empty()` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::len_zero)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stderr] [INFO] [stderr] warning: length comparison to zero [INFO] [stderr] --> src/base/mod.rs:150:52 [INFO] [stderr] | [INFO] [stderr] 150 | let no_columns = slice_2d.iter().any(|row| row.len() == 0); [INFO] [stderr] | ^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `row.is_empty()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stderr] [INFO] [stderr] warning: methods called `to_*` usually take self by reference; consider choosing a less ambiguous name [INFO] [stderr] --> src/base/mod.rs:225:23 [INFO] [stderr] | [INFO] [stderr] 225 | pub fn to_decimal(self) -> Result { [INFO] [stderr] | ^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::wrong_self_convention)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention [INFO] [stderr] [INFO] [stderr] warning: methods called `to_*` usually take self by reference; consider choosing a less ambiguous name [INFO] [stderr] --> src/base/mod.rs:239:33 [INFO] [stderr] | [INFO] [stderr] 239 | pub fn to_decimal_unchecked(self) -> u64 { [INFO] [stderr] | ^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention [INFO] [stderr] [INFO] [stderr] warning: using `println!("")` [INFO] [stderr] --> src/bin/search.rs:73:5 [INFO] [stderr] | [INFO] [stderr] 73 | println!(""); [INFO] [stderr] | ^^^^^^^^^^^^ help: replace it with: `println!()` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::println_empty_string)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stderr] [INFO] [stderr] warning: using `println!("")` [INFO] [stderr] --> src/bin/search.rs:73:5 [INFO] [stderr] | [INFO] [stderr] 73 | println!(""); [INFO] [stderr] | ^^^^^^^^^^^^ help: replace it with: `println!()` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::println_empty_string)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [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/base/mod.rs:35:22 [INFO] [stderr] | [INFO] [stderr] 35 | .map(|c| c.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: length comparison to zero [INFO] [stderr] --> src/base/mod.rs:149:23 [INFO] [stderr] | [INFO] [stderr] 149 | let no_rows = slice_2d.len() == 0; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `slice_2d.is_empty()` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::len_zero)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stderr] [INFO] [stderr] warning: length comparison to zero [INFO] [stderr] --> src/base/mod.rs:150:52 [INFO] [stderr] | [INFO] [stderr] 150 | let no_columns = slice_2d.iter().any(|row| row.len() == 0); [INFO] [stderr] | ^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `row.is_empty()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stderr] [INFO] [stderr] warning: methods called `to_*` usually take self by reference; consider choosing a less ambiguous name [INFO] [stderr] --> src/base/mod.rs:225:23 [INFO] [stderr] | [INFO] [stderr] 225 | pub fn to_decimal(self) -> Result { [INFO] [stderr] | ^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::wrong_self_convention)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention [INFO] [stderr] [INFO] [stderr] warning: methods called `to_*` usually take self by reference; consider choosing a less ambiguous name [INFO] [stderr] --> src/base/mod.rs:239:33 [INFO] [stderr] | [INFO] [stderr] 239 | pub fn to_decimal_unchecked(self) -> u64 { [INFO] [stderr] | ^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention [INFO] [stderr] [INFO] [stderr] warning: using `clone` on a `Copy` type [INFO] [stderr] --> src/bin/search.rs:37:19 [INFO] [stderr] | [INFO] [stderr] 37 | hardest = queue.front().unwrap().0.clone(); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `queue.front().unwrap().0` [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: `if _ { .. } else { .. }` is an expression [INFO] [stderr] --> src/bin/search.rs:88:5 [INFO] [stderr] | [INFO] [stderr] 88 | / let bigger; [INFO] [stderr] 89 | | if rows < columns { [INFO] [stderr] 90 | | smaller = rows; [INFO] [stderr] 91 | | bigger = columns; [INFO] [stderr] ... | [INFO] [stderr] 94 | | bigger = rows; [INFO] [stderr] 95 | | } [INFO] [stderr] | |_____^ help: it is more idiomatic to write: `let bigger = if rows < columns { ..; columns } else { ..; rows };` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::useless_let_if_seq)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_let_if_seq [INFO] [stderr] [INFO] [stderr] warning: casting i32 to f64 may become silently lossy if types change [INFO] [stderr] --> src/bin/search.rs:122:21 [INFO] [stderr] | [INFO] [stderr] 122 | states as f64 / rate_per_second as f64 / 60.0 [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `f64::from(rate_per_second)` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::cast_lossless)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless [INFO] [stderr] [INFO] [stderr] warning: using `clone` on a `Copy` type [INFO] [stderr] --> src/bin/search.rs:37:19 [INFO] [stderr] | [INFO] [stderr] 37 | hardest = queue.front().unwrap().0.clone(); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `queue.front().unwrap().0` [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: `if _ { .. } else { .. }` is an expression [INFO] [stderr] --> src/bin/search.rs:88:5 [INFO] [stderr] | [INFO] [stderr] 88 | / let bigger; [INFO] [stderr] 89 | | if rows < columns { [INFO] [stderr] 90 | | smaller = rows; [INFO] [stderr] 91 | | bigger = columns; [INFO] [stderr] ... | [INFO] [stderr] 94 | | bigger = rows; [INFO] [stderr] 95 | | } [INFO] [stderr] | |_____^ help: it is more idiomatic to write: `let bigger = if rows < columns { ..; columns } else { ..; rows };` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::useless_let_if_seq)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_let_if_seq [INFO] [stderr] [INFO] [stderr] warning: casting i32 to f64 may become silently lossy if types change [INFO] [stderr] --> src/bin/search.rs:122:21 [INFO] [stderr] | [INFO] [stderr] 122 | states as f64 / rate_per_second as f64 / 60.0 [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `f64::from(rate_per_second)` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::cast_lossless)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless [INFO] [stderr] [INFO] [stderr] Finished dev [unoptimized + debuginfo] target(s) in 2.54s [INFO] running `"docker" "inspect" "9980e3f1f7c26215aed670954676d7048b26aaaa2c61deb85920b8946fdafc9c"` [INFO] running `"docker" "rm" "-f" "9980e3f1f7c26215aed670954676d7048b26aaaa2c61deb85920b8946fdafc9c"` [INFO] [stdout] 9980e3f1f7c26215aed670954676d7048b26aaaa2c61deb85920b8946fdafc9c