[INFO] updating cached repository pierrechevalier83/chess-rs [INFO] running `"git" "fetch" "--all"` [INFO] [stdout] Fetching origin [INFO] [stderr] From git://github.com/pierrechevalier83/chess-rs [INFO] [stderr] * branch HEAD -> FETCH_HEAD [INFO] running `"git" "clone" "work/cache/sources/gh/pierrechevalier83/chess-rs" "work/ex/clippy-test-run/sources/stable/gh/pierrechevalier83/chess-rs"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable/gh/pierrechevalier83/chess-rs'... [INFO] [stderr] done. [INFO] running `"git" "clone" "work/cache/sources/gh/pierrechevalier83/chess-rs" "work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/pierrechevalier83/chess-rs"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/pierrechevalier83/chess-rs'... [INFO] [stderr] done. [INFO] running `"git" "rev-parse" "HEAD"` [INFO] [stdout] cb808de3ce3728138286d989a70d00ef2c3f8468 [INFO] sha for GitHub repo pierrechevalier83/chess-rs: cb808de3ce3728138286d989a70d00ef2c3f8468 [INFO] validating manifest of pierrechevalier83/chess-rs 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 pierrechevalier83/chess-rs 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 pierrechevalier83/chess-rs [INFO] finished frobbing pierrechevalier83/chess-rs [INFO] frobbed toml for pierrechevalier83/chess-rs written to work/ex/clippy-test-run/sources/stable/gh/pierrechevalier83/chess-rs/Cargo.toml [INFO] started frobbing pierrechevalier83/chess-rs [INFO] finished frobbing pierrechevalier83/chess-rs [INFO] frobbed toml for pierrechevalier83/chess-rs written to work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/pierrechevalier83/chess-rs/Cargo.toml [INFO] crate pierrechevalier83/chess-rs 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 pierrechevalier83/chess-rs against stable for clippy-test-run [INFO] running `"docker" "create" "-v" "/mnt/big/crater/work/local/target-dirs/clippy-test-run/worker-2/stable:/opt/crater/target:rw,Z" "-v" "/mnt/big/crater/work/ex/clippy-test-run/sources/stable/gh/pierrechevalier83/chess-rs:/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] 584788ac5b7e5d0c2b0aad0dca3aed62a435d3423911cad13da414e1bb96bbdf [INFO] running `"docker" "start" "-a" "584788ac5b7e5d0c2b0aad0dca3aed62a435d3423911cad13da414e1bb96bbdf"` [INFO] [stderr] Compiling rand v0.4.2 [INFO] [stderr] Checking termion v1.5.1 [INFO] [stderr] Checking matrix_display v0.9.0 [INFO] [stderr] Compiling rand v0.3.22 [INFO] [stderr] Compiling chess v0.4.2 [INFO] [stderr] Checking chess-rs v0.1.0 (/opt/crater/workdir) [INFO] [stderr] warning: returning the result of a let binding from a block. Consider returning the expression directly. [INFO] [stderr] --> src/main.rs:134:5 [INFO] [stderr] | [INFO] [stderr] 134 | sq [INFO] [stderr] | ^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::let_and_return)] on by default [INFO] [stderr] note: this expression can be directly returned [INFO] [stderr] --> src/main.rs:130:14 [INFO] [stderr] | [INFO] [stderr] 130 | let sq = chess::Square::make_square( [INFO] [stderr] | ______________^ [INFO] [stderr] 131 | | chess::Rank::from_index(chess::NUM_RANKS - 1 - pos.1), [INFO] [stderr] 132 | | chess::File::from_index(pos.0), [INFO] [stderr] 133 | | ); [INFO] [stderr] | |_____^ [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stderr] [INFO] [stderr] warning: returning the result of a let binding from a block. Consider returning the expression directly. [INFO] [stderr] --> src/main.rs:134:5 [INFO] [stderr] | [INFO] [stderr] 134 | sq [INFO] [stderr] | ^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::let_and_return)] on by default [INFO] [stderr] note: this expression can be directly returned [INFO] [stderr] --> src/main.rs:130:14 [INFO] [stderr] | [INFO] [stderr] 130 | let sq = chess::Square::make_square( [INFO] [stderr] | ______________^ [INFO] [stderr] 131 | | chess::Rank::from_index(chess::NUM_RANKS - 1 - pos.1), [INFO] [stderr] 132 | | chess::File::from_index(pos.0), [INFO] [stderr] 133 | | ); [INFO] [stderr] | |_____^ [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stderr] [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/main.rs:30:48 [INFO] [stderr] | [INFO] [stderr] 30 | fn square_bg(square: chess::Square, selection: &Option) -> AnsiColor { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^ help: consider passing by value instead: `Option` [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/main.rs:80:11 [INFO] [stderr] | [INFO] [stderr] 80 | rank: &chess::Rank, [INFO] [stderr] | ^^^^^^^^^^^^ help: consider passing by value instead: `chess::Rank` [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/main.rs:81:16 [INFO] [stderr] | [INFO] [stderr] 81 | selection: &Option, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^ help: consider passing by value instead: `Option` [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/main.rs:98:16 [INFO] [stderr] | [INFO] [stderr] 98 | selection: &Option, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^ help: consider passing by value instead: `Option` [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/main.rs:140:16 [INFO] [stderr] | [INFO] [stderr] 140 | selection: &Option, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^ help: consider passing by value instead: `Option` [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: you seem to be trying to use match for destructuring a single pattern. Consider using `if let` [INFO] [stderr] --> src/main.rs:158:33 [INFO] [stderr] | [INFO] [stderr] 158 | Event::Mouse(me) => match me { [INFO] [stderr] | _________________________________^ [INFO] [stderr] 159 | | MouseEvent::Press(_, x, y) => { [INFO] [stderr] 160 | | let square = click_to_square((x, y)); [INFO] [stderr] 161 | | match selection { [INFO] [stderr] ... | [INFO] [stderr] 178 | | _ => (), [INFO] [stderr] 179 | | }, [INFO] [stderr] | |_____________^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::single_match)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stderr] help: try this [INFO] [stderr] | [INFO] [stderr] 158 | Event::Mouse(me) => if let MouseEvent::Press(_, x, y) = me { [INFO] [stderr] 159 | let square = click_to_square((x, y)); [INFO] [stderr] 160 | match selection { [INFO] [stderr] 161 | Some(previous_selection) => { [INFO] [stderr] 162 | let attempted_move = [INFO] [stderr] 163 | chess::ChessMove::new(previous_selection, square, None); [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/main.rs:30:48 [INFO] [stderr] | [INFO] [stderr] 30 | fn square_bg(square: chess::Square, selection: &Option) -> AnsiColor { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^ help: consider passing by value instead: `Option` [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/main.rs:80:11 [INFO] [stderr] | [INFO] [stderr] 80 | rank: &chess::Rank, [INFO] [stderr] | ^^^^^^^^^^^^ help: consider passing by value instead: `chess::Rank` [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/main.rs:81:16 [INFO] [stderr] | [INFO] [stderr] 81 | selection: &Option, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^ help: consider passing by value instead: `Option` [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/main.rs:98:16 [INFO] [stderr] | [INFO] [stderr] 98 | selection: &Option, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^ help: consider passing by value instead: `Option` [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/main.rs:140:16 [INFO] [stderr] | [INFO] [stderr] 140 | selection: &Option, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^ help: consider passing by value instead: `Option` [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: you seem to be trying to use match for destructuring a single pattern. Consider using `if let` [INFO] [stderr] --> src/main.rs:158:33 [INFO] [stderr] | [INFO] [stderr] 158 | Event::Mouse(me) => match me { [INFO] [stderr] | _________________________________^ [INFO] [stderr] 159 | | MouseEvent::Press(_, x, y) => { [INFO] [stderr] 160 | | let square = click_to_square((x, y)); [INFO] [stderr] 161 | | match selection { [INFO] [stderr] ... | [INFO] [stderr] 178 | | _ => (), [INFO] [stderr] 179 | | }, [INFO] [stderr] | |_____________^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::single_match)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stderr] help: try this [INFO] [stderr] | [INFO] [stderr] 158 | Event::Mouse(me) => if let MouseEvent::Press(_, x, y) = me { [INFO] [stderr] 159 | let square = click_to_square((x, y)); [INFO] [stderr] 160 | match selection { [INFO] [stderr] 161 | Some(previous_selection) => { [INFO] [stderr] 162 | let attempted_move = [INFO] [stderr] 163 | chess::ChessMove::new(previous_selection, square, None); [INFO] [stderr] ... [INFO] [stderr] [INFO] [stderr] Finished dev [unoptimized + debuginfo] target(s) in 4m 00s [INFO] running `"docker" "inspect" "584788ac5b7e5d0c2b0aad0dca3aed62a435d3423911cad13da414e1bb96bbdf"` [INFO] running `"docker" "rm" "-f" "584788ac5b7e5d0c2b0aad0dca3aed62a435d3423911cad13da414e1bb96bbdf"` [INFO] [stdout] 584788ac5b7e5d0c2b0aad0dca3aed62a435d3423911cad13da414e1bb96bbdf