[INFO] updating cached repository Sokojoe/rust-in-piece [INFO] running `"git" "fetch" "--all"` [INFO] [stdout] Fetching origin [INFO] [stderr] From git://github.com/Sokojoe/rust-in-piece [INFO] [stderr] * branch HEAD -> FETCH_HEAD [INFO] running `"git" "clone" "work/cache/sources/gh/Sokojoe/rust-in-piece" "work/ex/clippy-test-run/sources/stable/gh/Sokojoe/rust-in-piece"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable/gh/Sokojoe/rust-in-piece'... [INFO] [stderr] done. [INFO] running `"git" "clone" "work/cache/sources/gh/Sokojoe/rust-in-piece" "work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/Sokojoe/rust-in-piece"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/Sokojoe/rust-in-piece'... [INFO] [stderr] done. [INFO] running `"git" "rev-parse" "HEAD"` [INFO] [stdout] 805659fe0bcb1738bd806d6efe5e1b78c4cfbe66 [INFO] sha for GitHub repo Sokojoe/rust-in-piece: 805659fe0bcb1738bd806d6efe5e1b78c4cfbe66 [INFO] validating manifest of Sokojoe/rust-in-piece 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 Sokojoe/rust-in-piece 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 Sokojoe/rust-in-piece [INFO] finished frobbing Sokojoe/rust-in-piece [INFO] frobbed toml for Sokojoe/rust-in-piece written to work/ex/clippy-test-run/sources/stable/gh/Sokojoe/rust-in-piece/Cargo.toml [INFO] started frobbing Sokojoe/rust-in-piece [INFO] finished frobbing Sokojoe/rust-in-piece [INFO] frobbed toml for Sokojoe/rust-in-piece written to work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/Sokojoe/rust-in-piece/Cargo.toml [INFO] crate Sokojoe/rust-in-piece 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 Sokojoe/rust-in-piece 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-1/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/Sokojoe/rust-in-piece:/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] b6bf134601b5f6b2a3df0f2792a955db49a1b72b967881d7ce06584c518dded6 [INFO] running `"docker" "start" "-a" "b6bf134601b5f6b2a3df0f2792a955db49a1b72b967881d7ce06584c518dded6"` [INFO] [stderr] Checking yansi v0.3.4 [INFO] [stderr] Checking rust-in-pieces v0.1.0 (/opt/crater/workdir) [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/entity.rs:16:13 [INFO] [stderr] | [INFO] [stderr] 16 | 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/entity.rs:19:13 [INFO] [stderr] | [INFO] [stderr] 19 | base_attack:base_attack, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `base_attack` [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/entity.rs:16:13 [INFO] [stderr] | [INFO] [stderr] 16 | 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/entity.rs:19:13 [INFO] [stderr] | [INFO] [stderr] 19 | base_attack:base_attack, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `base_attack` [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: this creates an owned instance just for comparison [INFO] [stderr] --> src/game.rs:44:22 [INFO] [stderr] | [INFO] [stderr] 44 | if action == "Attack".to_string(){ [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^ help: try: `"Attack"` [INFO] [stderr] warning: this creates an owned instance just for comparison [INFO] [stderr] --> src/game.rs:44:22 [INFO] [stderr] | [INFO] [stderr] 44 | if action == "Attack".to_string(){ [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^ help: try: `"Attack"` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::cmp_owned)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stderr] [INFO] [stderr] warning: this creates an owned instance just for comparison [INFO] [stderr] --> src/game.rs:62:27 [INFO] [stderr] | [INFO] [stderr] 62 | else if action == "Flee".to_string(){ [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^ help: try: `"Flee"` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stderr] [INFO] [stderr] warning: writing `&String` instead of `&str` involves a new object where a slice will do. [INFO] [stderr] --> src/game_interface.rs:25:32 [INFO] [stderr] | [INFO] [stderr] 25 | pub fn attack_entity(attacker: &String, entity: &String, damage: &i32) { [INFO] [stderr] | ^^^^^^^ help: change this to: `&str` [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 `&String` instead of `&str` involves a new object where a slice will do. [INFO] [stderr] --> src/game_interface.rs:25:49 [INFO] [stderr] | [INFO] [stderr] 25 | pub fn attack_entity(attacker: &String, entity: &String, damage: &i32) { [INFO] [stderr] | ^^^^^^^ help: change this to: `&str` [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/game_interface.rs:25:66 [INFO] [stderr] | [INFO] [stderr] 25 | pub fn attack_entity(attacker: &String, entity: &String, damage: &i32) { [INFO] [stderr] | ^^^^ help: consider passing by value instead: `i32` [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] | [INFO] [stderr] = note: #[warn(clippy::cmp_owned)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stderr] [INFO] [stderr] warning: this creates an owned instance just for comparison [INFO] [stderr] --> src/game.rs:62:27 [INFO] [stderr] | [INFO] [stderr] 62 | else if action == "Flee".to_string(){ [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^ help: try: `"Flee"` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stderr] [INFO] [stderr] warning: writing `&String` instead of `&str` involves a new object where a slice will do. [INFO] [stderr] --> src/game_interface.rs:25:32 [INFO] [stderr] | [INFO] [stderr] 25 | pub fn attack_entity(attacker: &String, entity: &String, damage: &i32) { [INFO] [stderr] | ^^^^^^^ help: change this to: `&str` [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 `&String` instead of `&str` involves a new object where a slice will do. [INFO] [stderr] --> src/game_interface.rs:25:49 [INFO] [stderr] | [INFO] [stderr] 25 | pub fn attack_entity(attacker: &String, entity: &String, damage: &i32) { [INFO] [stderr] | ^^^^^^^ help: change this to: `&str` [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/game_interface.rs:25:66 [INFO] [stderr] | [INFO] [stderr] 25 | pub fn attack_entity(attacker: &String, entity: &String, damage: &i32) { [INFO] [stderr] | ^^^^ help: consider passing by value instead: `i32` [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: writing `&String` instead of `&str` involves a new object where a slice will do. [INFO] [stderr] --> src/console_interface.rs:42:32 [INFO] [stderr] | [INFO] [stderr] 42 | pub fn attack_entity(attacker: &String, entity: &String, damage: &i32) { [INFO] [stderr] | ^^^^^^^ help: change this to: `&str` [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 `&String` instead of `&str` involves a new object where a slice will do. [INFO] [stderr] --> src/console_interface.rs:42:49 [INFO] [stderr] | [INFO] [stderr] 42 | pub fn attack_entity(attacker: &String, entity: &String, damage: &i32) { [INFO] [stderr] | ^^^^^^^ help: change this to: `&str` [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/console_interface.rs:42:66 [INFO] [stderr] | [INFO] [stderr] 42 | pub fn attack_entity(attacker: &String, entity: &String, damage: &i32) { [INFO] [stderr] | ^^^^ help: consider passing by value instead: `i32` [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: writing `&String` instead of `&str` involves a new object where a slice will do. [INFO] [stderr] --> src/console_interface.rs:42:32 [INFO] [stderr] | [INFO] [stderr] 42 | pub fn attack_entity(attacker: &String, entity: &String, damage: &i32) { [INFO] [stderr] | ^^^^^^^ help: change this to: `&str` [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 `&String` instead of `&str` involves a new object where a slice will do. [INFO] [stderr] --> src/console_interface.rs:42:49 [INFO] [stderr] | [INFO] [stderr] 42 | pub fn attack_entity(attacker: &String, entity: &String, damage: &i32) { [INFO] [stderr] | ^^^^^^^ help: change this to: `&str` [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/console_interface.rs:42:66 [INFO] [stderr] | [INFO] [stderr] 42 | pub fn attack_entity(attacker: &String, entity: &String, damage: &i32) { [INFO] [stderr] | ^^^^ help: consider passing by value instead: `i32` [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 if-then-else expression returns a bool literal [INFO] [stderr] --> src/entity.rs:29:9 [INFO] [stderr] | [INFO] [stderr] 29 | / if e.current_health > 0 {false} [INFO] [stderr] 30 | | else { true } [INFO] [stderr] | |_____________________^ help: you can reduce it to: `!(e.current_health > 0)` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::needless_bool)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool [INFO] [stderr] [INFO] [stderr] warning: manual implementation of an assign operation [INFO] [stderr] --> src/entity.rs:35:13 [INFO] [stderr] | [INFO] [stderr] 35 | e.current_health = e.current_health - damage; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `e.current_health -= damage` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::assign_op_pattern)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stderr] [INFO] [stderr] warning: manual implementation of an assign operation [INFO] [stderr] --> src/entity.rs:45:13 [INFO] [stderr] | [INFO] [stderr] 45 | e.current_health = e.current_health + heal; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `e.current_health += heal` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stderr] [INFO] [stderr] warning: this if-then-else expression returns a bool literal [INFO] [stderr] --> src/entity.rs:29:9 [INFO] [stderr] | [INFO] [stderr] 29 | / if e.current_health > 0 {false} [INFO] [stderr] 30 | | else { true } [INFO] [stderr] | |_____________________^ help: you can reduce it to: `!(e.current_health > 0)` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::needless_bool)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool [INFO] [stderr] [INFO] [stderr] warning: manual implementation of an assign operation [INFO] [stderr] --> src/entity.rs:35:13 [INFO] [stderr] | [INFO] [stderr] 35 | e.current_health = e.current_health - damage; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `e.current_health -= damage` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::assign_op_pattern)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stderr] [INFO] [stderr] warning: manual implementation of an assign operation [INFO] [stderr] --> src/entity.rs:45:13 [INFO] [stderr] | [INFO] [stderr] 45 | e.current_health = e.current_health + heal; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `e.current_health += heal` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stderr] [INFO] [stderr] Finished dev [unoptimized + debuginfo] target(s) in 0.96s [INFO] running `"docker" "inspect" "b6bf134601b5f6b2a3df0f2792a955db49a1b72b967881d7ce06584c518dded6"` [INFO] running `"docker" "rm" "-f" "b6bf134601b5f6b2a3df0f2792a955db49a1b72b967881d7ce06584c518dded6"` [INFO] [stdout] b6bf134601b5f6b2a3df0f2792a955db49a1b72b967881d7ce06584c518dded6