[INFO] updating cached repository mplanchard/combinations [INFO] running `"git" "fetch" "--all"` [INFO] [stdout] Fetching origin [INFO] [stderr] From git://github.com/mplanchard/combinations [INFO] [stderr] * branch HEAD -> FETCH_HEAD [INFO] running `"git" "clone" "work/cache/sources/gh/mplanchard/combinations" "work/ex/clippy-test-run/sources/stable/gh/mplanchard/combinations"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable/gh/mplanchard/combinations'... [INFO] [stderr] done. [INFO] running `"git" "clone" "work/cache/sources/gh/mplanchard/combinations" "work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/mplanchard/combinations"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/mplanchard/combinations'... [INFO] [stderr] done. [INFO] running `"git" "rev-parse" "HEAD"` [INFO] [stdout] f5168b543d93ebab3848de11af6ddde30027461d [INFO] sha for GitHub repo mplanchard/combinations: f5168b543d93ebab3848de11af6ddde30027461d [INFO] validating manifest of mplanchard/combinations 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 mplanchard/combinations 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 mplanchard/combinations [INFO] finished frobbing mplanchard/combinations [INFO] frobbed toml for mplanchard/combinations written to work/ex/clippy-test-run/sources/stable/gh/mplanchard/combinations/Cargo.toml [INFO] started frobbing mplanchard/combinations [INFO] finished frobbing mplanchard/combinations [INFO] frobbed toml for mplanchard/combinations written to work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/mplanchard/combinations/Cargo.toml [INFO] crate mplanchard/combinations 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 mplanchard/combinations against stable for clippy-test-run [INFO] running `"docker" "create" "-v" "/mnt/big/crater/work/local/target-dirs/clippy-test-run/worker-5/stable:/opt/crater/target:rw,Z" "-v" "/mnt/big/crater/work/ex/clippy-test-run/sources/stable/gh/mplanchard/combinations:/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] 9120081b40254cda858793efbefd806e3dcd26894a7cdf4bd89365261b52c1e9 [INFO] running `"docker" "start" "-a" "9120081b40254cda858793efbefd806e3dcd26894a7cdf4bd89365261b52c1e9"` [INFO] [stderr] Checking combinations v0.1.0 (/opt/crater/workdir) [INFO] [stderr] warning: unused import: `std::slice` [INFO] [stderr] --> src/main.rs:6:5 [INFO] [stderr] | [INFO] [stderr] 6 | use std::slice; [INFO] [stderr] | ^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(unused_imports)] on by default [INFO] [stderr] [INFO] [stderr] warning: unused import: `std::slice` [INFO] [stderr] --> src/main.rs:6:5 [INFO] [stderr] | [INFO] [stderr] 6 | use std::slice; [INFO] [stderr] | ^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(unused_imports)] on by default [INFO] [stderr] [INFO] [stderr] warning: unused variable: `slice_one` [INFO] [stderr] --> src/main.rs:123:9 [INFO] [stderr] | [INFO] [stderr] 123 | let slice_one: &[i32] = &[1, 2, 3, 4, 5]; [INFO] [stderr] | ^^^^^^^^^ help: consider using `_slice_one` instead [INFO] [stderr] | [INFO] [stderr] = note: #[warn(unused_variables)] on by default [INFO] [stderr] [INFO] [stderr] warning: unused variable: `slice_two` [INFO] [stderr] --> src/main.rs:124:9 [INFO] [stderr] | [INFO] [stderr] 124 | let slice_two: &[i32] = &[3, 4]; [INFO] [stderr] | ^^^^^^^^^ help: consider using `_slice_two` instead [INFO] [stderr] [INFO] [stderr] warning: function is never used: `num_combinations` [INFO] [stderr] --> src/main.rs:19:1 [INFO] [stderr] | [INFO] [stderr] 19 | fn num_combinations(num_items: u64, take: u64) -> BigUint { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: function is never used: `print` [INFO] [stderr] --> src/main.rs:62:1 [INFO] [stderr] | [INFO] [stderr] 62 | fn print(thing: T) -> T{ [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: this `.fold` can be written more succinctly using another method [INFO] [stderr] --> src/main.rs:35:27 [INFO] [stderr] | [INFO] [stderr] 35 | (0..num_items).fold(0, |acc, i| acc + i) as u64 [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `.sum()` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::unnecessary_fold)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fold [INFO] [stderr] [INFO] [stderr] warning: You are using an explicit closure for cloning elements [INFO] [stderr] --> src/main.rs:74:14 [INFO] [stderr] | [INFO] [stderr] 74 | vec![items.iter().map(|i| i.clone()).collect()] [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: Consider calling the dedicated `cloned` method: `items.iter().cloned()` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::map_clone)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stderr] [INFO] [stderr] warning: this .into_iter() call is equivalent to .iter() and will not move the slice [INFO] [stderr] --> src/main.rs:80:14 [INFO] [stderr] | [INFO] [stderr] 80 | .into_iter() [INFO] [stderr] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::into_iter_on_ref)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stderr] [INFO] [stderr] warning: an inclusive range would be more readable [INFO] [stderr] --> src/main.rs:85:41 [INFO] [stderr] | [INFO] [stderr] 85 | let index_item = &items[index..index + 1]; [INFO] [stderr] | ^^^^^^^^^^^^^^^^ help: use: `index..=index` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::range_plus_one)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#range_plus_one [INFO] [stderr] [INFO] [stderr] warning: unused variable: `slice_one` [INFO] [stderr] --> src/main.rs:123:9 [INFO] [stderr] | [INFO] [stderr] 123 | let slice_one: &[i32] = &[1, 2, 3, 4, 5]; [INFO] [stderr] | ^^^^^^^^^ help: consider using `_slice_one` instead [INFO] [stderr] | [INFO] [stderr] = note: #[warn(unused_variables)] on by default [INFO] [stderr] [INFO] [stderr] warning: unused variable: `slice_two` [INFO] [stderr] --> src/main.rs:124:9 [INFO] [stderr] | [INFO] [stderr] 124 | let slice_two: &[i32] = &[3, 4]; [INFO] [stderr] | ^^^^^^^^^ help: consider using `_slice_two` instead [INFO] [stderr] [INFO] [stderr] warning: function is never used: `num_combinations` [INFO] [stderr] --> src/main.rs:19:1 [INFO] [stderr] | [INFO] [stderr] 19 | fn num_combinations(num_items: u64, take: u64) -> BigUint { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: function is never used: `print` [INFO] [stderr] --> src/main.rs:62:1 [INFO] [stderr] | [INFO] [stderr] 62 | fn print(thing: T) -> T{ [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: this `.fold` can be written more succinctly using another method [INFO] [stderr] --> src/main.rs:35:27 [INFO] [stderr] | [INFO] [stderr] 35 | (0..num_items).fold(0, |acc, i| acc + i) as u64 [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `.sum()` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::unnecessary_fold)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fold [INFO] [stderr] [INFO] [stderr] warning: You are using an explicit closure for cloning elements [INFO] [stderr] --> src/main.rs:74:14 [INFO] [stderr] | [INFO] [stderr] 74 | vec![items.iter().map(|i| i.clone()).collect()] [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: Consider calling the dedicated `cloned` method: `items.iter().cloned()` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::map_clone)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stderr] [INFO] [stderr] warning: this .into_iter() call is equivalent to .iter() and will not move the slice [INFO] [stderr] --> src/main.rs:80:14 [INFO] [stderr] | [INFO] [stderr] 80 | .into_iter() [INFO] [stderr] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::into_iter_on_ref)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stderr] [INFO] [stderr] warning: an inclusive range would be more readable [INFO] [stderr] --> src/main.rs:85:41 [INFO] [stderr] | [INFO] [stderr] 85 | let index_item = &items[index..index + 1]; [INFO] [stderr] | ^^^^^^^^^^^^^^^^ help: use: `index..=index` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::range_plus_one)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#range_plus_one [INFO] [stderr] [INFO] [stderr] Finished dev [unoptimized + debuginfo] target(s) in 0.98s [INFO] running `"docker" "inspect" "9120081b40254cda858793efbefd806e3dcd26894a7cdf4bd89365261b52c1e9"` [INFO] running `"docker" "rm" "-f" "9120081b40254cda858793efbefd806e3dcd26894a7cdf4bd89365261b52c1e9"` [INFO] [stdout] 9120081b40254cda858793efbefd806e3dcd26894a7cdf4bd89365261b52c1e9