[INFO] crate binomial-iter 0.1.0 is already in cache [INFO] extracting crate binomial-iter 0.1.0 into work/ex/clippy-test-run/sources/stable/reg/binomial-iter/0.1.0 [INFO] extracting crate binomial-iter 0.1.0 into work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/reg/binomial-iter/0.1.0 [INFO] validating manifest of binomial-iter-0.1.0 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 binomial-iter-0.1.0 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 binomial-iter-0.1.0 [INFO] finished frobbing binomial-iter-0.1.0 [INFO] frobbed toml for binomial-iter-0.1.0 written to work/ex/clippy-test-run/sources/stable/reg/binomial-iter/0.1.0/Cargo.toml [INFO] started frobbing binomial-iter-0.1.0 [INFO] finished frobbing binomial-iter-0.1.0 [INFO] frobbed toml for binomial-iter-0.1.0 written to work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/reg/binomial-iter/0.1.0/Cargo.toml [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+stable" "generate-lockfile" "--manifest-path" "Cargo.toml" "-Zno-index-update"` [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+stable" "generate-lockfile" "--manifest-path" "Cargo.toml" "-Zno-index-update"` [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 binomial-iter-0.1.0 against stable for clippy-test-run [INFO] running `"docker" "create" "-v" "/mnt/big/crater/work/local/target-dirs/clippy-test-run/worker-7/stable:/opt/crater/target:rw,Z" "-v" "/mnt/big/crater/work/ex/clippy-test-run/sources/stable/reg/binomial-iter/0.1.0:/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] 1e36e617e4ef1e5fd17f04d40faf0e63f69c45173af7f1cbb7adda05d32b72fb [INFO] running `"docker" "start" "-a" "1e36e617e4ef1e5fd17f04d40faf0e63f69c45173af7f1cbb7adda05d32b72fb"` [INFO] [stderr] Checking binomial-iter v0.1.0 (/opt/crater/workdir) [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/lib.rs:62:13 [INFO] [stderr] | [INFO] [stderr] 62 | n: n, [INFO] [stderr] | ^^^^ help: replace it with: `n` [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:63:13 [INFO] [stderr] | [INFO] [stderr] 63 | k: k, [INFO] [stderr] | ^^^^ help: replace it with: `k` [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:62:13 [INFO] [stderr] | [INFO] [stderr] 62 | n: n, [INFO] [stderr] | ^^^^ help: replace it with: `n` [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:63:13 [INFO] [stderr] | [INFO] [stderr] 63 | k: k, [INFO] [stderr] | ^^^^ help: replace it with: `k` [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: use of `expect` followed by a function call [INFO] [stderr] --> src/lib.rs:38:48 [INFO] [stderr] | [INFO] [stderr] 38 | mul_div_gcd(binom(n - 1, k - 1), n, k).expect(&format!("cannot calculate `{}` choose `{}`, would overflow", n, k)) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|| panic!("cannot calculate `{}` choose `{}`, would overflow", n))` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::expect_fun_call)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stderr] [INFO] [stderr] warning: function is never used: `n_iter` [INFO] [stderr] --> src/test.rs:8:1 [INFO] [stderr] | [INFO] [stderr] 8 | fn n_iter() { [INFO] [stderr] | ^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(dead_code)] on by default [INFO] [stderr] [INFO] [stderr] warning: use of `expect` followed by a function call [INFO] [stderr] --> src/lib.rs:38:48 [INFO] [stderr] | [INFO] [stderr] 38 | mul_div_gcd(binom(n - 1, k - 1), n, k).expect(&format!("cannot calculate `{}` choose `{}`, would overflow", n, k)) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|| panic!("cannot calculate `{}` choose `{}`, would overflow", n))` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::expect_fun_call)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stderr] [INFO] [stderr] warning: this loop could be written as a `for` loop [INFO] [stderr] --> src/test.rs:15:40 [INFO] [stderr] | [INFO] [stderr] 15 | while let Some((n, bin)) = it.next() { [INFO] [stderr] | ^^^^^^^^^ help: try: `for (n, bin) in it { .. }` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::while_let_on_iterator)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator [INFO] [stderr] [INFO] [stderr] warning: this loop could be written as a `for` loop [INFO] [stderr] --> src/test.rs:22:36 [INFO] [stderr] | [INFO] [stderr] 22 | while let Some((n, bin)) = it.next() { [INFO] [stderr] | ^^^^^^^^^ help: try: `for (n, bin) in it { .. }` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator [INFO] [stderr] [INFO] [stderr] warning: this loop could be written as a `for` loop [INFO] [stderr] --> src/test.rs:42:36 [INFO] [stderr] | [INFO] [stderr] 42 | while let Some((k, bin)) = it.next() { [INFO] [stderr] | ^^^^^^^^^ help: try: `for (k, bin) in it { .. }` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator [INFO] [stderr] [INFO] [stderr] Finished dev [unoptimized + debuginfo] target(s) in 1.02s [INFO] running `"docker" "inspect" "1e36e617e4ef1e5fd17f04d40faf0e63f69c45173af7f1cbb7adda05d32b72fb"` [INFO] running `"docker" "rm" "-f" "1e36e617e4ef1e5fd17f04d40faf0e63f69c45173af7f1cbb7adda05d32b72fb"` [INFO] [stdout] 1e36e617e4ef1e5fd17f04d40faf0e63f69c45173af7f1cbb7adda05d32b72fb