[INFO] updating cached repository Matthew-Maclean/part-dir [INFO] running `"git" "fetch" "--all"` [INFO] [stdout] Fetching origin [INFO] [stderr] From git://github.com/Matthew-Maclean/part-dir [INFO] [stderr] * branch HEAD -> FETCH_HEAD [INFO] running `"git" "clone" "work/cache/sources/gh/Matthew-Maclean/part-dir" "work/ex/clippy-test-run/sources/stable/gh/Matthew-Maclean/part-dir"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable/gh/Matthew-Maclean/part-dir'... [INFO] [stderr] done. [INFO] running `"git" "clone" "work/cache/sources/gh/Matthew-Maclean/part-dir" "work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/Matthew-Maclean/part-dir"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/Matthew-Maclean/part-dir'... [INFO] [stderr] done. [INFO] running `"git" "rev-parse" "HEAD"` [INFO] [stdout] b7ab173c2773fac331e62e5a4d20e05ffac93949 [INFO] sha for GitHub repo Matthew-Maclean/part-dir: b7ab173c2773fac331e62e5a4d20e05ffac93949 [INFO] validating manifest of Matthew-Maclean/part-dir 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 Matthew-Maclean/part-dir 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 Matthew-Maclean/part-dir [INFO] finished frobbing Matthew-Maclean/part-dir [INFO] frobbed toml for Matthew-Maclean/part-dir written to work/ex/clippy-test-run/sources/stable/gh/Matthew-Maclean/part-dir/Cargo.toml [INFO] started frobbing Matthew-Maclean/part-dir [INFO] finished frobbing Matthew-Maclean/part-dir [INFO] frobbed toml for Matthew-Maclean/part-dir written to work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/Matthew-Maclean/part-dir/Cargo.toml [INFO] crate Matthew-Maclean/part-dir 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 Matthew-Maclean/part-dir against stable for clippy-test-run [INFO] running `"docker" "create" "-v" "/mnt/big/crater/work/local/target-dirs/clippy-test-run/worker-1/stable:/opt/crater/target:rw,Z" "-v" "/mnt/big/crater/work/ex/clippy-test-run/sources/stable/gh/Matthew-Maclean/part-dir:/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] 025740bac88ae8a9e8484a0244cad16a489b1d958e4fce8467833d4c5bfe1be1 [INFO] running `"docker" "start" "-a" "025740bac88ae8a9e8484a0244cad16a489b1d958e4fce8467833d4c5bfe1be1"` [INFO] [stderr] Checking structopt v0.1.6 [INFO] [stderr] Checking part-dir v0.1.0 (/opt/crater/workdir) [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/item_stream.rs:24:13 [INFO] [stderr] | [INFO] [stderr] 24 | recurse: recurse, [INFO] [stderr] | ^^^^^^^^^^^^^^^^ help: replace it with: `recurse` [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/item_stream.rs:27:13 [INFO] [stderr] | [INFO] [stderr] 27 | errors: errors, [INFO] [stderr] | ^^^^^^^^^^^^^^ help: replace it with: `errors` [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/item_stream.rs:80:17 [INFO] [stderr] | [INFO] [stderr] 80 | relpath: relpath, [INFO] [stderr] | ^^^^^^^^^^^^^^^^ help: replace it with: `relpath` [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/item_stream.rs:81:17 [INFO] [stderr] | [INFO] [stderr] 81 | path: path, [INFO] [stderr] | ^^^^^^^^^^ help: replace it with: `path` [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/item_stream.rs:136:29 [INFO] [stderr] | [INFO] [stderr] 136 | relpath: relpath, [INFO] [stderr] | ^^^^^^^^^^^^^^^^ help: replace it with: `relpath` [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/item_stream.rs:137:29 [INFO] [stderr] | [INFO] [stderr] 137 | path: path, [INFO] [stderr] | ^^^^^^^^^^ help: replace it with: `path` [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/item_stream.rs:159:17 [INFO] [stderr] | [INFO] [stderr] 159 | size: size, [INFO] [stderr] | ^^^^^^^^^^ help: replace it with: `size` [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/item_stream.rs:160:17 [INFO] [stderr] | [INFO] [stderr] 160 | contents: contents, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^ help: replace it with: `contents` [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/item_stream.rs:24:13 [INFO] [stderr] | [INFO] [stderr] 24 | recurse: recurse, [INFO] [stderr] | ^^^^^^^^^^^^^^^^ help: replace it with: `recurse` [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/item_stream.rs:27:13 [INFO] [stderr] | [INFO] [stderr] 27 | errors: errors, [INFO] [stderr] | ^^^^^^^^^^^^^^ help: replace it with: `errors` [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/item_stream.rs:80:17 [INFO] [stderr] | [INFO] [stderr] 80 | relpath: relpath, [INFO] [stderr] | ^^^^^^^^^^^^^^^^ help: replace it with: `relpath` [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/item_stream.rs:81:17 [INFO] [stderr] | [INFO] [stderr] 81 | path: path, [INFO] [stderr] | ^^^^^^^^^^ help: replace it with: `path` [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/item_stream.rs:136:29 [INFO] [stderr] | [INFO] [stderr] 136 | relpath: relpath, [INFO] [stderr] | ^^^^^^^^^^^^^^^^ help: replace it with: `relpath` [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/item_stream.rs:137:29 [INFO] [stderr] | [INFO] [stderr] 137 | path: path, [INFO] [stderr] | ^^^^^^^^^^ help: replace it with: `path` [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/item_stream.rs:159:17 [INFO] [stderr] | [INFO] [stderr] 159 | size: size, [INFO] [stderr] | ^^^^^^^^^^ help: replace it with: `size` [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/item_stream.rs:160:17 [INFO] [stderr] | [INFO] [stderr] 160 | contents: contents, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^ help: replace it with: `contents` [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: the operation is ineffective. Consider reducing it to `num` [INFO] [stderr] --> src/options.rs:55:35 [INFO] [stderr] | [INFO] [stderr] 55 | "" | "b" => Ok(Size(num * 1)), [INFO] [stderr] | ^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::identity_op)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stderr] [INFO] [stderr] warning: you don't need to add `&` to all patterns [INFO] [stderr] --> src/item.rs:23:9 [INFO] [stderr] | [INFO] [stderr] 23 | / match self [INFO] [stderr] 24 | | { [INFO] [stderr] 25 | | &Item::File{ ref size, .. } => *size, [INFO] [stderr] 26 | | &Item::Directory{ ref size, .. } => *size, [INFO] [stderr] 27 | | } [INFO] [stderr] | |_________^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::match_ref_pats)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stderr] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stderr] | [INFO] [stderr] 23 | match *self [INFO] [stderr] 24 | { [INFO] [stderr] 25 | Item::File{ ref size, .. } => *size, [INFO] [stderr] 26 | Item::Directory{ ref size, .. } => *size, [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: redundant pattern matching, consider using `is_err()` [INFO] [stderr] --> src/item.rs:47:28 [INFO] [stderr] | [INFO] [stderr] 47 | if let Err(_) = create_dir_all(parent) [INFO] [stderr] | _____________________- ^^^^^^ [INFO] [stderr] 48 | | { [INFO] [stderr] 49 | | return false; [INFO] [stderr] 50 | | } [INFO] [stderr] | |_____________________- help: try this: `if create_dir_all(parent).is_err()` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::redundant_pattern_matching)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stderr] [INFO] [stderr] warning: redundant pattern matching, consider using `is_err()` [INFO] [stderr] --> src/item.rs:80:44 [INFO] [stderr] | [INFO] [stderr] 80 | if let Err(_) = create_dir_all(parent) [INFO] [stderr] | _____________________________________- ^^^^^^ [INFO] [stderr] 81 | | { [INFO] [stderr] 82 | | return false; [INFO] [stderr] 83 | | } [INFO] [stderr] | |_____________________________________- help: try this: `if create_dir_all(parent).is_err()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stderr] [INFO] [stderr] warning: redundant pattern matching, consider using `is_err()` [INFO] [stderr] --> src/item.rs:86:40 [INFO] [stderr] | [INFO] [stderr] 86 | if let Err(_) = copy(path, outpath) [INFO] [stderr] | _________________________________- ^^^^^^ [INFO] [stderr] 87 | | { [INFO] [stderr] 88 | | return false; [INFO] [stderr] 89 | | } [INFO] [stderr] | |_________________________________- help: try this: `if copy(path, outpath).is_err()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [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/part.rs:27:5 [INFO] [stderr] | [INFO] [stderr] 27 | / pub fn partition<'a>(stream: ItemStream<'a>, size: u64) -> Vec [INFO] [stderr] 28 | | { [INFO] [stderr] 29 | | let mut current = Part::new(); [INFO] [stderr] 30 | | let mut parts = Vec::new(); [INFO] [stderr] ... | [INFO] [stderr] 53 | | parts [INFO] [stderr] 54 | | } [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: length comparison to zero [INFO] [stderr] --> src/main.rs:71:12 [INFO] [stderr] | [INFO] [stderr] 71 | if part.items.len() == 0 [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `part.items.is_empty()` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::len_zero)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stderr] [INFO] [stderr] warning: the operation is ineffective. Consider reducing it to `num` [INFO] [stderr] --> src/options.rs:55:35 [INFO] [stderr] | [INFO] [stderr] 55 | "" | "b" => Ok(Size(num * 1)), [INFO] [stderr] | ^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::identity_op)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stderr] [INFO] [stderr] warning: you don't need to add `&` to all patterns [INFO] [stderr] --> src/item.rs:23:9 [INFO] [stderr] | [INFO] [stderr] 23 | / match self [INFO] [stderr] 24 | | { [INFO] [stderr] 25 | | &Item::File{ ref size, .. } => *size, [INFO] [stderr] 26 | | &Item::Directory{ ref size, .. } => *size, [INFO] [stderr] 27 | | } [INFO] [stderr] | |_________^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::match_ref_pats)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stderr] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stderr] | [INFO] [stderr] 23 | match *self [INFO] [stderr] 24 | { [INFO] [stderr] 25 | Item::File{ ref size, .. } => *size, [INFO] [stderr] 26 | Item::Directory{ ref size, .. } => *size, [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: redundant pattern matching, consider using `is_err()` [INFO] [stderr] --> src/item.rs:47:28 [INFO] [stderr] | [INFO] [stderr] 47 | if let Err(_) = create_dir_all(parent) [INFO] [stderr] | _____________________- ^^^^^^ [INFO] [stderr] 48 | | { [INFO] [stderr] 49 | | return false; [INFO] [stderr] 50 | | } [INFO] [stderr] | |_____________________- help: try this: `if create_dir_all(parent).is_err()` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::redundant_pattern_matching)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stderr] [INFO] [stderr] warning: redundant pattern matching, consider using `is_err()` [INFO] [stderr] --> src/item.rs:80:44 [INFO] [stderr] | [INFO] [stderr] 80 | if let Err(_) = create_dir_all(parent) [INFO] [stderr] | _____________________________________- ^^^^^^ [INFO] [stderr] 81 | | { [INFO] [stderr] 82 | | return false; [INFO] [stderr] 83 | | } [INFO] [stderr] | |_____________________________________- help: try this: `if create_dir_all(parent).is_err()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stderr] [INFO] [stderr] warning: redundant pattern matching, consider using `is_err()` [INFO] [stderr] --> src/item.rs:86:40 [INFO] [stderr] | [INFO] [stderr] 86 | if let Err(_) = copy(path, outpath) [INFO] [stderr] | _________________________________- ^^^^^^ [INFO] [stderr] 87 | | { [INFO] [stderr] 88 | | return false; [INFO] [stderr] 89 | | } [INFO] [stderr] | |_________________________________- help: try this: `if copy(path, outpath).is_err()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [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/part.rs:27:5 [INFO] [stderr] | [INFO] [stderr] 27 | / pub fn partition<'a>(stream: ItemStream<'a>, size: u64) -> Vec [INFO] [stderr] 28 | | { [INFO] [stderr] 29 | | let mut current = Part::new(); [INFO] [stderr] 30 | | let mut parts = Vec::new(); [INFO] [stderr] ... | [INFO] [stderr] 53 | | parts [INFO] [stderr] 54 | | } [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: length comparison to zero [INFO] [stderr] --> src/main.rs:71:12 [INFO] [stderr] | [INFO] [stderr] 71 | if part.items.len() == 0 [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `part.items.is_empty()` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::len_zero)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stderr] [INFO] [stderr] Finished dev [unoptimized + debuginfo] target(s) in 2.80s [INFO] running `"docker" "inspect" "025740bac88ae8a9e8484a0244cad16a489b1d958e4fce8467833d4c5bfe1be1"` [INFO] running `"docker" "rm" "-f" "025740bac88ae8a9e8484a0244cad16a489b1d958e4fce8467833d4c5bfe1be1"` [INFO] [stdout] 025740bac88ae8a9e8484a0244cad16a489b1d958e4fce8467833d4c5bfe1be1