[INFO] updating cached repository y011d4/Polyomino-Solver-in-Rust [INFO] running `"git" "fetch" "--all"` [INFO] [stdout] Fetching origin [INFO] [stderr] From git://github.com/y011d4/Polyomino-Solver-in-Rust [INFO] [stderr] * branch HEAD -> FETCH_HEAD [INFO] running `"git" "clone" "work/cache/sources/gh/y011d4/Polyomino-Solver-in-Rust" "work/ex/clippy-test-run/sources/stable/gh/y011d4/Polyomino-Solver-in-Rust"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable/gh/y011d4/Polyomino-Solver-in-Rust'... [INFO] [stderr] done. [INFO] running `"git" "clone" "work/cache/sources/gh/y011d4/Polyomino-Solver-in-Rust" "work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/y011d4/Polyomino-Solver-in-Rust"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/y011d4/Polyomino-Solver-in-Rust'... [INFO] [stderr] done. [INFO] running `"git" "rev-parse" "HEAD"` [INFO] [stdout] da213f8f620d6aef241c0ecc2c4a191a7c646486 [INFO] sha for GitHub repo y011d4/Polyomino-Solver-in-Rust: da213f8f620d6aef241c0ecc2c4a191a7c646486 [INFO] validating manifest of y011d4/Polyomino-Solver-in-Rust 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 y011d4/Polyomino-Solver-in-Rust 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 y011d4/Polyomino-Solver-in-Rust [INFO] finished frobbing y011d4/Polyomino-Solver-in-Rust [INFO] frobbed toml for y011d4/Polyomino-Solver-in-Rust written to work/ex/clippy-test-run/sources/stable/gh/y011d4/Polyomino-Solver-in-Rust/Cargo.toml [INFO] started frobbing y011d4/Polyomino-Solver-in-Rust [INFO] finished frobbing y011d4/Polyomino-Solver-in-Rust [INFO] frobbed toml for y011d4/Polyomino-Solver-in-Rust written to work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/y011d4/Polyomino-Solver-in-Rust/Cargo.toml [INFO] crate y011d4/Polyomino-Solver-in-Rust has a lockfile. skipping [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 y011d4/Polyomino-Solver-in-Rust 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/gh/y011d4/Polyomino-Solver-in-Rust:/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] 321fe3c54db59b21ae07cb1571901878050901126a70d078df9d1af4b94827f2 [INFO] running `"docker" "start" "-a" "321fe3c54db59b21ae07cb1571901878050901126a70d078df9d1af4b94827f2"` [INFO] [stderr] Checking polyomino v0.1.0 (/opt/crater/workdir) [INFO] [stderr] warning: using `write!()` with a format string that ends in a single newline, consider using `writeln!()` instead [INFO] [stderr] --> src/env.rs:21:9 [INFO] [stderr] | [INFO] [stderr] 21 | write!(f, "\n").unwrap(); [INFO] [stderr] | ^^^^^^^^^^^^^^^ [INFO] [stderr] warning: using `write!()` with a format string that ends in a single newline, consider using `writeln!()` instead [INFO] [stderr] --> src/env.rs:21:9 [INFO] [stderr] | [INFO] [stderr] 21 | write!(f, "\n").unwrap(); [INFO] [stderr] | ^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::write_with_newline)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stderr] [INFO] [stderr] warning: using `write!()` with a format string that ends in a single newline, consider using `writeln!()` instead [INFO] [stderr] --> src/env.rs:27:17 [INFO] [stderr] | [INFO] [stderr] 27 | write!(f, "|\n").unwrap(); [INFO] [stderr] | ^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stderr] [INFO] [stderr] warning: using `write!()` with a format string that ends in a single newline, consider using `writeln!()` instead [INFO] [stderr] --> src/env.rs:35:9 [INFO] [stderr] | [INFO] [stderr] 35 | write!(f, "\n") [INFO] [stderr] | ^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/env.rs:48:13 [INFO] [stderr] | [INFO] [stderr] 48 | field: field, [INFO] [stderr] | ^^^^^^^^^^^^ help: replace it with: `field` [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/env.rs:49:13 [INFO] [stderr] | [INFO] [stderr] 49 | nr: nr, [INFO] [stderr] | ^^^^^^ help: replace it with: `nr` [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/env.rs:50:13 [INFO] [stderr] | [INFO] [stderr] 50 | nc: nc, [INFO] [stderr] | ^^^^^^ help: replace it with: `nc` [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/env.rs:88:13 [INFO] [stderr] | [INFO] [stderr] 88 | pos: pos, [INFO] [stderr] | ^^^^^^^^ help: replace it with: `pos` [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] | [INFO] [stderr] = note: #[warn(clippy::write_with_newline)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stderr] [INFO] [stderr] warning: using `write!()` with a format string that ends in a single newline, consider using `writeln!()` instead [INFO] [stderr] --> src/env.rs:27:17 [INFO] [stderr] | [INFO] [stderr] 27 | write!(f, "|\n").unwrap(); [INFO] [stderr] | ^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stderr] [INFO] [stderr] warning: using `write!()` with a format string that ends in a single newline, consider using `writeln!()` instead [INFO] [stderr] --> src/env.rs:35:9 [INFO] [stderr] | [INFO] [stderr] 35 | write!(f, "\n") [INFO] [stderr] | ^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/env.rs:48:13 [INFO] [stderr] | [INFO] [stderr] 48 | field: field, [INFO] [stderr] | ^^^^^^^^^^^^ help: replace it with: `field` [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/env.rs:49:13 [INFO] [stderr] | [INFO] [stderr] 49 | nr: nr, [INFO] [stderr] | ^^^^^^ help: replace it with: `nr` [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/env.rs:50:13 [INFO] [stderr] | [INFO] [stderr] 50 | nc: nc, [INFO] [stderr] | ^^^^^^ help: replace it with: `nc` [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/env.rs:88:13 [INFO] [stderr] | [INFO] [stderr] 88 | pos: pos, [INFO] [stderr] | ^^^^^^^^ help: replace it with: `pos` [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: unneeded return statement [INFO] [stderr] --> src/solver.rs:56:5 [INFO] [stderr] | [INFO] [stderr] 56 | return emp_idx; [INFO] [stderr] | ^^^^^^^^^^^^^^^ help: remove `return` as shown: `emp_idx` [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/solver.rs:56:5 [INFO] [stderr] | [INFO] [stderr] 56 | return emp_idx; [INFO] [stderr] | ^^^^^^^^^^^^^^^ help: remove `return` as shown: `emp_idx` [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: the loop variable `i` is used to index `field` [INFO] [stderr] --> src/env.rs:42:18 [INFO] [stderr] | [INFO] [stderr] 42 | for i in 0..field.len() { [INFO] [stderr] | ^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::needless_range_loop)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stderr] help: consider using an iterator [INFO] [stderr] | [INFO] [stderr] 42 | for (i, ) in field.iter_mut().enumerate() { [INFO] [stderr] | ^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: the loop variable `i` is used to index `tmp` [INFO] [stderr] --> src/env.rs:109:14 [INFO] [stderr] | [INFO] [stderr] 109 | for i in 0..n { [INFO] [stderr] | ^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stderr] help: consider using an iterator [INFO] [stderr] | [INFO] [stderr] 109 | for (i, ) in tmp.iter().enumerate().take(n) { [INFO] [stderr] | ^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/env.rs:116:80 [INFO] [stderr] | [INFO] [stderr] 116 | fn gen_all_patterns(piece_2d: &mut Vec>, rot: bool, rev: bool, ncb: &usize) -> Vec> { [INFO] [stderr] | ^^^^^^ help: consider passing by value instead: `usize` [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: the loop variable `i` is used to index `piece_2d` [INFO] [stderr] --> src/env.rs:126:22 [INFO] [stderr] | [INFO] [stderr] 126 | for i in 0..p_size { [INFO] [stderr] | ^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stderr] help: consider using an iterator [INFO] [stderr] | [INFO] [stderr] 126 | for (i, ) in piece_2d.iter().enumerate().take(p_size) { [INFO] [stderr] | ^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: this if-then-else expression returns a bool literal [INFO] [stderr] --> src/solver.rs:14:41 [INFO] [stderr] | [INFO] [stderr] 14 | let tmp: bool = if board.field[emp_idx+block]!=0 { true } else { false }; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can reduce it to: `board.field[emp_idx+block]!=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: the loop variable `i` is used to index `field` [INFO] [stderr] --> src/env.rs:42:18 [INFO] [stderr] | [INFO] [stderr] 42 | for i in 0..field.len() { [INFO] [stderr] | ^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::needless_range_loop)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stderr] help: consider using an iterator [INFO] [stderr] | [INFO] [stderr] 42 | for (i, ) in field.iter_mut().enumerate() { [INFO] [stderr] | ^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: the loop variable `i` is used to index `tmp` [INFO] [stderr] --> src/env.rs:109:14 [INFO] [stderr] | [INFO] [stderr] 109 | for i in 0..n { [INFO] [stderr] | ^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stderr] help: consider using an iterator [INFO] [stderr] | [INFO] [stderr] 109 | for (i, ) in tmp.iter().enumerate().take(n) { [INFO] [stderr] | ^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/env.rs:116:80 [INFO] [stderr] | [INFO] [stderr] 116 | fn gen_all_patterns(piece_2d: &mut Vec>, rot: bool, rev: bool, ncb: &usize) -> Vec> { [INFO] [stderr] | ^^^^^^ help: consider passing by value instead: `usize` [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: the loop variable `i` is used to index `piece_2d` [INFO] [stderr] --> src/env.rs:126:22 [INFO] [stderr] | [INFO] [stderr] 126 | for i in 0..p_size { [INFO] [stderr] | ^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stderr] help: consider using an iterator [INFO] [stderr] | [INFO] [stderr] 126 | for (i, ) in piece_2d.iter().enumerate().take(p_size) { [INFO] [stderr] | ^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: this if-then-else expression returns a bool literal [INFO] [stderr] --> src/solver.rs:14:41 [INFO] [stderr] | [INFO] [stderr] 14 | let tmp: bool = if board.field[emp_idx+block]!=0 { true } else { false }; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can reduce it to: `board.field[emp_idx+block]!=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] Finished dev [unoptimized + debuginfo] target(s) in 1.16s [INFO] running `"docker" "inspect" "321fe3c54db59b21ae07cb1571901878050901126a70d078df9d1af4b94827f2"` [INFO] running `"docker" "rm" "-f" "321fe3c54db59b21ae07cb1571901878050901126a70d078df9d1af4b94827f2"` [INFO] [stdout] 321fe3c54db59b21ae07cb1571901878050901126a70d078df9d1af4b94827f2