[INFO] updating cached repository AlexisVisco/Snake [INFO] running `"git" "fetch" "--all"` [INFO] [stdout] Fetching origin [INFO] [stderr] From git://github.com/AlexisVisco/Snake [INFO] [stderr] * branch HEAD -> FETCH_HEAD [INFO] running `"git" "clone" "work/cache/sources/gh/AlexisVisco/Snake" "work/ex/clippy-test-run/sources/stable/gh/AlexisVisco/Snake"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable/gh/AlexisVisco/Snake'... [INFO] [stderr] done. [INFO] running `"git" "clone" "work/cache/sources/gh/AlexisVisco/Snake" "work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/AlexisVisco/Snake"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/AlexisVisco/Snake'... [INFO] [stderr] done. [INFO] running `"git" "rev-parse" "HEAD"` [INFO] [stdout] d7e5e9f76dbc374e9d2c1e4e7e79fa8986e43258 [INFO] sha for GitHub repo AlexisVisco/Snake: d7e5e9f76dbc374e9d2c1e4e7e79fa8986e43258 [INFO] validating manifest of AlexisVisco/Snake 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 AlexisVisco/Snake 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 AlexisVisco/Snake [INFO] finished frobbing AlexisVisco/Snake [INFO] frobbed toml for AlexisVisco/Snake written to work/ex/clippy-test-run/sources/stable/gh/AlexisVisco/Snake/Cargo.toml [INFO] started frobbing AlexisVisco/Snake [INFO] finished frobbing AlexisVisco/Snake [INFO] frobbed toml for AlexisVisco/Snake written to work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/AlexisVisco/Snake/Cargo.toml [INFO] crate AlexisVisco/Snake has a lockfile. skipping [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+stable" "fetch" "--locked" "--manifest-path" "Cargo.toml"` [INFO] [stderr] Blocking waiting for file lock on the registry index [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+stable" "fetch" "--locked" "--manifest-path" "Cargo.toml"` [INFO] linting AlexisVisco/Snake 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/AlexisVisco/Snake:/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] 0484a4054e80abcbd9ffc81e2b5dcf814b4f579e7ffa66b7473c0c7b90ed9aaa [INFO] running `"docker" "start" "-a" "0484a4054e80abcbd9ffc81e2b5dcf814b4f579e7ffa66b7473c0c7b90ed9aaa"` [INFO] [stderr] Checking Snake v0.1.0 (/opt/crater/workdir) [INFO] [stderr] warning: crate `Snake` should have a snake case name such as `snake` [INFO] [stderr] | [INFO] [stderr] warning: crate `Snake` should have a snake case name such as `snake` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(non_snake_case)] on by default [INFO] [stderr] [INFO] [stderr] warning: casting i32 to f64 may become silently lossy if types change [INFO] [stderr] --> src/draw.rs:7:15 [INFO] [stderr] | [INFO] [stderr] 7 | BLOCK_SIZE * (coord as f64) [INFO] [stderr] | ^^^^^^^^^^^^^^ help: try: `f64::from(coord)` [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: casting i32 to f64 may become silently lossy if types change [INFO] [stderr] --> src/draw.rs:25:41 [INFO] [stderr] | [INFO] [stderr] 25 | rectangle(color, [mx, my, BLOCK_SIZE * (w as f64), BLOCK_SIZE * (h as f64)], con.transform, g2d); [INFO] [stderr] | ^^^^^^^^^^ help: try: `f64::from(w)` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless [INFO] [stderr] [INFO] [stderr] warning: casting i32 to f64 may become silently lossy if types change [INFO] [stderr] --> src/draw.rs:25:66 [INFO] [stderr] | [INFO] [stderr] 25 | rectangle(color, [mx, my, BLOCK_SIZE * (w as f64), BLOCK_SIZE * (h as f64)], con.transform, g2d); [INFO] [stderr] | ^^^^^^^^^^ help: try: `f64::from(h)` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless [INFO] [stderr] [INFO] [stderr] = note: #[warn(non_snake_case)] on by default [INFO] [stderr] [INFO] [stderr] warning: casting i32 to f64 may become silently lossy if types change [INFO] [stderr] --> src/draw.rs:7:15 [INFO] [stderr] | [INFO] [stderr] 7 | BLOCK_SIZE * (coord as f64) [INFO] [stderr] | ^^^^^^^^^^^^^^ help: try: `f64::from(coord)` [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/snake.rs:18:18 [INFO] [stderr] | [INFO] [stderr] 18 | pub fn opposite(&self) -> Direction { [INFO] [stderr] | ^^^^^ help: consider passing by value instead: `self` [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: casting i32 to f64 may become silently lossy if types change [INFO] [stderr] --> src/draw.rs:25:41 [INFO] [stderr] | [INFO] [stderr] 25 | rectangle(color, [mx, my, BLOCK_SIZE * (w as f64), BLOCK_SIZE * (h as f64)], con.transform, g2d); [INFO] [stderr] | ^^^^^^^^^^ help: try: `f64::from(w)` [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/snake.rs:27:14 [INFO] [stderr] | [INFO] [stderr] 27 | pub fn plus(&self) -> (i32, i32) { [INFO] [stderr] | ^^^^^ help: consider passing by value instead: `self` [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: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/snake.rs:36:20 [INFO] [stderr] | [INFO] [stderr] 36 | pub fn plus_tuple(&self, coords: (i32, i32)) -> (i32, i32) { [INFO] [stderr] | ^^^^^ help: consider passing by value instead: `self` [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: the operation is ineffective. Consider reducing it to `coords.0` [INFO] [stderr] --> src/snake.rs:38:25 [INFO] [stderr] | [INFO] [stderr] 38 | Direction::Up => (coords.0 + 0 , coords.1 + (-1)), [INFO] [stderr] | ^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::identity_op)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stderr] [INFO] [stderr] warning: the operation is ineffective. Consider reducing it to `coords.0` [INFO] [stderr] --> src/snake.rs:39:25 [INFO] [stderr] | [INFO] [stderr] 39 | Direction::Down => (coords.0 + 0 , coords.1 + 1), [INFO] [stderr] | ^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless [INFO] [stderr] [INFO] [stderr] warning: casting i32 to f64 may become silently lossy if types change [INFO] [stderr] --> src/draw.rs:25:66 [INFO] [stderr] | [INFO] [stderr] 25 | rectangle(color, [mx, my, BLOCK_SIZE * (w as f64), BLOCK_SIZE * (h as f64)], con.transform, g2d); [INFO] [stderr] | ^^^^^^^^^^ help: try: `f64::from(h)` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stderr] [INFO] [stderr] warning: the operation is ineffective. Consider reducing it to `coords.1` [INFO] [stderr] --> src/snake.rs:40:43 [INFO] [stderr] | [INFO] [stderr] 40 | Direction::Left => (coords.0 + (-1) , coords.1 + 0), [INFO] [stderr] | ^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless [INFO] [stderr] [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/snake.rs:18:18 [INFO] [stderr] | [INFO] [stderr] 18 | pub fn opposite(&self) -> Direction { [INFO] [stderr] | ^^^^^ help: consider passing by value instead: `self` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stderr] [INFO] [stderr] warning: the operation is ineffective. Consider reducing it to `coords.1` [INFO] [stderr] --> src/snake.rs:41:43 [INFO] [stderr] | [INFO] [stderr] 41 | Direction::Right => (coords.0 + 1 , coords.1 + 0), [INFO] [stderr] | ^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stderr] [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/snake.rs:45:20 [INFO] [stderr] | [INFO] [stderr] 45 | fn block_from_pos(&self, coords: (i32, i32)) -> Block { [INFO] [stderr] | ^^^^^ help: consider passing by value instead: `self` [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: the variable `ch` is used as a loop counter. Consider using `for (ch, item) in &self.body.enumerate()` or similar iterators [INFO] [stderr] --> src/snake.rs:127:16 [INFO] [stderr] | [INFO] [stderr] 127 | for block in &self.body { [INFO] [stderr] | ^^^^^^^^^^ [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/snake.rs:27:14 [INFO] [stderr] | [INFO] [stderr] 27 | pub fn plus(&self) -> (i32, i32) { [INFO] [stderr] | ^^^^^ help: consider passing by value instead: `self` [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: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/snake.rs:36:20 [INFO] [stderr] | [INFO] [stderr] 36 | pub fn plus_tuple(&self, coords: (i32, i32)) -> (i32, i32) { [INFO] [stderr] | ^^^^^ help: consider passing by value instead: `self` [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: the operation is ineffective. Consider reducing it to `coords.0` [INFO] [stderr] --> src/snake.rs:38:25 [INFO] [stderr] | [INFO] [stderr] 38 | Direction::Up => (coords.0 + 0 , coords.1 + (-1)), [INFO] [stderr] | ^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::identity_op)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stderr] [INFO] [stderr] warning: the operation is ineffective. Consider reducing it to `coords.0` [INFO] [stderr] --> src/snake.rs:39:25 [INFO] [stderr] | [INFO] [stderr] 39 | Direction::Down => (coords.0 + 0 , coords.1 + 1), [INFO] [stderr] | ^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stderr] [INFO] [stderr] warning: the operation is ineffective. Consider reducing it to `coords.1` [INFO] [stderr] --> src/snake.rs:40:43 [INFO] [stderr] | [INFO] [stderr] 40 | Direction::Left => (coords.0 + (-1) , coords.1 + 0), [INFO] [stderr] | ^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stderr] [INFO] [stderr] warning: the operation is ineffective. Consider reducing it to `coords.1` [INFO] [stderr] --> src/snake.rs:41:43 [INFO] [stderr] | [INFO] [stderr] 41 | Direction::Right => (coords.0 + 1 , coords.1 + 0), [INFO] [stderr] | ^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stderr] [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/snake.rs:45:20 [INFO] [stderr] | [INFO] [stderr] 45 | fn block_from_pos(&self, coords: (i32, i32)) -> Block { [INFO] [stderr] | ^^^^^ help: consider passing by value instead: `self` [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: the variable `ch` is used as a loop counter. Consider using `for (ch, item) in &self.body.enumerate()` or similar iterators [INFO] [stderr] --> src/snake.rs:127:16 [INFO] [stderr] | [INFO] [stderr] 127 | for block in &self.body { [INFO] [stderr] | ^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::explicit_counter_loop)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stderr] [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::explicit_counter_loop)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stderr] [INFO] [stderr] Finished dev [unoptimized + debuginfo] target(s) in 8.77s [INFO] running `"docker" "inspect" "0484a4054e80abcbd9ffc81e2b5dcf814b4f579e7ffa66b7473c0c7b90ed9aaa"` [INFO] running `"docker" "rm" "-f" "0484a4054e80abcbd9ffc81e2b5dcf814b4f579e7ffa66b7473c0c7b90ed9aaa"` [INFO] [stdout] 0484a4054e80abcbd9ffc81e2b5dcf814b4f579e7ffa66b7473c0c7b90ed9aaa