[INFO] crate hmm 0.2.0 is already in cache [INFO] extracting crate hmm 0.2.0 into work/ex/clippy-test-run/sources/stable/reg/hmm/0.2.0 [INFO] extracting crate hmm 0.2.0 into work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/reg/hmm/0.2.0 [INFO] validating manifest of hmm-0.2.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 hmm-0.2.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 hmm-0.2.0 [INFO] finished frobbing hmm-0.2.0 [INFO] frobbed toml for hmm-0.2.0 written to work/ex/clippy-test-run/sources/stable/reg/hmm/0.2.0/Cargo.toml [INFO] started frobbing hmm-0.2.0 [INFO] finished frobbing hmm-0.2.0 [INFO] frobbed toml for hmm-0.2.0 written to work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/reg/hmm/0.2.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 hmm-0.2.0 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-2/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/hmm/0.2.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 -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] 72c78f65ed803dcccc16ef9c7346de0f21c006b4e08e22ae37964d217c701537 [INFO] running `"docker" "start" "-a" "72c78f65ed803dcccc16ef9c7346de0f21c006b4e08e22ae37964d217c701537"` [INFO] [stderr] Checking hmm v0.2.0 (/opt/crater/workdir) [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/matrices.rs:75:41 [INFO] [stderr] | [INFO] [stderr] 75 | Some(Matrix { rows: data.len(), cols: cols, data: data }) [INFO] [stderr] | ^^^^^^^^^^ help: replace it with: `cols` [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/matrices.rs:75:53 [INFO] [stderr] | [INFO] [stderr] 75 | Some(Matrix { rows: data.len(), cols: cols, data: data }) [INFO] [stderr] | ^^^^^^^^^^ help: replace it with: `data` [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/matrices.rs:115:18 [INFO] [stderr] | [INFO] [stderr] 115 | data: data} [INFO] [stderr] | ^^^^^^^^^^ help: replace it with: `data` [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/matrices.rs:75:41 [INFO] [stderr] | [INFO] [stderr] 75 | Some(Matrix { rows: data.len(), cols: cols, data: data }) [INFO] [stderr] | ^^^^^^^^^^ help: replace it with: `cols` [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/matrices.rs:75:53 [INFO] [stderr] | [INFO] [stderr] 75 | Some(Matrix { rows: data.len(), cols: cols, data: data }) [INFO] [stderr] | ^^^^^^^^^^ help: replace it with: `data` [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/matrices.rs:115:18 [INFO] [stderr] | [INFO] [stderr] 115 | data: data} [INFO] [stderr] | ^^^^^^^^^^ help: replace it with: `data` [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: this block may be rewritten with the `?` operator [INFO] [stderr] --> src/models.rs:82:9 [INFO] [stderr] | [INFO] [stderr] 82 | if ts.is_none() { return None } [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace_it_with: `ts?;` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::question_mark)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stderr] [INFO] [stderr] warning: this block may be rewritten with the `?` operator [INFO] [stderr] --> src/models.rs:85:9 [INFO] [stderr] | [INFO] [stderr] 85 | if os.is_none() { return None } [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace_it_with: `os?;` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stderr] [INFO] [stderr] warning: the loop variable `i` is only used to index `observations`. [INFO] [stderr] --> src/models.rs:118:18 [INFO] [stderr] | [INFO] [stderr] 118 | for i in 0..observations.len() { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::needless_range_loop)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stderr] help: consider using an iterator [INFO] [stderr] | [INFO] [stderr] 118 | for in &observations { [INFO] [stderr] | ^^^^^^ ^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: using `clone` on a `Copy` type [INFO] [stderr] --> src/matrices.rs:58:29 [INFO] [stderr] | [INFO] [stderr] 58 | min_value = v.clone(); [INFO] [stderr] | ^^^^^^^^^ help: try dereferencing it: `*v` [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: using `clone` on a `Copy` type [INFO] [stderr] --> src/matrices.rs:59:29 [INFO] [stderr] | [INFO] [stderr] 59 | min_index = i.clone(); [INFO] [stderr] | ^^^^^^^^^ help: try removing the `clone` call: `i` [INFO] [stderr] | [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: length comparison to one [INFO] [stderr] --> src/matrices.rs:71:12 [INFO] [stderr] | [INFO] [stderr] 71 | if data.len() < 1 { return None } [INFO] [stderr] | ^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `data.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 loop variable `i` is used to index `data` [INFO] [stderr] --> src/matrices.rs:108:18 [INFO] [stderr] | [INFO] [stderr] 108 | for i in 0..n { [INFO] [stderr] | ^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stderr] help: consider using an iterator [INFO] [stderr] | [INFO] [stderr] 108 | for (i, ) in data.iter_mut().enumerate().take(n) { [INFO] [stderr] | ^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: this block may be rewritten with the `?` operator [INFO] [stderr] --> src/models.rs:82:9 [INFO] [stderr] | [INFO] [stderr] 82 | if ts.is_none() { return None } [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace_it_with: `ts?;` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::question_mark)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stderr] [INFO] [stderr] warning: this block may be rewritten with the `?` operator [INFO] [stderr] --> src/models.rs:85:9 [INFO] [stderr] | [INFO] [stderr] 85 | if os.is_none() { return None } [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace_it_with: `os?;` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stderr] [INFO] [stderr] warning: the loop variable `i` is only used to index `observations`. [INFO] [stderr] --> src/models.rs:118:18 [INFO] [stderr] | [INFO] [stderr] 118 | for i in 0..observations.len() { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::needless_range_loop)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stderr] help: consider using an iterator [INFO] [stderr] | [INFO] [stderr] 118 | for in &observations { [INFO] [stderr] | ^^^^^^ ^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: using `clone` on a `Copy` type [INFO] [stderr] --> src/matrices.rs:58:29 [INFO] [stderr] | [INFO] [stderr] 58 | min_value = v.clone(); [INFO] [stderr] | ^^^^^^^^^ help: try dereferencing it: `*v` [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: using `clone` on a `Copy` type [INFO] [stderr] --> src/matrices.rs:59:29 [INFO] [stderr] | [INFO] [stderr] 59 | min_index = i.clone(); [INFO] [stderr] | ^^^^^^^^^ help: try removing the `clone` call: `i` [INFO] [stderr] | [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: length comparison to one [INFO] [stderr] --> src/matrices.rs:71:12 [INFO] [stderr] | [INFO] [stderr] 71 | if data.len() < 1 { return None } [INFO] [stderr] | ^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `data.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 loop variable `i` is used to index `data` [INFO] [stderr] --> src/matrices.rs:108:18 [INFO] [stderr] | [INFO] [stderr] 108 | for i in 0..n { [INFO] [stderr] | ^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stderr] help: consider using an iterator [INFO] [stderr] | [INFO] [stderr] 108 | for (i, ) in data.iter_mut().enumerate().take(n) { [INFO] [stderr] | ^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: equality checks against false can be replaced by a negation [INFO] [stderr] --> src/matrices.rs:186:17 [INFO] [stderr] | [INFO] [stderr] 186 | assert!(mat.is_positive() == false); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try simplifying it as shown: `!mat.is_positive()` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::bool_comparison)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison [INFO] [stderr] [INFO] [stderr] Finished dev [unoptimized + debuginfo] target(s) in 1.02s [INFO] running `"docker" "inspect" "72c78f65ed803dcccc16ef9c7346de0f21c006b4e08e22ae37964d217c701537"` [INFO] running `"docker" "rm" "-f" "72c78f65ed803dcccc16ef9c7346de0f21c006b4e08e22ae37964d217c701537"` [INFO] [stdout] 72c78f65ed803dcccc16ef9c7346de0f21c006b4e08e22ae37964d217c701537