[INFO] updating cached repository kogai/lifegame [INFO] running `"git" "fetch" "--all"` [INFO] [stdout] Fetching origin [INFO] [stderr] From git://github.com/kogai/lifegame [INFO] [stderr] * branch HEAD -> FETCH_HEAD [INFO] running `"git" "clone" "work/cache/sources/gh/kogai/lifegame" "work/ex/clippy-test-run/sources/stable/gh/kogai/lifegame"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable/gh/kogai/lifegame'... [INFO] [stderr] done. [INFO] running `"git" "clone" "work/cache/sources/gh/kogai/lifegame" "work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/kogai/lifegame"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/kogai/lifegame'... [INFO] [stderr] done. [INFO] running `"git" "rev-parse" "HEAD"` [INFO] [stdout] c676fd8021f05384e22f47d9de0b88a837aef0da [INFO] sha for GitHub repo kogai/lifegame: c676fd8021f05384e22f47d9de0b88a837aef0da [INFO] validating manifest of kogai/lifegame 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 kogai/lifegame 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 kogai/lifegame [INFO] finished frobbing kogai/lifegame [INFO] frobbed toml for kogai/lifegame written to work/ex/clippy-test-run/sources/stable/gh/kogai/lifegame/Cargo.toml [INFO] started frobbing kogai/lifegame [INFO] finished frobbing kogai/lifegame [INFO] frobbed toml for kogai/lifegame written to work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/kogai/lifegame/Cargo.toml [INFO] crate kogai/lifegame 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 kogai/lifegame 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-4/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/gh/kogai/lifegame:/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] 40a987516f3da3ad4df723f4aa5d7a8f2e3d8cfc790f82797c0124afa8b57884 [INFO] running `"docker" "start" "-a" "40a987516f3da3ad4df723f4aa5d7a8f2e3d8cfc790f82797c0124afa8b57884"` [INFO] [stderr] Checking lifegame v0.1.0 (/opt/crater/workdir) [INFO] [stderr] warning: you don't need to add `&` to all patterns [INFO] [stderr] --> src/world.rs:21:9 [INFO] [stderr] | [INFO] [stderr] 21 | / match self { [INFO] [stderr] 22 | | &Alive(_) => "x", [INFO] [stderr] 23 | | &Death(_) => " ", [INFO] [stderr] 24 | | } [INFO] [stderr] | |_____________^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::match_ref_pats)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stderr] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stderr] | [INFO] [stderr] 21 | match *self { [INFO] [stderr] 22 | Alive(_) => "x", [INFO] [stderr] 23 | Death(_) => " ", [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: you don't need to add `&` to all patterns [INFO] [stderr] --> src/world.rs:30:9 [INFO] [stderr] | [INFO] [stderr] 30 | / match self { [INFO] [stderr] 31 | | &Alive(_) => true, [INFO] [stderr] 32 | | &Death(_) => false, [INFO] [stderr] 33 | | } [INFO] [stderr] | |_________^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stderr] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stderr] | [INFO] [stderr] 30 | match *self { [INFO] [stderr] 31 | Alive(_) => true, [INFO] [stderr] 32 | Death(_) => false, [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: writing `&Vec<_>` instead of `&[_]` involves one more reference and cannot be used with non-Vec-based slices. [INFO] [stderr] --> src/world.rs:36:33 [INFO] [stderr] | [INFO] [stderr] 36 | fn should_live(&self, grid: &Matrix) -> bool { [INFO] [stderr] | ^^^^^^^^^^^^^ help: change this to: `&[Cell]` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::ptr_arg)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stderr] [INFO] [stderr] warning: you don't need to add `&` to all patterns [INFO] [stderr] --> src/world.rs:38:9 [INFO] [stderr] | [INFO] [stderr] 38 | / match self { [INFO] [stderr] 39 | | &Alive((x, y)) | &Death((x, y)) => { [INFO] [stderr] 40 | | let arround = vec![(-1, -1), (0, -1), (1, -1), (-1, 0), (1, 0), (-1, 1), (0, 1), [INFO] [stderr] 41 | | (1, 1)]; [INFO] [stderr] ... | [INFO] [stderr] 61 | | } [INFO] [stderr] 62 | | } [INFO] [stderr] | |_________^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stderr] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stderr] | [INFO] [stderr] 38 | match *self { [INFO] [stderr] 39 | Alive((x, y)) | Death((x, y)) => { [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: called `.iter().nth()` on a slice. Calling `.get()` is both faster and more readable [INFO] [stderr] --> src/world.rs:44:44 [INFO] [stderr] | [INFO] [stderr] 44 | if let Some(row) = grid.iter().nth((y + pos_y) as usize) { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::iter_nth)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth [INFO] [stderr] [INFO] [stderr] warning: called `.iter().nth()` on a slice. Calling `.get()` is both faster and more readable [INFO] [stderr] --> src/world.rs:45:49 [INFO] [stderr] | [INFO] [stderr] 45 | if let Some(cell) = row.iter().nth((x + pos_x) as usize) { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth [INFO] [stderr] [INFO] [stderr] warning: using `clone` on a `Copy` type [INFO] [stderr] --> src/world.rs:54:70 [INFO] [stderr] | [INFO] [stderr] 54 | let alives: Vec = lifes.into_iter().filter(|x| x.clone()).collect(); [INFO] [stderr] | ^^^^^^^^^ help: try dereferencing it: `*x` [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: you don't need to add `&` to all patterns [INFO] [stderr] --> src/world.rs:99:25 [INFO] [stderr] | [INFO] [stderr] 99 | / match x { [INFO] [stderr] 100 | | &Cell::Alive(cell) | [INFO] [stderr] 101 | | &Cell::Death(cell) => Cell::alive(cell), [INFO] [stderr] 102 | | } [INFO] [stderr] | |_________________________^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stderr] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stderr] | [INFO] [stderr] 99 | match *x { [INFO] [stderr] 100 | Cell::Alive(cell) | [INFO] [stderr] 101 | Cell::Death(cell) => Cell::alive(cell), [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: you don't need to add `&` to all patterns [INFO] [stderr] --> src/world.rs:104:25 [INFO] [stderr] | [INFO] [stderr] 104 | / match x { [INFO] [stderr] 105 | | &Cell::Alive(cell) | [INFO] [stderr] 106 | | &Cell::Death(cell) => Cell::death(cell), [INFO] [stderr] 107 | | } [INFO] [stderr] | |_________________________^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stderr] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stderr] | [INFO] [stderr] 104 | match *x { [INFO] [stderr] 105 | Cell::Alive(cell) | [INFO] [stderr] 106 | Cell::Death(cell) => Cell::death(cell), [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: you don't need to add `&` to all patterns [INFO] [stderr] --> src/world.rs:21:9 [INFO] [stderr] | [INFO] [stderr] 21 | / match self { [INFO] [stderr] 22 | | &Alive(_) => "x", [INFO] [stderr] 23 | | &Death(_) => " ", [INFO] [stderr] 24 | | } [INFO] [stderr] | |_____________^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::match_ref_pats)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stderr] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stderr] | [INFO] [stderr] 21 | match *self { [INFO] [stderr] 22 | Alive(_) => "x", [INFO] [stderr] 23 | Death(_) => " ", [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: you don't need to add `&` to all patterns [INFO] [stderr] --> src/world.rs:30:9 [INFO] [stderr] | [INFO] [stderr] 30 | / match self { [INFO] [stderr] 31 | | &Alive(_) => true, [INFO] [stderr] 32 | | &Death(_) => false, [INFO] [stderr] 33 | | } [INFO] [stderr] | |_________^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stderr] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stderr] | [INFO] [stderr] 30 | match *self { [INFO] [stderr] 31 | Alive(_) => true, [INFO] [stderr] 32 | Death(_) => false, [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: writing `&Vec<_>` instead of `&[_]` involves one more reference and cannot be used with non-Vec-based slices. [INFO] [stderr] --> src/world.rs:36:33 [INFO] [stderr] | [INFO] [stderr] 36 | fn should_live(&self, grid: &Matrix) -> bool { [INFO] [stderr] | ^^^^^^^^^^^^^ help: change this to: `&[Cell]` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::ptr_arg)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stderr] [INFO] [stderr] warning: you don't need to add `&` to all patterns [INFO] [stderr] --> src/world.rs:38:9 [INFO] [stderr] | [INFO] [stderr] 38 | / match self { [INFO] [stderr] 39 | | &Alive((x, y)) | &Death((x, y)) => { [INFO] [stderr] 40 | | let arround = vec![(-1, -1), (0, -1), (1, -1), (-1, 0), (1, 0), (-1, 1), (0, 1), [INFO] [stderr] 41 | | (1, 1)]; [INFO] [stderr] ... | [INFO] [stderr] 61 | | } [INFO] [stderr] 62 | | } [INFO] [stderr] | |_________^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stderr] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stderr] | [INFO] [stderr] 38 | match *self { [INFO] [stderr] 39 | Alive((x, y)) | Death((x, y)) => { [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: called `.iter().nth()` on a slice. Calling `.get()` is both faster and more readable [INFO] [stderr] --> src/world.rs:44:44 [INFO] [stderr] | [INFO] [stderr] 44 | if let Some(row) = grid.iter().nth((y + pos_y) as usize) { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::iter_nth)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth [INFO] [stderr] [INFO] [stderr] warning: called `.iter().nth()` on a slice. Calling `.get()` is both faster and more readable [INFO] [stderr] --> src/world.rs:45:49 [INFO] [stderr] | [INFO] [stderr] 45 | if let Some(cell) = row.iter().nth((x + pos_x) as usize) { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth [INFO] [stderr] [INFO] [stderr] warning: using `clone` on a `Copy` type [INFO] [stderr] --> src/world.rs:54:70 [INFO] [stderr] | [INFO] [stderr] 54 | let alives: Vec = lifes.into_iter().filter(|x| x.clone()).collect(); [INFO] [stderr] | ^^^^^^^^^ help: try dereferencing it: `*x` [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: you don't need to add `&` to all patterns [INFO] [stderr] --> src/world.rs:99:25 [INFO] [stderr] | [INFO] [stderr] 99 | / match x { [INFO] [stderr] 100 | | &Cell::Alive(cell) | [INFO] [stderr] 101 | | &Cell::Death(cell) => Cell::alive(cell), [INFO] [stderr] 102 | | } [INFO] [stderr] | |_________________________^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stderr] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stderr] | [INFO] [stderr] 99 | match *x { [INFO] [stderr] 100 | Cell::Alive(cell) | [INFO] [stderr] 101 | Cell::Death(cell) => Cell::alive(cell), [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: you don't need to add `&` to all patterns [INFO] [stderr] --> src/world.rs:104:25 [INFO] [stderr] | [INFO] [stderr] 104 | / match x { [INFO] [stderr] 105 | | &Cell::Alive(cell) | [INFO] [stderr] 106 | | &Cell::Death(cell) => Cell::death(cell), [INFO] [stderr] 107 | | } [INFO] [stderr] | |_________________________^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stderr] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stderr] | [INFO] [stderr] 104 | match *x { [INFO] [stderr] 105 | Cell::Alive(cell) | [INFO] [stderr] 106 | Cell::Death(cell) => Cell::death(cell), [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] Finished dev [unoptimized + debuginfo] target(s) in 0.68s [INFO] running `"docker" "inspect" "40a987516f3da3ad4df723f4aa5d7a8f2e3d8cfc790f82797c0124afa8b57884"` [INFO] running `"docker" "rm" "-f" "40a987516f3da3ad4df723f4aa5d7a8f2e3d8cfc790f82797c0124afa8b57884"` [INFO] [stdout] 40a987516f3da3ad4df723f4aa5d7a8f2e3d8cfc790f82797c0124afa8b57884