[INFO] updating cached repository RDDDIB/minirace [INFO] running `"git" "fetch" "--all"` [INFO] [stdout] Fetching origin [INFO] [stderr] From git://github.com/RDDDIB/minirace [INFO] [stderr] * branch HEAD -> FETCH_HEAD [INFO] running `"git" "clone" "work/cache/sources/gh/RDDDIB/minirace" "work/ex/clippy-test-run/sources/stable/gh/RDDDIB/minirace"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable/gh/RDDDIB/minirace'... [INFO] [stderr] done. [INFO] running `"git" "clone" "work/cache/sources/gh/RDDDIB/minirace" "work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/RDDDIB/minirace"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/RDDDIB/minirace'... [INFO] [stderr] done. [INFO] running `"git" "rev-parse" "HEAD"` [INFO] [stdout] 1cd5a864ac85c047fa2a249407b7d12dd0d007ec [INFO] sha for GitHub repo RDDDIB/minirace: 1cd5a864ac85c047fa2a249407b7d12dd0d007ec [INFO] validating manifest of RDDDIB/minirace 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 RDDDIB/minirace 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 RDDDIB/minirace [INFO] finished frobbing RDDDIB/minirace [INFO] frobbed toml for RDDDIB/minirace written to work/ex/clippy-test-run/sources/stable/gh/RDDDIB/minirace/Cargo.toml [INFO] started frobbing RDDDIB/minirace [INFO] finished frobbing RDDDIB/minirace [INFO] frobbed toml for RDDDIB/minirace written to work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/RDDDIB/minirace/Cargo.toml [INFO] crate RDDDIB/minirace 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 RDDDIB/minirace against stable for clippy-test-run [INFO] running `"docker" "create" "-v" "/mnt/big/crater/work/local/target-dirs/clippy-test-run/worker-5/stable:/opt/crater/target:rw,Z" "-v" "/mnt/big/crater/work/ex/clippy-test-run/sources/stable/gh/RDDDIB/minirace:/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] dfdc08d736e469e9f0736c875e06956c9a276e912b4dfeff4e87a3cc16e9a3b9 [INFO] running `"docker" "start" "-a" "dfdc08d736e469e9f0736c875e06956c9a276e912b4dfeff4e87a3cc16e9a3b9"` [INFO] [stderr] Checking race v0.1.0 (/opt/crater/workdir) [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/lib.rs:80:13 [INFO] [stderr] | [INFO] [stderr] 80 | name: name, [INFO] [stderr] | ^^^^^^^^^^ help: replace it with: `name` [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/lib.rs:85:13 [INFO] [stderr] | [INFO] [stderr] 85 | ai: ai, [INFO] [stderr] | ^^^^^^ help: replace it with: `ai` [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/lib.rs:80:13 [INFO] [stderr] | [INFO] [stderr] 80 | name: name, [INFO] [stderr] | ^^^^^^^^^^ help: replace it with: `name` [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/lib.rs:85:13 [INFO] [stderr] | [INFO] [stderr] 85 | ai: ai, [INFO] [stderr] | ^^^^^^ help: replace it with: `ai` [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: writing `&Vec<_>` instead of `&[_]` involves one more reference and cannot be used with non-Vec-based slices. [INFO] [stderr] --> src/lib.rs:106:39 [INFO] [stderr] | [INFO] [stderr] 106 | pub fn reset_hp(&mut self, turns: &Vec) { [INFO] [stderr] | ^^^^^^^^^^^ help: change this to: `&[isize]` [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: writing `&Vec<_>` instead of `&[_]` involves one more reference and cannot be used with non-Vec-based slices. [INFO] [stderr] --> src/lib.rs:135:42 [INFO] [stderr] | [INFO] [stderr] 135 | pub fn eval_difficulty(&self, turns: &Vec) -> isize { [INFO] [stderr] | ^^^^^^^^^^^ help: change this to: `&[isize]` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stderr] [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/lib.rs:144:42 [INFO] [stderr] | [INFO] [stderr] 144 | pub fn take_damage(&mut self, value: &isize) { [INFO] [stderr] | ^^^^^^ help: consider passing by value instead: `isize` [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: using `clone` on a `Copy` type [INFO] [stderr] --> src/lib.rs:145:20 [INFO] [stderr] | [INFO] [stderr] 145 | self.hp -= value.clone(); [INFO] [stderr] | ^^^^^^^^^^^^^ help: try dereferencing it: `*value` [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: writing `&Vec<_>` instead of `&[_]` involves one more reference and cannot be used with non-Vec-based slices. [INFO] [stderr] --> src/lib.rs:213:36 [INFO] [stderr] | [INFO] [stderr] 213 | pub fn next_turn(&self, turns: &Vec) -> isize { [INFO] [stderr] | ^^^^^^^^^^^ help: change this to: `&[isize]` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stderr] [INFO] [stderr] warning: using `clone` on a `Copy` type [INFO] [stderr] --> src/lib.rs:223:9 [INFO] [stderr] | [INFO] [stderr] 223 | ups.iter().max().unwrap().clone() [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*ups.iter().max().unwrap()` [INFO] [stderr] | [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: writing `&Vec<_>` instead of `&[_]` involves one more reference and cannot be used with non-Vec-based slices. [INFO] [stderr] --> src/lib.rs:233:40 [INFO] [stderr] | [INFO] [stderr] 233 | pub fn make_turn(&mut self, turns: &Vec) { [INFO] [stderr] | ^^^^^^^^^^^ help: change this to: `&[isize]` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [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/lib.rs:106:39 [INFO] [stderr] | [INFO] [stderr] 106 | pub fn reset_hp(&mut self, turns: &Vec) { [INFO] [stderr] | ^^^^^^^^^^^ help: change this to: `&[isize]` [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: writing `&Vec<_>` instead of `&[_]` involves one more reference and cannot be used with non-Vec-based slices. [INFO] [stderr] --> src/lib.rs:135:42 [INFO] [stderr] | [INFO] [stderr] 135 | pub fn eval_difficulty(&self, turns: &Vec) -> isize { [INFO] [stderr] | ^^^^^^^^^^^ help: change this to: `&[isize]` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stderr] [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/lib.rs:144:42 [INFO] [stderr] | [INFO] [stderr] 144 | pub fn take_damage(&mut self, value: &isize) { [INFO] [stderr] | ^^^^^^ help: consider passing by value instead: `isize` [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: using `clone` on a `Copy` type [INFO] [stderr] --> src/lib.rs:145:20 [INFO] [stderr] | [INFO] [stderr] 145 | self.hp -= value.clone(); [INFO] [stderr] | ^^^^^^^^^^^^^ help: try dereferencing it: `*value` [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: writing `&Vec<_>` instead of `&[_]` involves one more reference and cannot be used with non-Vec-based slices. [INFO] [stderr] --> src/lib.rs:213:36 [INFO] [stderr] | [INFO] [stderr] 213 | pub fn next_turn(&self, turns: &Vec) -> isize { [INFO] [stderr] | ^^^^^^^^^^^ help: change this to: `&[isize]` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stderr] [INFO] [stderr] warning: using `clone` on a `Copy` type [INFO] [stderr] --> src/lib.rs:223:9 [INFO] [stderr] | [INFO] [stderr] 223 | ups.iter().max().unwrap().clone() [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*ups.iter().max().unwrap()` [INFO] [stderr] | [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: writing `&Vec<_>` instead of `&[_]` involves one more reference and cannot be used with non-Vec-based slices. [INFO] [stderr] --> src/lib.rs:233:40 [INFO] [stderr] | [INFO] [stderr] 233 | pub fn make_turn(&mut self, turns: &Vec) { [INFO] [stderr] | ^^^^^^^^^^^ help: change this to: `&[isize]` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [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:15:13 [INFO] [stderr] | [INFO] [stderr] 15 | fn sym(typ: &isize, sym: char, bright: bool) -> String { [INFO] [stderr] | ^^^^^^ help: consider passing by value instead: `isize` [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: you seem to be trying to match on a boolean expression [INFO] [stderr] --> src/main.rs:16:18 [INFO] [stderr] | [INFO] [stderr] 16 | let bright = match bright { [INFO] [stderr] | __________________^ [INFO] [stderr] 17 | | true => ";1", [INFO] [stderr] 18 | | false => "" [INFO] [stderr] 19 | | }; [INFO] [stderr] | |_____^ help: consider using an if/else expression: `if bright { ";1" } else { "" }` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::match_bool)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_bool [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/main.rs:48:19 [INFO] [stderr] | [INFO] [stderr] 48 | fn show_pos(path: &Vec, racers: &[Racer]) -> String { [INFO] [stderr] | ^^^^^^^^^^^ help: change this to: `&[isize]` [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: useless use of `format!` [INFO] [stderr] --> src/main.rs:56:19 [INFO] [stderr] | [INFO] [stderr] 56 | poss.push(format!("{}", player.shortname())); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using .to_string(): `player.shortname().to_string()` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::useless_format)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stderr] = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) [INFO] [stderr] [INFO] [stderr] warning: you seem to be trying to match on a boolean expression [INFO] [stderr] --> src/main.rs:98:15 [INFO] [stderr] | [INFO] [stderr] 98 | let col = match player.alive {true => "34;1", false => "31"}; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using an if/else expression: `if player.alive { "34;1" } else { "31" }` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_bool [INFO] [stderr] [INFO] [stderr] warning: useless use of `format!` [INFO] [stderr] --> src/main.rs:119:49 [INFO] [stderr] | [INFO] [stderr] 119 | let syms: Vec = path.iter().map(|x| format!("{}", sym(x, '#', true))).collect(); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using .to_string(): `sym(x, '#', true).to_string()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stderr] = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) [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:15:13 [INFO] [stderr] | [INFO] [stderr] 15 | fn sym(typ: &isize, sym: char, bright: bool) -> String { [INFO] [stderr] | ^^^^^^ help: consider passing by value instead: `isize` [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: you seem to be trying to match on a boolean expression [INFO] [stderr] --> src/main.rs:16:18 [INFO] [stderr] | [INFO] [stderr] 16 | let bright = match bright { [INFO] [stderr] | __________________^ [INFO] [stderr] 17 | | true => ";1", [INFO] [stderr] 18 | | false => "" [INFO] [stderr] 19 | | }; [INFO] [stderr] | |_____^ help: consider using an if/else expression: `if bright { ";1" } else { "" }` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::match_bool)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_bool [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/main.rs:48:19 [INFO] [stderr] | [INFO] [stderr] 48 | fn show_pos(path: &Vec, racers: &[Racer]) -> String { [INFO] [stderr] | ^^^^^^^^^^^ help: change this to: `&[isize]` [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: useless use of `format!` [INFO] [stderr] --> src/main.rs:56:19 [INFO] [stderr] | [INFO] [stderr] 56 | poss.push(format!("{}", player.shortname())); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using .to_string(): `player.shortname().to_string()` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::useless_format)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stderr] = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) [INFO] [stderr] [INFO] [stderr] warning: you seem to be trying to match on a boolean expression [INFO] [stderr] --> src/main.rs:98:15 [INFO] [stderr] | [INFO] [stderr] 98 | let col = match player.alive {true => "34;1", false => "31"}; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using an if/else expression: `if player.alive { "34;1" } else { "31" }` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_bool [INFO] [stderr] [INFO] [stderr] warning: useless use of `format!` [INFO] [stderr] --> src/main.rs:119:49 [INFO] [stderr] | [INFO] [stderr] 119 | let syms: Vec = path.iter().map(|x| format!("{}", sym(x, '#', true))).collect(); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using .to_string(): `sym(x, '#', true).to_string()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stderr] = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) [INFO] [stderr] [INFO] [stderr] Finished dev [unoptimized + debuginfo] target(s) in 2.01s [INFO] running `"docker" "inspect" "dfdc08d736e469e9f0736c875e06956c9a276e912b4dfeff4e87a3cc16e9a3b9"` [INFO] running `"docker" "rm" "-f" "dfdc08d736e469e9f0736c875e06956c9a276e912b4dfeff4e87a3cc16e9a3b9"` [INFO] [stdout] dfdc08d736e469e9f0736c875e06956c9a276e912b4dfeff4e87a3cc16e9a3b9