[INFO] updating cached repository MattiasBuelens/rust-countdown-game [INFO] running `"git" "fetch" "--all"` [INFO] [stdout] Fetching origin [INFO] [stderr] From git://github.com/MattiasBuelens/rust-countdown-game [INFO] [stderr] * branch HEAD -> FETCH_HEAD [INFO] running `"git" "clone" "work/cache/sources/gh/MattiasBuelens/rust-countdown-game" "work/ex/clippy-test-run/sources/stable/gh/MattiasBuelens/rust-countdown-game"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable/gh/MattiasBuelens/rust-countdown-game'... [INFO] [stderr] done. [INFO] running `"git" "clone" "work/cache/sources/gh/MattiasBuelens/rust-countdown-game" "work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/MattiasBuelens/rust-countdown-game"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/MattiasBuelens/rust-countdown-game'... [INFO] [stderr] done. [INFO] running `"git" "rev-parse" "HEAD"` [INFO] [stdout] b29d3559e1a00afb64680234fdeb15498e1c889e [INFO] sha for GitHub repo MattiasBuelens/rust-countdown-game: b29d3559e1a00afb64680234fdeb15498e1c889e [INFO] validating manifest of MattiasBuelens/rust-countdown-game 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 MattiasBuelens/rust-countdown-game 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 MattiasBuelens/rust-countdown-game [INFO] finished frobbing MattiasBuelens/rust-countdown-game [INFO] frobbed toml for MattiasBuelens/rust-countdown-game written to work/ex/clippy-test-run/sources/stable/gh/MattiasBuelens/rust-countdown-game/Cargo.toml [INFO] started frobbing MattiasBuelens/rust-countdown-game [INFO] finished frobbing MattiasBuelens/rust-countdown-game [INFO] frobbed toml for MattiasBuelens/rust-countdown-game written to work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/MattiasBuelens/rust-countdown-game/Cargo.toml [INFO] crate MattiasBuelens/rust-countdown-game 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 MattiasBuelens/rust-countdown-game 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/MattiasBuelens/rust-countdown-game:/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] a3e778ce03b85483a2553889dac7cb351a58a7e06de8c00daaaf91d0c9fc2628 [INFO] running `"docker" "start" "-a" "a3e778ce03b85483a2553889dac7cb351a58a7e06de8c00daaaf91d0c9fc2628"` [INFO] [stderr] Checking textwrap v0.7.0 [INFO] [stderr] Checking clap v2.26.0 [INFO] [stderr] Checking countdown-game v0.1.0 (/opt/crater/workdir) [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/solve.rs:80:13 [INFO] [stderr] | [INFO] [stderr] 80 | numbers: numbers [INFO] [stderr] | ^^^^^^^^^^^^^^^^ help: replace it with: `numbers` [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/solve.rs:103:13 [INFO] [stderr] | [INFO] [stderr] 103 | stack: stack, [INFO] [stderr] | ^^^^^^^^^^^^ help: replace it with: `stack` [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/solve.rs:104:13 [INFO] [stderr] | [INFO] [stderr] 104 | numbers: numbers [INFO] [stderr] | ^^^^^^^^^^^^^^^^ help: replace it with: `numbers` [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/solve.rs:80:13 [INFO] [stderr] | [INFO] [stderr] 80 | numbers: numbers [INFO] [stderr] | ^^^^^^^^^^^^^^^^ help: replace it with: `numbers` [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/solve.rs:103:13 [INFO] [stderr] | [INFO] [stderr] 103 | stack: stack, [INFO] [stderr] | ^^^^^^^^^^^^ help: replace it with: `stack` [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/solve.rs:104:13 [INFO] [stderr] | [INFO] [stderr] 104 | numbers: numbers [INFO] [stderr] | ^^^^^^^^^^^^^^^^ help: replace it with: `numbers` [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: you don't need to add `&` to all patterns [INFO] [stderr] --> src/solve.rs:18:9 [INFO] [stderr] | [INFO] [stderr] 18 | / match self { [INFO] [stderr] 19 | | &Operator::Add => write!(f, "+"), [INFO] [stderr] 20 | | &Operator::Subtract => write!(f, "-"), [INFO] [stderr] 21 | | &Operator::Multiply => write!(f, "*"), [INFO] [stderr] 22 | | &Operator::Divide => write!(f, "/") [INFO] [stderr] 23 | | } [INFO] [stderr] | |_________^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::match_ref_pats)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stderr] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stderr] | [INFO] [stderr] 18 | match *self { [INFO] [stderr] 19 | Operator::Add => write!(f, "+"), [INFO] [stderr] 20 | Operator::Subtract => write!(f, "-"), [INFO] [stderr] 21 | Operator::Multiply => write!(f, "*"), [INFO] [stderr] 22 | Operator::Divide => write!(f, "/") [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: you don't need to add `&` to all patterns [INFO] [stderr] --> src/solve.rs:35:9 [INFO] [stderr] | [INFO] [stderr] 35 | / match self { [INFO] [stderr] 36 | | &Operation::Push(number) => write!(f, "{}", number), [INFO] [stderr] 37 | | &Operation::Pop(ref operator) => write!(f, "{}", operator) [INFO] [stderr] 38 | | } [INFO] [stderr] | |_________^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stderr] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stderr] | [INFO] [stderr] 35 | match *self { [INFO] [stderr] 36 | Operation::Push(number) => write!(f, "{}", number), [INFO] [stderr] 37 | Operation::Pop(ref operator) => write!(f, "{}", operator) [INFO] [stderr] | [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/solve.rs:108:46 [INFO] [stderr] | [INFO] [stderr] 108 | fn pop(&self, operator: Operator, stack: &Vec, result: i32) -> Node { [INFO] [stderr] | ^^^^^^^^^ [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] help: change this to [INFO] [stderr] | [INFO] [stderr] 108 | fn pop(&self, operator: Operator, stack: &[i32], result: i32) -> Node { [INFO] [stderr] | ^^^^^^ [INFO] [stderr] help: change `stack.clone()` to [INFO] [stderr] | [INFO] [stderr] 109 | let mut new_stack = stack.to_owned(); [INFO] [stderr] | ^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: casting u32 to u64 may become silently lossy if types change [INFO] [stderr] --> src/main.rs:43:62 [INFO] [stderr] | [INFO] [stderr] 43 | println!("Elapsed: {} ms", (elapsed.as_secs() * 1_000) + (elapsed.subsec_nanos() / 1_000_000) as u64); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `u64::from(elapsed.subsec_nanos() / 1_000_000)` [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: Calling `subsec_millis()` is more concise than this calculation [INFO] [stderr] --> src/main.rs:43:62 [INFO] [stderr] | [INFO] [stderr] 43 | println!("Elapsed: {} ms", (elapsed.as_secs() * 1_000) + (elapsed.subsec_nanos() / 1_000_000) as u64); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `elapsed.subsec_millis()` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::duration_subsec)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#duration_subsec [INFO] [stderr] [INFO] [stderr] warning: you don't need to add `&` to all patterns [INFO] [stderr] --> src/solve.rs:18:9 [INFO] [stderr] | [INFO] [stderr] 18 | / match self { [INFO] [stderr] 19 | | &Operator::Add => write!(f, "+"), [INFO] [stderr] 20 | | &Operator::Subtract => write!(f, "-"), [INFO] [stderr] 21 | | &Operator::Multiply => write!(f, "*"), [INFO] [stderr] 22 | | &Operator::Divide => write!(f, "/") [INFO] [stderr] 23 | | } [INFO] [stderr] | |_________^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::match_ref_pats)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stderr] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stderr] | [INFO] [stderr] 18 | match *self { [INFO] [stderr] 19 | Operator::Add => write!(f, "+"), [INFO] [stderr] 20 | Operator::Subtract => write!(f, "-"), [INFO] [stderr] 21 | Operator::Multiply => write!(f, "*"), [INFO] [stderr] 22 | Operator::Divide => write!(f, "/") [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: you don't need to add `&` to all patterns [INFO] [stderr] --> src/solve.rs:35:9 [INFO] [stderr] | [INFO] [stderr] 35 | / match self { [INFO] [stderr] 36 | | &Operation::Push(number) => write!(f, "{}", number), [INFO] [stderr] 37 | | &Operation::Pop(ref operator) => write!(f, "{}", operator) [INFO] [stderr] 38 | | } [INFO] [stderr] | |_________^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stderr] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stderr] | [INFO] [stderr] 35 | match *self { [INFO] [stderr] 36 | Operation::Push(number) => write!(f, "{}", number), [INFO] [stderr] 37 | Operation::Pop(ref operator) => write!(f, "{}", operator) [INFO] [stderr] | [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/solve.rs:108:46 [INFO] [stderr] | [INFO] [stderr] 108 | fn pop(&self, operator: Operator, stack: &Vec, result: i32) -> Node { [INFO] [stderr] | ^^^^^^^^^ [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] help: change this to [INFO] [stderr] | [INFO] [stderr] 108 | fn pop(&self, operator: Operator, stack: &[i32], result: i32) -> Node { [INFO] [stderr] | ^^^^^^ [INFO] [stderr] help: change `stack.clone()` to [INFO] [stderr] | [INFO] [stderr] 109 | let mut new_stack = stack.to_owned(); [INFO] [stderr] | ^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: casting u32 to u64 may become silently lossy if types change [INFO] [stderr] --> src/main.rs:43:62 [INFO] [stderr] | [INFO] [stderr] 43 | println!("Elapsed: {} ms", (elapsed.as_secs() * 1_000) + (elapsed.subsec_nanos() / 1_000_000) as u64); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `u64::from(elapsed.subsec_nanos() / 1_000_000)` [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: Calling `subsec_millis()` is more concise than this calculation [INFO] [stderr] --> src/main.rs:43:62 [INFO] [stderr] | [INFO] [stderr] 43 | println!("Elapsed: {} ms", (elapsed.as_secs() * 1_000) + (elapsed.subsec_nanos() / 1_000_000) as u64); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `elapsed.subsec_millis()` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::duration_subsec)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#duration_subsec [INFO] [stderr] [INFO] [stderr] Finished dev [unoptimized + debuginfo] target(s) in 8.07s [INFO] running `"docker" "inspect" "a3e778ce03b85483a2553889dac7cb351a58a7e06de8c00daaaf91d0c9fc2628"` [INFO] running `"docker" "rm" "-f" "a3e778ce03b85483a2553889dac7cb351a58a7e06de8c00daaaf91d0c9fc2628"` [INFO] [stdout] a3e778ce03b85483a2553889dac7cb351a58a7e06de8c00daaaf91d0c9fc2628