[INFO] updating cached repository michel4ngel0/minesweeper [INFO] running `"git" "fetch" "--all"` [INFO] [stdout] Fetching origin [INFO] [stderr] From git://github.com/michel4ngel0/minesweeper [INFO] [stderr] * branch HEAD -> FETCH_HEAD [INFO] running `"git" "clone" "work/cache/sources/gh/michel4ngel0/minesweeper" "work/ex/clippy-test-run/sources/stable/gh/michel4ngel0/minesweeper"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable/gh/michel4ngel0/minesweeper'... [INFO] [stderr] done. [INFO] running `"git" "clone" "work/cache/sources/gh/michel4ngel0/minesweeper" "work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/michel4ngel0/minesweeper"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/michel4ngel0/minesweeper'... [INFO] [stderr] done. [INFO] running `"git" "rev-parse" "HEAD"` [INFO] [stdout] 3a891392c8fdc90db521145b5027a63b7654eb94 [INFO] sha for GitHub repo michel4ngel0/minesweeper: 3a891392c8fdc90db521145b5027a63b7654eb94 [INFO] validating manifest of michel4ngel0/minesweeper 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 michel4ngel0/minesweeper 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 michel4ngel0/minesweeper [INFO] finished frobbing michel4ngel0/minesweeper [INFO] frobbed toml for michel4ngel0/minesweeper written to work/ex/clippy-test-run/sources/stable/gh/michel4ngel0/minesweeper/Cargo.toml [INFO] started frobbing michel4ngel0/minesweeper [INFO] finished frobbing michel4ngel0/minesweeper [INFO] frobbed toml for michel4ngel0/minesweeper written to work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/michel4ngel0/minesweeper/Cargo.toml [INFO] crate michel4ngel0/minesweeper 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 michel4ngel0/minesweeper against stable for clippy-test-run [INFO] running `"docker" "create" "-v" "/mnt/big/crater/work/local/target-dirs/clippy-test-run/worker-6/stable:/opt/crater/target:rw,Z" "-v" "/mnt/big/crater/work/ex/clippy-test-run/sources/stable/gh/michel4ngel0/minesweeper:/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] 22a2e59d6306c2fcfd0ec90ef2089e5cce0d0f0c07953d60e486fa9d8e6a70e9 [INFO] running `"docker" "start" "-a" "22a2e59d6306c2fcfd0ec90ef2089e5cce0d0f0c07953d60e486fa9d8e6a70e9"` [INFO] [stderr] Checking minesweeper v0.1.0 (/opt/crater/workdir) [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/main.rs:96:13 [INFO] [stderr] | [INFO] [stderr] 96 | x: x, [INFO] [stderr] | ^^^^ help: replace it with: `x` [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/main.rs:97:13 [INFO] [stderr] | [INFO] [stderr] 97 | y: y, [INFO] [stderr] | ^^^^ help: replace it with: `y` [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/main.rs:101:13 [INFO] [stderr] | [INFO] [stderr] 101 | fields: fields, [INFO] [stderr] | ^^^^^^^^^^^^^^ help: replace it with: `fields` [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/main.rs:102:13 [INFO] [stderr] | [INFO] [stderr] 102 | mine_counter: mine_counter [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `mine_counter` [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/main.rs:96:13 [INFO] [stderr] | [INFO] [stderr] 96 | x: x, [INFO] [stderr] | ^^^^ help: replace it with: `x` [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/main.rs:97:13 [INFO] [stderr] | [INFO] [stderr] 97 | y: y, [INFO] [stderr] | ^^^^ help: replace it with: `y` [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/main.rs:101:13 [INFO] [stderr] | [INFO] [stderr] 101 | fields: fields, [INFO] [stderr] | ^^^^^^^^^^^^^^ help: replace it with: `fields` [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/main.rs:102:13 [INFO] [stderr] | [INFO] [stderr] 102 | mine_counter: mine_counter [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `mine_counter` [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/main.rs:95:9 [INFO] [stderr] | [INFO] [stderr] 95 | / return Board { [INFO] [stderr] 96 | | x: x, [INFO] [stderr] 97 | | y: y, [INFO] [stderr] 98 | | cursor_x: x / 2, [INFO] [stderr] ... | [INFO] [stderr] 102 | | mine_counter: mine_counter [INFO] [stderr] 103 | | }; [INFO] [stderr] | |__________^ [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] help: remove `return` as shown [INFO] [stderr] | [INFO] [stderr] 95 | Board { [INFO] [stderr] 96 | x: x, [INFO] [stderr] 97 | y: y, [INFO] [stderr] 98 | cursor_x: x / 2, [INFO] [stderr] 99 | cursor_y: y / 2, [INFO] [stderr] 100 | left_to_reveal: (x * y) as i32 - bombs as i32, [INFO] [stderr] ... [INFO] [stderr] [INFO] [stderr] warning: unneeded return statement [INFO] [stderr] --> src/main.rs:205:5 [INFO] [stderr] | [INFO] [stderr] 205 | return character[0] as char; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove `return` as shown: `character[0] as char` [INFO] [stderr] | [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/main.rs:95:9 [INFO] [stderr] | [INFO] [stderr] 95 | / return Board { [INFO] [stderr] 96 | | x: x, [INFO] [stderr] 97 | | y: y, [INFO] [stderr] 98 | | cursor_x: x / 2, [INFO] [stderr] ... | [INFO] [stderr] 102 | | mine_counter: mine_counter [INFO] [stderr] 103 | | }; [INFO] [stderr] | |__________^ [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] help: remove `return` as shown [INFO] [stderr] | [INFO] [stderr] 95 | Board { [INFO] [stderr] 96 | x: x, [INFO] [stderr] 97 | y: y, [INFO] [stderr] 98 | cursor_x: x / 2, [INFO] [stderr] 99 | cursor_y: y / 2, [INFO] [stderr] 100 | left_to_reveal: (x * y) as i32 - bombs as i32, [INFO] [stderr] ... [INFO] [stderr] [INFO] [stderr] warning: unneeded return statement [INFO] [stderr] --> src/main.rs:205:5 [INFO] [stderr] | [INFO] [stderr] 205 | return character[0] as char; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove `return` as shown: `character[0] as char` [INFO] [stderr] | [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 `j` is used to index `mine_counter` [INFO] [stderr] --> src/main.rs:81:22 [INFO] [stderr] | [INFO] [stderr] 81 | for j in 0..y { [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] 81 | for (j, ) in mine_counter.iter_mut().enumerate().take(y) { [INFO] [stderr] | ^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: casting character literal to u8. `char`s are 4 bytes wide in rust, so casting to u8 truncates them [INFO] [stderr] --> src/main.rs:108:26 [INFO] [stderr] | [INFO] [stderr] 108 | (num as u8 + '0' as u8) as char [INFO] [stderr] | ^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::char_lit_as_u8)] on by default [INFO] [stderr] = help: Consider using a byte literal instead: [INFO] [stderr] b'0' [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#char_lit_as_u8 [INFO] [stderr] [INFO] [stderr] error: handle read amount returned or use `Read::read_exact` instead [INFO] [stderr] --> src/main.rs:203:5 [INFO] [stderr] | [INFO] [stderr] 203 | / io::stdin().read(&mut character) [INFO] [stderr] 204 | | .expect("Failed to read input"); [INFO] [stderr] | |_______________________________________^ [INFO] [stderr] | [INFO] [stderr] = note: #[deny(clippy::unused_io_amount)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_io_amount [INFO] [stderr] [INFO] [stderr] error: aborting due to previous error [INFO] [stderr] [INFO] [stderr] error: Could not compile `minesweeper`. [INFO] [stderr] warning: build failed, waiting for other jobs to finish... [INFO] [stderr] warning: the loop variable `j` is used to index `mine_counter` [INFO] [stderr] --> src/main.rs:81:22 [INFO] [stderr] | [INFO] [stderr] 81 | for j in 0..y { [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] 81 | for (j, ) in mine_counter.iter_mut().enumerate().take(y) { [INFO] [stderr] | ^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: casting character literal to u8. `char`s are 4 bytes wide in rust, so casting to u8 truncates them [INFO] [stderr] --> src/main.rs:108:26 [INFO] [stderr] | [INFO] [stderr] 108 | (num as u8 + '0' as u8) as char [INFO] [stderr] | ^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::char_lit_as_u8)] on by default [INFO] [stderr] = help: Consider using a byte literal instead: [INFO] [stderr] b'0' [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#char_lit_as_u8 [INFO] [stderr] [INFO] [stderr] error: handle read amount returned or use `Read::read_exact` instead [INFO] [stderr] --> src/main.rs:203:5 [INFO] [stderr] | [INFO] [stderr] 203 | / io::stdin().read(&mut character) [INFO] [stderr] 204 | | .expect("Failed to read input"); [INFO] [stderr] | |_______________________________________^ [INFO] [stderr] | [INFO] [stderr] = note: #[deny(clippy::unused_io_amount)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_io_amount [INFO] [stderr] [INFO] [stderr] error: aborting due to previous error [INFO] [stderr] [INFO] [stderr] error: Could not compile `minesweeper`. [INFO] [stderr] [INFO] [stderr] To learn more, run the command again with --verbose. [INFO] running `"docker" "inspect" "22a2e59d6306c2fcfd0ec90ef2089e5cce0d0f0c07953d60e486fa9d8e6a70e9"` [INFO] running `"docker" "rm" "-f" "22a2e59d6306c2fcfd0ec90ef2089e5cce0d0f0c07953d60e486fa9d8e6a70e9"` [INFO] [stdout] 22a2e59d6306c2fcfd0ec90ef2089e5cce0d0f0c07953d60e486fa9d8e6a70e9