[INFO] updating cached repository spocot/aoc [INFO] running `"git" "fetch" "--all"` [INFO] [stdout] Fetching origin [INFO] [stderr] From git://github.com/spocot/aoc [INFO] [stderr] * branch HEAD -> FETCH_HEAD [INFO] running `"git" "clone" "work/cache/sources/gh/spocot/aoc" "work/ex/clippy-test-run/sources/stable/gh/spocot/aoc"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable/gh/spocot/aoc'... [INFO] [stderr] done. [INFO] running `"git" "clone" "work/cache/sources/gh/spocot/aoc" "work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/spocot/aoc"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/spocot/aoc'... [INFO] [stderr] done. [INFO] running `"git" "rev-parse" "HEAD"` [INFO] [stdout] 47a6ff80bf7b443938a4c477c5956c6f45442c6f [INFO] sha for GitHub repo spocot/aoc: 47a6ff80bf7b443938a4c477c5956c6f45442c6f [INFO] validating manifest of spocot/aoc 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 spocot/aoc 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 spocot/aoc [INFO] finished frobbing spocot/aoc [INFO] frobbed toml for spocot/aoc written to work/ex/clippy-test-run/sources/stable/gh/spocot/aoc/Cargo.toml [INFO] started frobbing spocot/aoc [INFO] finished frobbing spocot/aoc [INFO] frobbed toml for spocot/aoc written to work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/spocot/aoc/Cargo.toml [INFO] crate spocot/aoc 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 spocot/aoc against stable for clippy-test-run [INFO] running `"docker" "create" "-v" "/mnt/big/crater/work/local/target-dirs/clippy-test-run/worker-3/stable:/opt/crater/target:rw,Z" "-v" "/mnt/big/crater/work/ex/clippy-test-run/sources/stable/gh/spocot/aoc:/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] d06ac41b42ed1de9329f633b044954fd221df48f2db164cfccd10eece8abfc66 [INFO] running `"docker" "start" "-a" "d06ac41b42ed1de9329f633b044954fd221df48f2db164cfccd10eece8abfc66"` [INFO] [stderr] Checking aoc v0.1.0 (/opt/crater/workdir) [INFO] [stderr] warning: you seem to be trying to use match for destructuring a single pattern. Consider using `if let` [INFO] [stderr] --> src/aoc/aoc1.rs:8:5 [INFO] [stderr] | [INFO] [stderr] 8 | / match io::stdin().read_line(&mut input) { [INFO] [stderr] 9 | | Err(e) => panic!("{}", e), [INFO] [stderr] 10 | | _ => {} [INFO] [stderr] 11 | | }; [INFO] [stderr] | |_____^ help: try this: `if let Err(e) = io::stdin().read_line(&mut input) { panic!("{}", e) }` [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] [INFO] [stderr] warning: you seem to be trying to use match for destructuring a single pattern. Consider using `if let` [INFO] [stderr] --> src/aoc/aoc1.rs:36:5 [INFO] [stderr] | [INFO] [stderr] 36 | / match io::stdin().read_line(&mut input) { [INFO] [stderr] 37 | | Err(e) => panic!("{}", e), [INFO] [stderr] 38 | | _ => {} [INFO] [stderr] 39 | | }; [INFO] [stderr] | |_____^ help: try this: `if let Err(e) = io::stdin().read_line(&mut input) { panic!("{}", e) }` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stderr] [INFO] [stderr] warning: `if _ { .. } else { .. }` is an expression [INFO] [stderr] --> src/aoc/aoc3.rs:15:5 [INFO] [stderr] | [INFO] [stderr] 15 | / let mut dist = 0; [INFO] [stderr] 16 | | [INFO] [stderr] 17 | | if num > 1 { [INFO] [stderr] 18 | | [INFO] [stderr] ... | [INFO] [stderr] 30 | | dist = (((num - (size - 2).pow(2) - 1) % (size - 1)) - (m_dist - 1)).abs() + m_dist; [INFO] [stderr] 31 | | } [INFO] [stderr] | |_____^ help: it is more idiomatic to write: `let dist = if num > 1 { ..; (((num - (size - 2).pow(2) - 1) % (size - 1)) - (m_dist - 1)).abs() + m_dist } 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: you seem to be trying to use match for destructuring a single pattern. Consider using `if let` [INFO] [stderr] --> src/aoc/aoc3.rs:8:5 [INFO] [stderr] | [INFO] [stderr] 8 | / match io::stdin().read_line(&mut input) { [INFO] [stderr] 9 | | Err(e) => panic!("{}", e), [INFO] [stderr] 10 | | _ => {} [INFO] [stderr] 11 | | }; [INFO] [stderr] | |_____^ help: try this: `if let Err(e) = io::stdin().read_line(&mut input) { panic!("{}", e) }` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stderr] [INFO] [stderr] warning: in an 'if' condition, avoid complex blocks or closures with blocks; instead, move the block or closure higher and bind it with a 'let' [INFO] [stderr] --> src/aoc/aoc4.rs:16:33 [INFO] [stderr] | [INFO] [stderr] 16 | if words.iter().all(|w| { [INFO] [stderr] | _________________________________^ [INFO] [stderr] 17 | | i += 1; [INFO] [stderr] 18 | | for word in &words[i..] { [INFO] [stderr] 19 | | if w == word { [INFO] [stderr] ... | [INFO] [stderr] 23 | | true [INFO] [stderr] 24 | | }){ num_valid += 1; } [INFO] [stderr] | |_________^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::block_in_if_condition_stmt)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#block_in_if_condition_stmt [INFO] [stderr] [INFO] [stderr] warning: in an 'if' condition, avoid complex blocks or closures with blocks; instead, move the block or closure higher and bind it with a 'let' [INFO] [stderr] --> src/aoc/aoc4.rs:42:34 [INFO] [stderr] | [INFO] [stderr] 42 | if words.iter().all(|&w| { [INFO] [stderr] | __________________________________^ [INFO] [stderr] 43 | | i += 1; [INFO] [stderr] 44 | | let mut c1: Vec<_> = w.chars().collect(); [INFO] [stderr] 45 | | c1.sort(); [INFO] [stderr] ... | [INFO] [stderr] 53 | | true [INFO] [stderr] 54 | | }){ num_valid += 1; } [INFO] [stderr] | |_________^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#block_in_if_condition_stmt [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/aoc/aoc1.rs:8:5 [INFO] [stderr] | [INFO] [stderr] 8 | / match io::stdin().read_line(&mut input) { [INFO] [stderr] 9 | | Err(e) => panic!("{}", e), [INFO] [stderr] 10 | | _ => {} [INFO] [stderr] 11 | | }; [INFO] [stderr] | |_____^ help: try this: `if let Err(e) = io::stdin().read_line(&mut input) { panic!("{}", e) }` [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] [INFO] [stderr] warning: you seem to be trying to use match for destructuring a single pattern. Consider using `if let` [INFO] [stderr] --> src/aoc/aoc1.rs:36:5 [INFO] [stderr] | [INFO] [stderr] 36 | / match io::stdin().read_line(&mut input) { [INFO] [stderr] 37 | | Err(e) => panic!("{}", e), [INFO] [stderr] 38 | | _ => {} [INFO] [stderr] 39 | | }; [INFO] [stderr] | |_____^ help: try this: `if let Err(e) = io::stdin().read_line(&mut input) { panic!("{}", e) }` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stderr] [INFO] [stderr] warning: `if _ { .. } else { .. }` is an expression [INFO] [stderr] --> src/aoc/aoc3.rs:15:5 [INFO] [stderr] | [INFO] [stderr] 15 | / let mut dist = 0; [INFO] [stderr] 16 | | [INFO] [stderr] 17 | | if num > 1 { [INFO] [stderr] 18 | | [INFO] [stderr] ... | [INFO] [stderr] 30 | | dist = (((num - (size - 2).pow(2) - 1) % (size - 1)) - (m_dist - 1)).abs() + m_dist; [INFO] [stderr] 31 | | } [INFO] [stderr] | |_____^ help: it is more idiomatic to write: `let dist = if num > 1 { ..; (((num - (size - 2).pow(2) - 1) % (size - 1)) - (m_dist - 1)).abs() + m_dist } 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: you seem to be trying to use match for destructuring a single pattern. Consider using `if let` [INFO] [stderr] --> src/aoc/aoc3.rs:8:5 [INFO] [stderr] | [INFO] [stderr] 8 | / match io::stdin().read_line(&mut input) { [INFO] [stderr] 9 | | Err(e) => panic!("{}", e), [INFO] [stderr] 10 | | _ => {} [INFO] [stderr] 11 | | }; [INFO] [stderr] | |_____^ help: try this: `if let Err(e) = io::stdin().read_line(&mut input) { panic!("{}", e) }` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stderr] [INFO] [stderr] warning: in an 'if' condition, avoid complex blocks or closures with blocks; instead, move the block or closure higher and bind it with a 'let' [INFO] [stderr] --> src/aoc/aoc4.rs:16:33 [INFO] [stderr] | [INFO] [stderr] 16 | if words.iter().all(|w| { [INFO] [stderr] | _________________________________^ [INFO] [stderr] 17 | | i += 1; [INFO] [stderr] 18 | | for word in &words[i..] { [INFO] [stderr] 19 | | if w == word { [INFO] [stderr] ... | [INFO] [stderr] 23 | | true [INFO] [stderr] 24 | | }){ num_valid += 1; } [INFO] [stderr] | |_________^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::block_in_if_condition_stmt)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#block_in_if_condition_stmt [INFO] [stderr] [INFO] [stderr] warning: in an 'if' condition, avoid complex blocks or closures with blocks; instead, move the block or closure higher and bind it with a 'let' [INFO] [stderr] --> src/aoc/aoc4.rs:42:34 [INFO] [stderr] | [INFO] [stderr] 42 | if words.iter().all(|&w| { [INFO] [stderr] | __________________________________^ [INFO] [stderr] 43 | | i += 1; [INFO] [stderr] 44 | | let mut c1: Vec<_> = w.chars().collect(); [INFO] [stderr] 45 | | c1.sort(); [INFO] [stderr] ... | [INFO] [stderr] 53 | | true [INFO] [stderr] 54 | | }){ num_valid += 1; } [INFO] [stderr] | |_________^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#block_in_if_condition_stmt [INFO] [stderr] [INFO] [stderr] Finished dev [unoptimized + debuginfo] target(s) in 1.27s [INFO] running `"docker" "inspect" "d06ac41b42ed1de9329f633b044954fd221df48f2db164cfccd10eece8abfc66"` [INFO] running `"docker" "rm" "-f" "d06ac41b42ed1de9329f633b044954fd221df48f2db164cfccd10eece8abfc66"` [INFO] [stdout] d06ac41b42ed1de9329f633b044954fd221df48f2db164cfccd10eece8abfc66