[INFO] crate git-subset 0.1.0 is already in cache [INFO] extracting crate git-subset 0.1.0 into work/ex/clippy-test-run/sources/stable/reg/git-subset/0.1.0 [INFO] extracting crate git-subset 0.1.0 into work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/reg/git-subset/0.1.0 [INFO] validating manifest of git-subset-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 git-subset-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 git-subset-0.1.0 [INFO] finished frobbing git-subset-0.1.0 [INFO] frobbed toml for git-subset-0.1.0 written to work/ex/clippy-test-run/sources/stable/reg/git-subset/0.1.0/Cargo.toml [INFO] started frobbing git-subset-0.1.0 [INFO] finished frobbing git-subset-0.1.0 [INFO] frobbed toml for git-subset-0.1.0 written to work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/reg/git-subset/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 git-subset-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-6/stable:/opt/crater/target:rw,Z" "-v" "/mnt/big/crater/work/ex/clippy-test-run/sources/stable/reg/git-subset/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] 8ad26e024d8d361efb919e2246a0b64295e855c3c580eecd6b830c9608668b24 [INFO] running `"docker" "start" "-a" "8ad26e024d8d361efb919e2246a0b64295e855c3c580eecd6b830c9608668b24"` [INFO] [stderr] Compiling libgit2-sys v0.6.19 [INFO] [stderr] Checking git2 v0.6.11 [INFO] [stderr] Checking git-subset v0.1.0 (/opt/crater/workdir) [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/map.rs:102:21 [INFO] [stderr] | [INFO] [stderr] 102 | Ok(OidMap { map: map }) [INFO] [stderr] | ^^^^^^^^ help: replace it with: `map` [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: using `write!()` with a format string that ends in a single newline, consider using `writeln!()` instead [INFO] [stderr] --> src/map.rs:111:17 [INFO] [stderr] | [INFO] [stderr] 111 | write!(f, " {}\n", v)?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::write_with_newline)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/map.rs:102:21 [INFO] [stderr] | [INFO] [stderr] 102 | Ok(OidMap { map: map }) [INFO] [stderr] | ^^^^^^^^ help: replace it with: `map` [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: using `write!()` with a format string that ends in a single newline, consider using `writeln!()` instead [INFO] [stderr] --> src/map.rs:111:17 [INFO] [stderr] | [INFO] [stderr] 111 | write!(f, " {}\n", v)?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::write_with_newline)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/args.rs:106:44 [INFO] [stderr] | [INFO] [stderr] 106 | Some(values) => values.map(|s| PathBuf::from(s)).collect(), [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `PathBuf::from` [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: single-character string constant used as pattern [INFO] [stderr] --> src/map.rs:81:52 [INFO] [stderr] | [INFO] [stderr] 81 | if line.is_empty() || line.starts_with("#") { [INFO] [stderr] | ^^^ help: try using a char instead: `'#'` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::single_char_pattern)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_pattern [INFO] [stderr] [INFO] [stderr] warning: consider using `Option` instead of `Option>` or a custom enum if you need to distinguish all 3 cases [INFO] [stderr] --> src/map.rs:144:57 [INFO] [stderr] | [INFO] [stderr] 144 | pub fn insert(&mut self, k: Oid, v: Option) -> Option> { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::option_option)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_option [INFO] [stderr] [INFO] [stderr] warning: single-character string constant used as pattern [INFO] [stderr] --> src/filter.rs:54:52 [INFO] [stderr] | [INFO] [stderr] 54 | if line.is_empty() || line.starts_with("#") { [INFO] [stderr] | ^^^ help: try using a char instead: `'#'` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_pattern [INFO] [stderr] [INFO] [stderr] warning: you seem to be trying to use match for destructuring a single pattern. Consider using `if let` [INFO] [stderr] --> src/filter.rs:70:9 [INFO] [stderr] | [INFO] [stderr] 70 | / match components.next() { [INFO] [stderr] 71 | | Some(Component::Normal(c)) => { [INFO] [stderr] 72 | | let mut filter = self.filter [INFO] [stderr] 73 | | .entry(String::from(c.to_str().unwrap())) [INFO] [stderr] ... | [INFO] [stderr] 79 | | _ => {}, [INFO] [stderr] 80 | | } [INFO] [stderr] | |_________^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::single_match)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stderr] help: try this [INFO] [stderr] | [INFO] [stderr] 70 | if let Some(Component::Normal(c)) = components.next() { [INFO] [stderr] 71 | let mut filter = self.filter [INFO] [stderr] 72 | .entry(String::from(c.to_str().unwrap())) [INFO] [stderr] 73 | .or_insert_with(|| Filter::new()); [INFO] [stderr] 74 | [INFO] [stderr] 75 | // Insert the rest of the components recursively. [INFO] [stderr] ... [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/filter.rs:74:37 [INFO] [stderr] | [INFO] [stderr] 74 | .or_insert_with(|| Filter::new()); [INFO] [stderr] | ^^^^^^^^^^^^^^^^ help: remove closure as shown: `Filter::new` [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: length comparison to zero [INFO] [stderr] --> src/filter.rs:165:8 [INFO] [stderr] | [INFO] [stderr] 165 | if builder.len() == 0 { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `builder.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: using `clone` on a `Copy` type [INFO] [stderr] --> src/main.rs:104:18 [INFO] [stderr] | [INFO] [stderr] 104 | let id = id.clone(); [INFO] [stderr] | ^^^^^^^^^^ help: try dereferencing it: `*id` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::clone_on_copy)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/args.rs:106:44 [INFO] [stderr] | [INFO] [stderr] 106 | Some(values) => values.map(|s| PathBuf::from(s)).collect(), [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `PathBuf::from` [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: single-character string constant used as pattern [INFO] [stderr] --> src/map.rs:81:52 [INFO] [stderr] | [INFO] [stderr] 81 | if line.is_empty() || line.starts_with("#") { [INFO] [stderr] | ^^^ help: try using a char instead: `'#'` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::single_char_pattern)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_pattern [INFO] [stderr] [INFO] [stderr] warning: consider using `Option` instead of `Option>` or a custom enum if you need to distinguish all 3 cases [INFO] [stderr] --> src/map.rs:144:57 [INFO] [stderr] | [INFO] [stderr] 144 | pub fn insert(&mut self, k: Oid, v: Option) -> Option> { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::option_option)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_option [INFO] [stderr] [INFO] [stderr] warning: single-character string constant used as pattern [INFO] [stderr] --> src/filter.rs:54:52 [INFO] [stderr] | [INFO] [stderr] 54 | if line.is_empty() || line.starts_with("#") { [INFO] [stderr] | ^^^ help: try using a char instead: `'#'` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_pattern [INFO] [stderr] [INFO] [stderr] warning: you seem to be trying to use match for destructuring a single pattern. Consider using `if let` [INFO] [stderr] --> src/filter.rs:70:9 [INFO] [stderr] | [INFO] [stderr] 70 | / match components.next() { [INFO] [stderr] 71 | | Some(Component::Normal(c)) => { [INFO] [stderr] 72 | | let mut filter = self.filter [INFO] [stderr] 73 | | .entry(String::from(c.to_str().unwrap())) [INFO] [stderr] ... | [INFO] [stderr] 79 | | _ => {}, [INFO] [stderr] 80 | | } [INFO] [stderr] | |_________^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::single_match)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stderr] help: try this [INFO] [stderr] | [INFO] [stderr] 70 | if let Some(Component::Normal(c)) = components.next() { [INFO] [stderr] 71 | let mut filter = self.filter [INFO] [stderr] 72 | .entry(String::from(c.to_str().unwrap())) [INFO] [stderr] 73 | .or_insert_with(|| Filter::new()); [INFO] [stderr] 74 | [INFO] [stderr] 75 | // Insert the rest of the components recursively. [INFO] [stderr] ... [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/filter.rs:74:37 [INFO] [stderr] | [INFO] [stderr] 74 | .or_insert_with(|| Filter::new()); [INFO] [stderr] | ^^^^^^^^^^^^^^^^ help: remove closure as shown: `Filter::new` [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: length comparison to zero [INFO] [stderr] --> src/filter.rs:165:8 [INFO] [stderr] | [INFO] [stderr] 165 | if builder.len() == 0 { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `builder.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: using `clone` on a `Copy` type [INFO] [stderr] --> src/main.rs:104:18 [INFO] [stderr] | [INFO] [stderr] 104 | let id = id.clone(); [INFO] [stderr] | ^^^^^^^^^^ help: try dereferencing it: `*id` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::clone_on_copy)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stderr] [INFO] [stderr] Finished dev [unoptimized + debuginfo] target(s) in 27.74s [INFO] running `"docker" "inspect" "8ad26e024d8d361efb919e2246a0b64295e855c3c580eecd6b830c9608668b24"` [INFO] running `"docker" "rm" "-f" "8ad26e024d8d361efb919e2246a0b64295e855c3c580eecd6b830c9608668b24"` [INFO] [stdout] 8ad26e024d8d361efb919e2246a0b64295e855c3c580eecd6b830c9608668b24