[INFO] crate hask-replace 0.6.0 is already in cache [INFO] extracting crate hask-replace 0.6.0 into work/ex/clippy-test-run/sources/stable/reg/hask-replace/0.6.0 [INFO] extracting crate hask-replace 0.6.0 into work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/reg/hask-replace/0.6.0 [INFO] validating manifest of hask-replace-0.6.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 hask-replace-0.6.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 hask-replace-0.6.0 [INFO] finished frobbing hask-replace-0.6.0 [INFO] frobbed toml for hask-replace-0.6.0 written to work/ex/clippy-test-run/sources/stable/reg/hask-replace/0.6.0/Cargo.toml [INFO] started frobbing hask-replace-0.6.0 [INFO] finished frobbing hask-replace-0.6.0 [INFO] frobbed toml for hask-replace-0.6.0 written to work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/reg/hask-replace/0.6.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 hask-replace-0.6.0 against stable for clippy-test-run [INFO] running `"docker" "create" "-v" "/mnt/big/crater/work/local/target-dirs/clippy-test-run/worker-2/stable:/opt/crater/target:rw,Z" "-v" "/mnt/big/crater/work/ex/clippy-test-run/sources/stable/reg/hask-replace/0.6.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] 597c2f1ae60b840c848f87e4cd7add7a695ce471300f738834eea08faf7f414d [INFO] running `"docker" "start" "-a" "597c2f1ae60b840c848f87e4cd7add7a695ce471300f738834eea08faf7f414d"` [INFO] [stderr] Compiling regex v0.2.11 [INFO] [stderr] Checking rayon v0.8.2 [INFO] [stderr] Checking hask-replace v0.6.0 (/opt/crater/workdir) [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/main.rs:91:13 [INFO] [stderr] | [INFO] [stderr] 91 | copy: copy, [INFO] [stderr] | ^^^^^^^^^^ help: replace it with: `copy` [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/main.rs:104:13 [INFO] [stderr] | [INFO] [stderr] 104 | copy: copy, [INFO] [stderr] | ^^^^^^^^^^ help: replace it with: `copy` [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/main.rs:91:13 [INFO] [stderr] | [INFO] [stderr] 91 | copy: copy, [INFO] [stderr] | ^^^^^^^^^^ help: replace it with: `copy` [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/main.rs:104:13 [INFO] [stderr] | [INFO] [stderr] 104 | copy: copy, [INFO] [stderr] | ^^^^^^^^^^ help: replace it with: `copy` [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 unit return type [INFO] [stderr] --> src/main.rs:171:3 [INFO] [stderr] | [INFO] [stderr] 171 | ) -> () { [INFO] [stderr] | ^^^^^ help: remove the `-> ()` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::unused_unit)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stderr] [INFO] [stderr] warning: unneeded unit return type [INFO] [stderr] --> src/main.rs:203:3 [INFO] [stderr] | [INFO] [stderr] 203 | ) -> () { [INFO] [stderr] | ^^^^^ help: remove the `-> ()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stderr] [INFO] [stderr] warning: unneeded unit return type [INFO] [stderr] --> src/main.rs:234:54 [INFO] [stderr] | [INFO] [stderr] 234 | fn write_file + Debug>(p: P, s: &str) -> () { [INFO] [stderr] | ^^^^^ help: remove the `-> ()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stderr] [INFO] [stderr] warning: unneeded unit return type [INFO] [stderr] --> src/main.rs:288:75 [INFO] [stderr] | [INFO] [stderr] 288 | fn replace_all(config: &ProjectOwned, old_module: &str, new_module: &str) -> () { [INFO] [stderr] | ^^^^^ help: remove the `-> ()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stderr] [INFO] [stderr] warning: Creating a reference that is immediately dereferenced. [INFO] [stderr] --> src/main.rs:405:38 [INFO] [stderr] | [INFO] [stderr] 405 | let mut file_name: PathBuf = (&config).dir.to_owned(); [INFO] [stderr] | ^^^^^^^^^ help: try this: `config.dir` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::ref_in_deref)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ref_in_deref [INFO] [stderr] [INFO] [stderr] warning: unneeded unit return type [INFO] [stderr] --> src/main.rs:432:29 [INFO] [stderr] | [INFO] [stderr] 432 | fn git_stash(src_dir: &str) -> () { [INFO] [stderr] | ^^^^^ help: remove the `-> ()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stderr] [INFO] [stderr] warning: unneeded unit return type [INFO] [stderr] --> src/main.rs:171:3 [INFO] [stderr] | [INFO] [stderr] 171 | ) -> () { [INFO] [stderr] | ^^^^^ help: remove the `-> ()` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::unused_unit)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stderr] [INFO] [stderr] warning: unneeded unit return type [INFO] [stderr] --> src/main.rs:203:3 [INFO] [stderr] | [INFO] [stderr] 203 | ) -> () { [INFO] [stderr] | ^^^^^ help: remove the `-> ()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stderr] [INFO] [stderr] warning: unneeded unit return type [INFO] [stderr] --> src/main.rs:234:54 [INFO] [stderr] | [INFO] [stderr] 234 | fn write_file + Debug>(p: P, s: &str) -> () { [INFO] [stderr] | ^^^^^ help: remove the `-> ()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stderr] [INFO] [stderr] warning: unneeded unit return type [INFO] [stderr] --> src/main.rs:288:75 [INFO] [stderr] | [INFO] [stderr] 288 | fn replace_all(config: &ProjectOwned, old_module: &str, new_module: &str) -> () { [INFO] [stderr] | ^^^^^ help: remove the `-> ()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stderr] [INFO] [stderr] warning: Creating a reference that is immediately dereferenced. [INFO] [stderr] --> src/main.rs:405:38 [INFO] [stderr] | [INFO] [stderr] 405 | let mut file_name: PathBuf = (&config).dir.to_owned(); [INFO] [stderr] | ^^^^^^^^^ help: try this: `config.dir` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::ref_in_deref)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ref_in_deref [INFO] [stderr] [INFO] [stderr] warning: unneeded unit return type [INFO] [stderr] --> src/main.rs:432:29 [INFO] [stderr] | [INFO] [stderr] 432 | fn git_stash(src_dir: &str) -> () { [INFO] [stderr] | ^^^^^ help: remove the `-> ()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stderr] [INFO] [stderr] warning: this `.fold` can be written more succinctly using another method [INFO] [stderr] --> src/main.rs:56:34 [INFO] [stderr] | [INFO] [stderr] 56 | (find.into_iter().fold( [INFO] [stderr] | __________________________________^ [INFO] [stderr] 57 | | false, [INFO] [stderr] 58 | | |bool_accumulator, string_ext| { [INFO] [stderr] 59 | | bool_accumulator || p_str.ends_with(string_ext) [INFO] [stderr] 60 | | }, [INFO] [stderr] | |______________________^ help: try: `.any(|string_ext| p_str.ends_with(string_ext))` [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: this .into_iter() call is equivalent to .iter() and will not move the slice [INFO] [stderr] --> src/main.rs:56:23 [INFO] [stderr] | [INFO] [stderr] 56 | (find.into_iter().fold( [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: this `.fold` can be written more succinctly using another method [INFO] [stderr] --> src/main.rs:135:38 [INFO] [stderr] | [INFO] [stderr] 135 | extension.into_iter().fold( [INFO] [stderr] | ______________________________________^ [INFO] [stderr] 136 | | false, [INFO] [stderr] 137 | | |bool_accumulator, string_ext| { [INFO] [stderr] 138 | | bool_accumulator || p_str.ends_with(string_ext) [INFO] [stderr] 139 | | }, [INFO] [stderr] | |______________________^ help: try: `.any(|string_ext| p_str.ends_with(string_ext))` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fold [INFO] [stderr] [INFO] [stderr] warning: this .into_iter() call is equivalent to .iter() and will not move the slice [INFO] [stderr] --> src/main.rs:135:27 [INFO] [stderr] | [INFO] [stderr] 135 | extension.into_iter().fold( [INFO] [stderr] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stderr] | [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: this .into_iter() call is equivalent to .iter() and will not move the slice [INFO] [stderr] --> src/main.rs:150:74 [INFO] [stderr] | [INFO] [stderr] 150 | let mut replacements_vec: Vec = Vec::with_capacity(extension.into_iter().count()); [INFO] [stderr] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stderr] | [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: this .into_iter() call is equivalent to .iter() and will not move the slice [INFO] [stderr] --> src/main.rs:154:40 [INFO] [stderr] | [INFO] [stderr] 154 | let mut extension_iter = extension.into_iter(); [INFO] [stderr] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stderr] | [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: this .into_iter() call is equivalent to .iter() and will not move the slice [INFO] [stderr] --> src/main.rs:185:28 [INFO] [stderr] | [INFO] [stderr] 185 | let num = if extension.into_iter().next().unwrap() == ".idr" { [INFO] [stderr] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stderr] | [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: this .into_iter() call is equivalent to .iter() and will not move the slice [INFO] [stderr] --> src/main.rs:221:32 [INFO] [stderr] | [INFO] [stderr] 221 | let num = if extension.into_iter().next().unwrap() == ".idr" { [INFO] [stderr] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stderr] | [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: called `filter(p).next()` on an `Iterator`. This is more succinctly expressed by calling `.find(p)` instead. [INFO] [stderr] --> src/main.rs:387:31 [INFO] [stderr] | [INFO] [stderr] 387 | new_module_path.push_str(&module_to_file_names(new_module, module_ext) [INFO] [stderr] | _______________________________^ [INFO] [stderr] 388 | | .into_iter() [INFO] [stderr] 389 | | .filter(|p| p.ends_with(&extn)) [INFO] [stderr] 390 | | .next() [INFO] [stderr] | |_______________^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::filter_next)] on by default [INFO] [stderr] = note: replace `filter(|p| p.ends_with(&extn)).next()` with `find(|p| p.ends_with(&extn))` [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#filter_next [INFO] [stderr] [INFO] [stderr] warning: this `.fold` can be written more succinctly using another method [INFO] [stderr] --> src/main.rs:56:34 [INFO] [stderr] | [INFO] [stderr] 56 | (find.into_iter().fold( [INFO] [stderr] | __________________________________^ [INFO] [stderr] 57 | | false, [INFO] [stderr] 58 | | |bool_accumulator, string_ext| { [INFO] [stderr] 59 | | bool_accumulator || p_str.ends_with(string_ext) [INFO] [stderr] 60 | | }, [INFO] [stderr] | |______________________^ help: try: `.any(|string_ext| p_str.ends_with(string_ext))` [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: this .into_iter() call is equivalent to .iter() and will not move the slice [INFO] [stderr] --> src/main.rs:56:23 [INFO] [stderr] | [INFO] [stderr] 56 | (find.into_iter().fold( [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: this `.fold` can be written more succinctly using another method [INFO] [stderr] --> src/main.rs:135:38 [INFO] [stderr] | [INFO] [stderr] 135 | extension.into_iter().fold( [INFO] [stderr] | ______________________________________^ [INFO] [stderr] 136 | | false, [INFO] [stderr] 137 | | |bool_accumulator, string_ext| { [INFO] [stderr] 138 | | bool_accumulator || p_str.ends_with(string_ext) [INFO] [stderr] 139 | | }, [INFO] [stderr] | |______________________^ help: try: `.any(|string_ext| p_str.ends_with(string_ext))` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fold [INFO] [stderr] [INFO] [stderr] warning: this .into_iter() call is equivalent to .iter() and will not move the slice [INFO] [stderr] --> src/main.rs:135:27 [INFO] [stderr] | [INFO] [stderr] 135 | extension.into_iter().fold( [INFO] [stderr] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stderr] | [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: this .into_iter() call is equivalent to .iter() and will not move the slice [INFO] [stderr] --> src/main.rs:150:74 [INFO] [stderr] | [INFO] [stderr] 150 | let mut replacements_vec: Vec = Vec::with_capacity(extension.into_iter().count()); [INFO] [stderr] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stderr] | [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: this .into_iter() call is equivalent to .iter() and will not move the slice [INFO] [stderr] --> src/main.rs:154:40 [INFO] [stderr] | [INFO] [stderr] 154 | let mut extension_iter = extension.into_iter(); [INFO] [stderr] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stderr] | [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: this .into_iter() call is equivalent to .iter() and will not move the slice [INFO] [stderr] --> src/main.rs:185:28 [INFO] [stderr] | [INFO] [stderr] 185 | let num = if extension.into_iter().next().unwrap() == ".idr" { [INFO] [stderr] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stderr] | [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: this .into_iter() call is equivalent to .iter() and will not move the slice [INFO] [stderr] --> src/main.rs:221:32 [INFO] [stderr] | [INFO] [stderr] 221 | let num = if extension.into_iter().next().unwrap() == ".idr" { [INFO] [stderr] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stderr] | [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: called `filter(p).next()` on an `Iterator`. This is more succinctly expressed by calling `.find(p)` instead. [INFO] [stderr] --> src/main.rs:387:31 [INFO] [stderr] | [INFO] [stderr] 387 | new_module_path.push_str(&module_to_file_names(new_module, module_ext) [INFO] [stderr] | _______________________________^ [INFO] [stderr] 388 | | .into_iter() [INFO] [stderr] 389 | | .filter(|p| p.ends_with(&extn)) [INFO] [stderr] 390 | | .next() [INFO] [stderr] | |_______________^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::filter_next)] on by default [INFO] [stderr] = note: replace `filter(|p| p.ends_with(&extn)).next()` with `find(|p| p.ends_with(&extn))` [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#filter_next [INFO] [stderr] [INFO] [stderr] Finished dev [unoptimized + debuginfo] target(s) in 12.15s [INFO] running `"docker" "inspect" "597c2f1ae60b840c848f87e4cd7add7a695ce471300f738834eea08faf7f414d"` [INFO] running `"docker" "rm" "-f" "597c2f1ae60b840c848f87e4cd7add7a695ce471300f738834eea08faf7f414d"` [INFO] [stdout] 597c2f1ae60b840c848f87e4cd7add7a695ce471300f738834eea08faf7f414d