[INFO] crate flx 0.2.2 is already in cache [INFO] extracting crate flx 0.2.2 into work/ex/clippy-test-run/sources/stable/reg/flx/0.2.2 [INFO] extracting crate flx 0.2.2 into work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/reg/flx/0.2.2 [INFO] validating manifest of flx-0.2.2 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 flx-0.2.2 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 flx-0.2.2 [INFO] finished frobbing flx-0.2.2 [INFO] frobbed toml for flx-0.2.2 written to work/ex/clippy-test-run/sources/stable/reg/flx/0.2.2/Cargo.toml [INFO] started frobbing flx-0.2.2 [INFO] finished frobbing flx-0.2.2 [INFO] frobbed toml for flx-0.2.2 written to work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/reg/flx/0.2.2/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 flx-0.2.2 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-1/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/reg/flx/0.2.2:/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] 87f7e80c8011659b36b03047f2cdb189f315d4ec7fb608229b8b253dc109312a [INFO] running `"docker" "start" "-a" "87f7e80c8011659b36b03047f2cdb189f315d4ec7fb608229b8b253dc109312a"` [INFO] [stderr] Compiling libc v0.2.48 [INFO] [stderr] Checking flx v0.2.2 (/opt/crater/workdir) [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/search.rs:89:22 [INFO] [stderr] | [INFO] [stderr] 89 | SearchBase { lines: lines } [INFO] [stderr] | ^^^^^^^^^^^^ help: replace it with: `lines` [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/search.rs:220:13 [INFO] [stderr] | [INFO] [stderr] 220 | line: line, [INFO] [stderr] | ^^^^^^^^^^ help: replace it with: `line` [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/search.rs:223:13 [INFO] [stderr] | [INFO] [stderr] 223 | factor: factor, [INFO] [stderr] | ^^^^^^^^^^^^^^ help: replace it with: `factor` [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] error[E0602]: unknown lint: `clippy::into_iter_on_array` [INFO] [stderr] | [INFO] [stderr] = note: requested on the command line with `-D clippy::into_iter_on_array` [INFO] [stderr] [INFO] [stderr] error: aborting due to previous error [INFO] [stderr] [INFO] [stderr] For more information about this error, try `rustc --explain E0602`. [INFO] [stderr] error: Could not compile `libc`. [INFO] [stderr] warning: build failed, waiting for other jobs to finish... [INFO] [stderr] warning: this if statement can be collapsed [INFO] [stderr] --> src/search.rs:161:13 [INFO] [stderr] | [INFO] [stderr] 161 | / if !c.is_whitespace() { [INFO] [stderr] 162 | | if cur_class == CharClass::First { [INFO] [stderr] 163 | | cs_score += FIRST_FACTOR; [INFO] [stderr] 164 | | } [INFO] [stderr] 165 | | } [INFO] [stderr] | |_____________^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::collapsible_if)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stderr] help: try [INFO] [stderr] | [INFO] [stderr] 161 | if !c.is_whitespace() && cur_class == CharClass::First { [INFO] [stderr] 162 | cs_score += FIRST_FACTOR; [INFO] [stderr] 163 | } [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: this `else { if .. }` block can be collapsed [INFO] [stderr] --> src/search.rs:190:20 [INFO] [stderr] | [INFO] [stderr] 190 | } else { [INFO] [stderr] | ____________________^ [INFO] [stderr] 191 | | if cur_class != CharClass::Other { [INFO] [stderr] 192 | | cur_class = CharClass::Other; [INFO] [stderr] 193 | | if !cs_change { [INFO] [stderr] ... | [INFO] [stderr] 199 | | } [INFO] [stderr] 200 | | } [INFO] [stderr] | |_____________^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stderr] help: try [INFO] [stderr] | [INFO] [stderr] 190 | } else if cur_class != CharClass::Other { [INFO] [stderr] 191 | cur_class = CharClass::Other; [INFO] [stderr] 192 | if !cs_change { [INFO] [stderr] 193 | cs_score += CLASS_FACTOR; [INFO] [stderr] 194 | cs_change = true; [INFO] [stderr] 195 | } [INFO] [stderr] ... [INFO] [stderr] [INFO] [stderr] warning: needlessly taken reference of both operands [INFO] [stderr] --> src/search.rs:127:20 [INFO] [stderr] | [INFO] [stderr] 127 | if &match_item < &*other_item { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [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] help: use the values directly [INFO] [stderr] | [INFO] [stderr] 127 | if match_item < *other_item { [INFO] [stderr] | ^^^^^^^^^^ ^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: use of `or_insert` followed by a function call [INFO] [stderr] --> src/search.rs:203:30 [INFO] [stderr] | [INFO] [stderr] 203 | map.entry(c).or_insert(Vec::default()).push(idx); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `or_insert_with(Vec::default)` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::or_fun_call)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call [INFO] [stderr] [INFO] [stderr] warning: use of `or_insert` followed by a function call [INFO] [stderr] --> src/search.rs:206:39 [INFO] [stderr] | [INFO] [stderr] 206 | map.entry(lc).or_insert(Vec::default()).push(idx); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `or_insert_with(Vec::default)` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call [INFO] [stderr] [INFO] [stderr] warning: `if _ { .. } else { .. }` is an expression [INFO] [stderr] --> src/search.rs:242:9 [INFO] [stderr] | [INFO] [stderr] 242 | / let avg_dist: f32; [INFO] [stderr] 243 | | [INFO] [stderr] 244 | | if position.len() < 2 { [INFO] [stderr] 245 | | avg_dist = 0.0; [INFO] [stderr] ... | [INFO] [stderr] 249 | | .sum::() / position.len() as f32; [INFO] [stderr] 250 | | } [INFO] [stderr] | |_________^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::useless_let_if_seq)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_let_if_seq [INFO] [stderr] help: it is more idiomatic to write [INFO] [stderr] | [INFO] [stderr] 242 | let avg_dist = if position.len() < 2 { 0.0 } else { position.windows(2) [INFO] [stderr] 243 | .map(|pair| pair[1] as f32 - pair[0] as f32) [INFO] [stderr] 244 | .sum::() / position.len() as f32 }; [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: in an 'if' condition, avoid complex blocks or closures with blocks; instead, move the block or closure higher and bind it with a 'let' [INFO] [stderr] --> src/search.rs:264:34 [INFO] [stderr] | [INFO] [stderr] 264 | if query.iter().any(|ch| { [INFO] [stderr] | __________________________________^ [INFO] [stderr] 265 | | if let Some(list) = self.char_map.get(ch) { [INFO] [stderr] 266 | | // Use a side effect here to save time [INFO] [stderr] 267 | | lists.push(list); [INFO] [stderr] ... | [INFO] [stderr] 271 | | } [INFO] [stderr] 272 | | }) { [INFO] [stderr] | |_________^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::block_in_if_condition_stmt)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#block_in_if_condition_stmt [INFO] [stderr] [INFO] [stderr] error: build failed [INFO] running `"docker" "inspect" "87f7e80c8011659b36b03047f2cdb189f315d4ec7fb608229b8b253dc109312a"` [INFO] running `"docker" "rm" "-f" "87f7e80c8011659b36b03047f2cdb189f315d4ec7fb608229b8b253dc109312a"` [INFO] [stdout] 87f7e80c8011659b36b03047f2cdb189f315d4ec7fb608229b8b253dc109312a