[INFO] updating cached repository LegoRemix/befunge [INFO] running `"git" "fetch" "--all"` [INFO] [stdout] Fetching origin [INFO] [stderr] From git://github.com/LegoRemix/befunge [INFO] [stderr] * branch HEAD -> FETCH_HEAD [INFO] running `"git" "clone" "work/cache/sources/gh/LegoRemix/befunge" "work/ex/clippy-test-run/sources/stable/gh/LegoRemix/befunge"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable/gh/LegoRemix/befunge'... [INFO] [stderr] done. [INFO] running `"git" "clone" "work/cache/sources/gh/LegoRemix/befunge" "work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/LegoRemix/befunge"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/LegoRemix/befunge'... [INFO] [stderr] done. [INFO] running `"git" "rev-parse" "HEAD"` [INFO] [stdout] 1103a0de56c1aee88e904da534da299c72ac7e07 [INFO] sha for GitHub repo LegoRemix/befunge: 1103a0de56c1aee88e904da534da299c72ac7e07 [INFO] validating manifest of LegoRemix/befunge 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 LegoRemix/befunge 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 LegoRemix/befunge [INFO] finished frobbing LegoRemix/befunge [INFO] frobbed toml for LegoRemix/befunge written to work/ex/clippy-test-run/sources/stable/gh/LegoRemix/befunge/Cargo.toml [INFO] started frobbing LegoRemix/befunge [INFO] finished frobbing LegoRemix/befunge [INFO] frobbed toml for LegoRemix/befunge written to work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/LegoRemix/befunge/Cargo.toml [INFO] crate LegoRemix/befunge 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 LegoRemix/befunge 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-5/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/LegoRemix/befunge:/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] 24742e5d17380528d3fa752b95142cfaed70c9c04b2f8a2266858b46c66c33c2 [INFO] running `"docker" "start" "-a" "24742e5d17380528d3fa752b95142cfaed70c9c04b2f8a2266858b46c66c33c2"` [INFO] [stderr] Checking befunge v0.1.0 (/opt/crater/workdir) [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/state.rs:39:20 [INFO] [stderr] | [INFO] [stderr] 39 | Location { x: x, y: y } [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/state.rs:39:26 [INFO] [stderr] | [INFO] [stderr] 39 | Location { x: x, 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/state.rs:39:20 [INFO] [stderr] | [INFO] [stderr] 39 | Location { x: x, y: y } [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/state.rs:39:26 [INFO] [stderr] | [INFO] [stderr] 39 | Location { x: x, 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: unneeded return statement [INFO] [stderr] --> src/matcher.rs:29:9 [INFO] [stderr] | [INFO] [stderr] 29 | return &self.r; [INFO] [stderr] | ^^^^^^^^^^^^^^^ help: remove `return` as shown: `&self.r` [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] [INFO] [stderr] warning: method is never used: `opposite` [INFO] [stderr] --> src/state.rs:62:5 [INFO] [stderr] | [INFO] [stderr] 62 | pub fn opposite(&self) -> Direction { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(dead_code)] on by default [INFO] [stderr] [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/state.rs:62:21 [INFO] [stderr] | [INFO] [stderr] 62 | pub fn opposite(&self) -> Direction { [INFO] [stderr] | ^^^^^ help: consider passing by value instead: `self` [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/state.rs:84:9 [INFO] [stderr] | [INFO] [stderr] 84 | rng.choose(&choices).unwrap().clone() [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*rng.choose(&choices).unwrap()` [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: using `clone` on a `Copy` type [INFO] [stderr] --> src/state.rs:193:23 [INFO] [stderr] | [INFO] [stderr] 193 | self.value_at(self.cursor.clone()) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.cursor` [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: using `clone` on a `Copy` type [INFO] [stderr] --> src/state.rs:236:9 [INFO] [stderr] | [INFO] [stderr] 236 | value.clone() [INFO] [stderr] | ^^^^^^^^^^^^^ help: try removing the `clone` call: `value` [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: redundant pattern matching, consider using `is_ok()` [INFO] [stderr] --> src/state.rs:311:12 [INFO] [stderr] | [INFO] [stderr] 311 | if let Ok(_) = io::stdin().read_line(&mut input) { [INFO] [stderr] | _____- ^^^^^ [INFO] [stderr] 312 | | if let Some(c) = input.chars().next(){ [INFO] [stderr] 313 | | ch = c; [INFO] [stderr] 314 | | } [INFO] [stderr] 315 | | } [INFO] [stderr] | |_____- help: try this: `if io::stdin().read_line(&mut input).is_ok()` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::redundant_pattern_matching)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stderr] [INFO] [stderr] warning: redundant pattern matching, consider using `is_ok()` [INFO] [stderr] --> src/state.rs:322:12 [INFO] [stderr] | [INFO] [stderr] 322 | if let Ok(_) = io::stdin().read_line(&mut input) { [INFO] [stderr] | _____- ^^^^^ [INFO] [stderr] 323 | | if let Ok(value) = input.trim().parse::() { [INFO] [stderr] 324 | | state.stack.push(value); [INFO] [stderr] 325 | | return; [INFO] [stderr] 326 | | } [INFO] [stderr] 327 | | } [INFO] [stderr] | |_____- help: try this: `if io::stdin().read_line(&mut input).is_ok()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stderr] [INFO] [stderr] warning: `if _ { .. } else { .. }` is an expression [INFO] [stderr] --> src/state.rs:351:5 [INFO] [stderr] | [INFO] [stderr] 351 | / let mut result = 0; [INFO] [stderr] 352 | | if b > a { [INFO] [stderr] 353 | | result = 1; [INFO] [stderr] 354 | | } [INFO] [stderr] | |_____^ help: it is more idiomatic to write: `let result = if b > a { 1 } else { 0 };` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::useless_let_if_seq)] on by default [INFO] [stderr] = note: you might not need `mut` at all [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_let_if_seq [INFO] [stderr] [INFO] [stderr] warning: `if _ { .. } else { .. }` is an expression [INFO] [stderr] --> src/state.rs:360:5 [INFO] [stderr] | [INFO] [stderr] 360 | / let mut negation = 0; [INFO] [stderr] 361 | | if state.stack.pop() == 0 { [INFO] [stderr] 362 | | negation = 1; [INFO] [stderr] 363 | | } [INFO] [stderr] | |_____^ help: it is more idiomatic to write: `let negation = if state.stack.pop() == 0 { 1 } else { 0 };` [INFO] [stderr] | [INFO] [stderr] = note: you might not need `mut` at all [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_let_if_seq [INFO] [stderr] [INFO] [stderr] warning: casting u32 to i64 may become silently lossy if types change [INFO] [stderr] --> src/state.rs:380:26 [INFO] [stderr] | [INFO] [stderr] 380 | state.stack.push(v as i64); [INFO] [stderr] | ^^^^^^^^ help: try: `i64::from(v)` [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: casting u8 to i64 may become silently lossy if types change [INFO] [stderr] --> src/util.rs:6:5 [INFO] [stderr] | [INFO] [stderr] 6 | (ch as u8) as i64 [INFO] [stderr] | ^^^^^^^^^^^^^^^^^ help: try: `i64::from((ch as u8))` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless [INFO] [stderr] [INFO] [stderr] warning: unneeded return statement [INFO] [stderr] --> src/matcher.rs:29:9 [INFO] [stderr] | [INFO] [stderr] 29 | return &self.r; [INFO] [stderr] | ^^^^^^^^^^^^^^^ help: remove `return` as shown: `&self.r` [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] [INFO] [stderr] warning: method is never used: `opposite` [INFO] [stderr] --> src/state.rs:62:5 [INFO] [stderr] | [INFO] [stderr] 62 | pub fn opposite(&self) -> Direction { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(dead_code)] on by default [INFO] [stderr] [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/state.rs:62:21 [INFO] [stderr] | [INFO] [stderr] 62 | pub fn opposite(&self) -> Direction { [INFO] [stderr] | ^^^^^ help: consider passing by value instead: `self` [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/state.rs:84:9 [INFO] [stderr] | [INFO] [stderr] 84 | rng.choose(&choices).unwrap().clone() [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*rng.choose(&choices).unwrap()` [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: using `clone` on a `Copy` type [INFO] [stderr] --> src/state.rs:193:23 [INFO] [stderr] | [INFO] [stderr] 193 | self.value_at(self.cursor.clone()) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.cursor` [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: using `clone` on a `Copy` type [INFO] [stderr] --> src/state.rs:236:9 [INFO] [stderr] | [INFO] [stderr] 236 | value.clone() [INFO] [stderr] | ^^^^^^^^^^^^^ help: try removing the `clone` call: `value` [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: redundant pattern matching, consider using `is_ok()` [INFO] [stderr] --> src/state.rs:311:12 [INFO] [stderr] | [INFO] [stderr] 311 | if let Ok(_) = io::stdin().read_line(&mut input) { [INFO] [stderr] | _____- ^^^^^ [INFO] [stderr] 312 | | if let Some(c) = input.chars().next(){ [INFO] [stderr] 313 | | ch = c; [INFO] [stderr] 314 | | } [INFO] [stderr] 315 | | } [INFO] [stderr] | |_____- help: try this: `if io::stdin().read_line(&mut input).is_ok()` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::redundant_pattern_matching)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stderr] [INFO] [stderr] warning: redundant pattern matching, consider using `is_ok()` [INFO] [stderr] --> src/state.rs:322:12 [INFO] [stderr] | [INFO] [stderr] 322 | if let Ok(_) = io::stdin().read_line(&mut input) { [INFO] [stderr] | _____- ^^^^^ [INFO] [stderr] 323 | | if let Ok(value) = input.trim().parse::() { [INFO] [stderr] 324 | | state.stack.push(value); [INFO] [stderr] 325 | | return; [INFO] [stderr] 326 | | } [INFO] [stderr] 327 | | } [INFO] [stderr] | |_____- help: try this: `if io::stdin().read_line(&mut input).is_ok()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stderr] [INFO] [stderr] warning: `if _ { .. } else { .. }` is an expression [INFO] [stderr] --> src/state.rs:351:5 [INFO] [stderr] | [INFO] [stderr] 351 | / let mut result = 0; [INFO] [stderr] 352 | | if b > a { [INFO] [stderr] 353 | | result = 1; [INFO] [stderr] 354 | | } [INFO] [stderr] | |_____^ help: it is more idiomatic to write: `let result = if b > a { 1 } else { 0 };` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::useless_let_if_seq)] on by default [INFO] [stderr] = note: you might not need `mut` at all [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_let_if_seq [INFO] [stderr] [INFO] [stderr] warning: `if _ { .. } else { .. }` is an expression [INFO] [stderr] --> src/state.rs:360:5 [INFO] [stderr] | [INFO] [stderr] 360 | / let mut negation = 0; [INFO] [stderr] 361 | | if state.stack.pop() == 0 { [INFO] [stderr] 362 | | negation = 1; [INFO] [stderr] 363 | | } [INFO] [stderr] | |_____^ help: it is more idiomatic to write: `let negation = if state.stack.pop() == 0 { 1 } else { 0 };` [INFO] [stderr] | [INFO] [stderr] = note: you might not need `mut` at all [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_let_if_seq [INFO] [stderr] [INFO] [stderr] warning: casting u32 to i64 may become silently lossy if types change [INFO] [stderr] --> src/state.rs:380:26 [INFO] [stderr] | [INFO] [stderr] 380 | state.stack.push(v as i64); [INFO] [stderr] | ^^^^^^^^ help: try: `i64::from(v)` [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: casting u8 to i64 may become silently lossy if types change [INFO] [stderr] --> src/util.rs:6:5 [INFO] [stderr] | [INFO] [stderr] 6 | (ch as u8) as i64 [INFO] [stderr] | ^^^^^^^^^^^^^^^^^ help: try: `i64::from((ch as u8))` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless [INFO] [stderr] [INFO] [stderr] Finished dev [unoptimized + debuginfo] target(s) in 1.70s [INFO] running `"docker" "inspect" "24742e5d17380528d3fa752b95142cfaed70c9c04b2f8a2266858b46c66c33c2"` [INFO] running `"docker" "rm" "-f" "24742e5d17380528d3fa752b95142cfaed70c9c04b2f8a2266858b46c66c33c2"` [INFO] [stdout] 24742e5d17380528d3fa752b95142cfaed70c9c04b2f8a2266858b46c66c33c2