[INFO] updating cached repository memoryleak47/typo [INFO] running `"git" "fetch" "--all"` [INFO] [stdout] Fetching origin [INFO] [stderr] From git://github.com/memoryleak47/typo [INFO] [stderr] * branch HEAD -> FETCH_HEAD [INFO] running `"git" "clone" "work/cache/sources/gh/memoryleak47/typo" "work/ex/clippy-test-run/sources/stable/gh/memoryleak47/typo"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable/gh/memoryleak47/typo'... [INFO] [stderr] done. [INFO] running `"git" "clone" "work/cache/sources/gh/memoryleak47/typo" "work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/memoryleak47/typo"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/memoryleak47/typo'... [INFO] [stderr] done. [INFO] running `"git" "rev-parse" "HEAD"` [INFO] [stdout] 82b318ef6a9174d0c62c932f20967ef7c8778df8 [INFO] sha for GitHub repo memoryleak47/typo: 82b318ef6a9174d0c62c932f20967ef7c8778df8 [INFO] validating manifest of memoryleak47/typo 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 memoryleak47/typo 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 memoryleak47/typo [INFO] finished frobbing memoryleak47/typo [INFO] frobbed toml for memoryleak47/typo written to work/ex/clippy-test-run/sources/stable/gh/memoryleak47/typo/Cargo.toml [INFO] started frobbing memoryleak47/typo [INFO] finished frobbing memoryleak47/typo [INFO] frobbed toml for memoryleak47/typo written to work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/memoryleak47/typo/Cargo.toml [INFO] crate memoryleak47/typo 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 memoryleak47/typo 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-4/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/memoryleak47/typo:/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] cdd43479b71160c57e24ba8f0638b89c2fac2dc6939591f604e34459eb402b34 [INFO] running `"docker" "start" "-a" "cdd43479b71160c57e24ba8f0638b89c2fac2dc6939591f604e34459eb402b34"` [INFO] [stderr] Checking typo v0.1.0 (/opt/crater/workdir) [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/typos.rs:11:4 [INFO] [stderr] | [INFO] [stderr] 11 | word: word, [INFO] [stderr] | ^^^^^^^^^^ help: replace it with: `word` [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/typos.rs:11:4 [INFO] [stderr] | [INFO] [stderr] 11 | word: word, [INFO] [stderr] | ^^^^^^^^^^ help: replace it with: `word` [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: unneeded return statement [INFO] [stderr] --> src/files.rs:11:2 [INFO] [stderr] | [INFO] [stderr] 11 | return if pbuf.is_file() { [INFO] [stderr] | _____^ [INFO] [stderr] 12 | | Ok(vec![pbuf]) [INFO] [stderr] 13 | | } else if pbuf.is_dir() { [INFO] [stderr] 14 | | let rd = read_dir(pbuf) [INFO] [stderr] ... | [INFO] [stderr] 27 | | panic!("unknown case, this is a bug") [INFO] [stderr] 28 | | }; [INFO] [stderr] | |______^ [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] help: remove `return` as shown [INFO] [stderr] | [INFO] [stderr] 11 | if pbuf.is_file() { [INFO] [stderr] 12 | Ok(vec![pbuf]) [INFO] [stderr] 13 | } else if pbuf.is_dir() { [INFO] [stderr] 14 | let rd = read_dir(pbuf) [INFO] [stderr] 15 | .map_err(|x| x.to_string())?; [INFO] [stderr] 16 | rd.map(|entry| -> Res> { [INFO] [stderr] ... [INFO] [stderr] [INFO] [stderr] warning: unneeded return statement [INFO] [stderr] --> src/typos.rs:76:2 [INFO] [stderr] | [INFO] [stderr] 76 | return 0.0; [INFO] [stderr] | ^^^^^^^^^^^ help: remove `return` as shown: `0.0` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stderr] [INFO] [stderr] warning: unneeded return statement [INFO] [stderr] --> src/files.rs:11:2 [INFO] [stderr] | [INFO] [stderr] 11 | return if pbuf.is_file() { [INFO] [stderr] | _____^ [INFO] [stderr] 12 | | Ok(vec![pbuf]) [INFO] [stderr] 13 | | } else if pbuf.is_dir() { [INFO] [stderr] 14 | | let rd = read_dir(pbuf) [INFO] [stderr] ... | [INFO] [stderr] 27 | | panic!("unknown case, this is a bug") [INFO] [stderr] 28 | | }; [INFO] [stderr] | |______^ [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] help: remove `return` as shown [INFO] [stderr] | [INFO] [stderr] 11 | if pbuf.is_file() { [INFO] [stderr] 12 | Ok(vec![pbuf]) [INFO] [stderr] 13 | } else if pbuf.is_dir() { [INFO] [stderr] 14 | let rd = read_dir(pbuf) [INFO] [stderr] 15 | .map_err(|x| x.to_string())?; [INFO] [stderr] 16 | rd.map(|entry| -> Res> { [INFO] [stderr] ... [INFO] [stderr] [INFO] [stderr] warning: unneeded return statement [INFO] [stderr] --> src/typos.rs:76:2 [INFO] [stderr] | [INFO] [stderr] 76 | return 0.0; [INFO] [stderr] | ^^^^^^^^^^^ help: remove `return` as shown: `0.0` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/words.rs:51:20 [INFO] [stderr] | [INFO] [stderr] 51 | .unwrap_or_else(|| Vec::new()); [INFO] [stderr] | ^^^^^^^^^^^^^ help: remove closure as shown: `Vec::new` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::redundant_closure)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration) [INFO] [stderr] --> src/words.rs:77:1 [INFO] [stderr] | [INFO] [stderr] 77 | / pub fn find_words<'a>(files: &'a [PathBuf]) -> Words<'a> { [INFO] [stderr] 78 | | files.iter() [INFO] [stderr] 79 | | .map(|file| Words::from(file.as_path())) [INFO] [stderr] 80 | | .fold(Words::new(), [INFO] [stderr] 81 | | |old_words, new_words| Words::merge(old_words, new_words) [INFO] [stderr] 82 | | ) [INFO] [stderr] 83 | | } [INFO] [stderr] | |_^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::needless_lifetimes)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/words.rs:81:4 [INFO] [stderr] | [INFO] [stderr] 81 | |old_words, new_words| Words::merge(old_words, new_words) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `Words::merge` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: called `.get().unwrap()` on a HashMap. Using `[]` is more clear and more concise [INFO] [stderr] --> src/typos.rs:18:23 [INFO] [stderr] | [INFO] [stderr] 18 | let freq = |x: &str| words.map.get(x).unwrap().len(); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `&words.map[x]` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::get_unwrap)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_unwrap [INFO] [stderr] [INFO] [stderr] warning: needlessly taken reference of left operand [INFO] [stderr] --> src/typos.rs:42:6 [INFO] [stderr] | [INFO] [stderr] 42 | if &s == b { [INFO] [stderr] | --^^^^^ [INFO] [stderr] | | [INFO] [stderr] | help: use the left value directly: `s` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::op_ref)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stderr] [INFO] [stderr] warning: needlessly taken reference of left operand [INFO] [stderr] --> src/typos.rs:61:6 [INFO] [stderr] | [INFO] [stderr] 61 | if &s == b { [INFO] [stderr] | --^^^^^ [INFO] [stderr] | | [INFO] [stderr] | help: use the left value directly: `s` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stderr] [INFO] [stderr] warning: called `.get().unwrap()` on a HashMap. Using `[]` is more clear and more concise [INFO] [stderr] --> src/typos.rs:98:15 [INFO] [stderr] | [INFO] [stderr] 98 | for occ in words.map.get(typo.word).unwrap() { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `&words.map[typo.word]` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_unwrap [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/words.rs:51:20 [INFO] [stderr] | [INFO] [stderr] 51 | .unwrap_or_else(|| Vec::new()); [INFO] [stderr] | ^^^^^^^^^^^^^ help: remove closure as shown: `Vec::new` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::redundant_closure)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration) [INFO] [stderr] --> src/words.rs:77:1 [INFO] [stderr] | [INFO] [stderr] 77 | / pub fn find_words<'a>(files: &'a [PathBuf]) -> Words<'a> { [INFO] [stderr] 78 | | files.iter() [INFO] [stderr] 79 | | .map(|file| Words::from(file.as_path())) [INFO] [stderr] 80 | | .fold(Words::new(), [INFO] [stderr] 81 | | |old_words, new_words| Words::merge(old_words, new_words) [INFO] [stderr] 82 | | ) [INFO] [stderr] 83 | | } [INFO] [stderr] | |_^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::needless_lifetimes)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/words.rs:81:4 [INFO] [stderr] | [INFO] [stderr] 81 | |old_words, new_words| Words::merge(old_words, new_words) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `Words::merge` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: called `.get().unwrap()` on a HashMap. Using `[]` is more clear and more concise [INFO] [stderr] --> src/typos.rs:18:23 [INFO] [stderr] | [INFO] [stderr] 18 | let freq = |x: &str| words.map.get(x).unwrap().len(); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `&words.map[x]` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::get_unwrap)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_unwrap [INFO] [stderr] [INFO] [stderr] warning: needlessly taken reference of left operand [INFO] [stderr] --> src/typos.rs:42:6 [INFO] [stderr] | [INFO] [stderr] 42 | if &s == b { [INFO] [stderr] | --^^^^^ [INFO] [stderr] | | [INFO] [stderr] | help: use the left value directly: `s` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::op_ref)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stderr] [INFO] [stderr] warning: needlessly taken reference of left operand [INFO] [stderr] --> src/typos.rs:61:6 [INFO] [stderr] | [INFO] [stderr] 61 | if &s == b { [INFO] [stderr] | --^^^^^ [INFO] [stderr] | | [INFO] [stderr] | help: use the left value directly: `s` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stderr] [INFO] [stderr] warning: called `.get().unwrap()` on a HashMap. Using `[]` is more clear and more concise [INFO] [stderr] --> src/typos.rs:98:15 [INFO] [stderr] | [INFO] [stderr] 98 | for occ in words.map.get(typo.word).unwrap() { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `&words.map[typo.word]` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_unwrap [INFO] [stderr] [INFO] [stderr] Finished dev [unoptimized + debuginfo] target(s) in 0.70s [INFO] running `"docker" "inspect" "cdd43479b71160c57e24ba8f0638b89c2fac2dc6939591f604e34459eb402b34"` [INFO] running `"docker" "rm" "-f" "cdd43479b71160c57e24ba8f0638b89c2fac2dc6939591f604e34459eb402b34"` [INFO] [stdout] cdd43479b71160c57e24ba8f0638b89c2fac2dc6939591f604e34459eb402b34