[INFO] crate sliding_windows 3.0.0 is already in cache [INFO] extracting crate sliding_windows 3.0.0 into work/ex/clippy-test-run/sources/stable/reg/sliding_windows/3.0.0 [INFO] extracting crate sliding_windows 3.0.0 into work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/reg/sliding_windows/3.0.0 [INFO] validating manifest of sliding_windows-3.0.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 sliding_windows-3.0.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 sliding_windows-3.0.0 [INFO] finished frobbing sliding_windows-3.0.0 [INFO] frobbed toml for sliding_windows-3.0.0 written to work/ex/clippy-test-run/sources/stable/reg/sliding_windows/3.0.0/Cargo.toml [INFO] started frobbing sliding_windows-3.0.0 [INFO] finished frobbing sliding_windows-3.0.0 [INFO] frobbed toml for sliding_windows-3.0.0 written to work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/reg/sliding_windows/3.0.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 sliding_windows-3.0.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-3/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/sliding_windows/3.0.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] ef9533a79edcd2ae6860de2d9880716d89d32705ce2d93227cdf9b8fc3614c94 [INFO] running `"docker" "start" "-a" "ef9533a79edcd2ae6860de2d9880716d89d32705ce2d93227cdf9b8fc3614c94"` [INFO] [stderr] Checking sliding_windows v3.0.0 (/opt/crater/workdir) [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/sliding_windows.rs:35:13 [INFO] [stderr] | [INFO] [stderr] 35 | window_size: window_size, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `window_size` [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/sliding_windows.rs:50:72 [INFO] [stderr] | [INFO] [stderr] 50 | Window { drop_flag: &self.uniquely_owned, data: &mut data[..], window_offset: window_offset } [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `window_offset` [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/sliding_windows.rs:289:13 [INFO] [stderr] | [INFO] [stderr] 289 | iter: iter, [INFO] [stderr] | ^^^^^^^^^^ help: replace it with: `iter` [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] | [INFO] [stderr] --> src/sliding_windows.rs:35:13 [INFO] [stderr] | [INFO] [stderr] 35 | window_size: window_size, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `window_size` [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] | [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/sliding_windows.rs:291:13 [INFO] [stderr] | [INFO] [stderr] 291 | storage: storage, [INFO] [stderr] | ^^^^^^^^^^^^^^^^ help: replace it with: `storage` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] = note: #[warn(clippy::redundant_field_names)] on by default [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/sliding_windows.rs:50:72 [INFO] [stderr] | [INFO] [stderr] 50 | Window { drop_flag: &self.uniquely_owned, data: &mut data[..], window_offset: window_offset } [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `window_offset` [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/sliding_windows.rs:289:13 [INFO] [stderr] | [INFO] [stderr] 289 | iter: iter, [INFO] [stderr] | ^^^^^^^^^^ help: replace it with: `iter` [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/sliding_windows.rs:291:13 [INFO] [stderr] | [INFO] [stderr] 291 | storage: storage, [INFO] [stderr] | ^^^^^^^^^^^^^^^^ help: replace it with: `storage` [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: unneeded return statement [INFO] [stderr] --> src/sliding_windows.rs:162:9 [INFO] [stderr] | [INFO] [stderr] 162 | return f.debug_list().entries(self.into_iter()).finish(); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove `return` as shown: `f.debug_list().entries(self.into_iter()).finish()` [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] [INFO] [stderr] warning: unneeded return statement [INFO] [stderr] --> src/sliding_windows.rs:162:9 [INFO] [stderr] | [INFO] [stderr] 162 | return f.debug_list().entries(self.into_iter()).finish(); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove `return` as shown: `f.debug_list().entries(self.into_iter()).finish()` [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] [INFO] [stderr] warning: unnecessary `unsafe` block [INFO] [stderr] --> src/sliding_windows.rs:94:9 [INFO] [stderr] | [INFO] [stderr] 94 | unsafe { [INFO] [stderr] | ^^^^^^ unnecessary `unsafe` block [INFO] [stderr] | [INFO] [stderr] = note: #[warn(unused_unsafe)] on by default [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/sliding_windows.rs:42:5 [INFO] [stderr] | [INFO] [stderr] 42 | / fn new_window<'a>(&'a self) -> Window<'a, T> { [INFO] [stderr] 43 | | // assert that the last window went out of scope [INFO] [stderr] 44 | | assert!(self.uniquely_owned.get(), "next() called before previous Window went out of scope"); [INFO] [stderr] 45 | | let data = unsafe { &mut *self.data.get() }; [INFO] [stderr] ... | [INFO] [stderr] 50 | | Window { drop_flag: &self.uniquely_owned, data: &mut data[..], window_offset: window_offset } [INFO] [stderr] 51 | | } [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: `if _ { .. } else { .. }` is an expression [INFO] [stderr] --> src/sliding_windows.rs:71:9 [INFO] [stderr] | [INFO] [stderr] 71 | / let new_offset; [INFO] [stderr] 72 | | if window_offset >= (self.window_size - 1) { [INFO] [stderr] 73 | | new_offset = 0; [INFO] [stderr] 74 | | } else { [INFO] [stderr] 75 | | new_offset = window_offset + 1; [INFO] [stderr] 76 | | } [INFO] [stderr] | |_________^ help: it is more idiomatic to write: `let new_offset = if window_offset >= (self.window_size - 1) { 0 } else { window_offset + 1 };` [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] [INFO] [stderr] warning: use of `offset` with a `usize` casted to an `isize` [INFO] [stderr] --> src/sliding_windows.rs:246:40 [INFO] [stderr] | [INFO] [stderr] 246 | let current_element = unsafe { self.data.offset(self.current_index as isize).as_mut().unwrap() }; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.data.add(self.current_index)` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::ptr_offset_with_cast)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_offset_with_cast [INFO] [stderr] [INFO] [stderr] warning: unnecessary `unsafe` block [INFO] [stderr] --> src/sliding_windows.rs:94:9 [INFO] [stderr] | [INFO] [stderr] 94 | unsafe { [INFO] [stderr] | ^^^^^^ unnecessary `unsafe` block [INFO] [stderr] | [INFO] [stderr] = note: #[warn(unused_unsafe)] on by default [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/sliding_windows.rs:42:5 [INFO] [stderr] | [INFO] [stderr] 42 | / fn new_window<'a>(&'a self) -> Window<'a, T> { [INFO] [stderr] 43 | | // assert that the last window went out of scope [INFO] [stderr] 44 | | assert!(self.uniquely_owned.get(), "next() called before previous Window went out of scope"); [INFO] [stderr] 45 | | let data = unsafe { &mut *self.data.get() }; [INFO] [stderr] ... | [INFO] [stderr] 50 | | Window { drop_flag: &self.uniquely_owned, data: &mut data[..], window_offset: window_offset } [INFO] [stderr] 51 | | } [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: `if _ { .. } else { .. }` is an expression [INFO] [stderr] --> src/sliding_windows.rs:71:9 [INFO] [stderr] | [INFO] [stderr] 71 | / let new_offset; [INFO] [stderr] 72 | | if window_offset >= (self.window_size - 1) { [INFO] [stderr] 73 | | new_offset = 0; [INFO] [stderr] 74 | | } else { [INFO] [stderr] 75 | | new_offset = window_offset + 1; [INFO] [stderr] 76 | | } [INFO] [stderr] | |_________^ help: it is more idiomatic to write: `let new_offset = if window_offset >= (self.window_size - 1) { 0 } else { window_offset + 1 };` [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] [INFO] [stderr] warning: use of `offset` with a `usize` casted to an `isize` [INFO] [stderr] --> src/sliding_windows.rs:246:40 [INFO] [stderr] | [INFO] [stderr] 246 | let current_element = unsafe { self.data.offset(self.current_index as isize).as_mut().unwrap() }; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.data.add(self.current_index)` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::ptr_offset_with_cast)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_offset_with_cast [INFO] [stderr] [INFO] [stderr] warning: The function/method `::new` doesn't need a mutable reference [INFO] [stderr] --> src/tests.rs:9:52 [INFO] [stderr] | [INFO] [stderr] 9 | let windowed_iter = Adaptor::new(0..5, &mut storage); [INFO] [stderr] | ^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::unnecessary_mut_passed)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stderr] [INFO] [stderr] warning: You are using an explicit closure for cloning elements [INFO] [stderr] --> src/tests.rs:10:63 [INFO] [stderr] | [INFO] [stderr] 10 | let output: Vec> = windowed_iter.map(|x| x.into_iter().map(|&x| x).collect()).collect(); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: Consider calling the dedicated `cloned` method: `x.into_iter().cloned()` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::map_clone)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stderr] [INFO] [stderr] warning: The function/method `::new` doesn't need a mutable reference [INFO] [stderr] --> src/tests.rs:30:42 [INFO] [stderr] | [INFO] [stderr] 30 | let windowed_iter = Adaptor::new(it, &mut storage); [INFO] [stderr] | ^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stderr] [INFO] [stderr] warning: The function/method `::new` doesn't need a mutable reference [INFO] [stderr] --> src/tests.rs:46:46 [INFO] [stderr] | [INFO] [stderr] 46 | let mut windowed_iter = Adaptor::new(it, &mut storage); [INFO] [stderr] | ^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stderr] [INFO] [stderr] warning: The function/method `::new` doesn't need a mutable reference [INFO] [stderr] --> src/tests.rs:55:36 [INFO] [stderr] | [INFO] [stderr] 55 | let iter1 = Adaptor::new(0..5, &mut storage1); [INFO] [stderr] | ^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stderr] [INFO] [stderr] warning: The function/method `::new` doesn't need a mutable reference [INFO] [stderr] --> src/tests.rs:58:36 [INFO] [stderr] | [INFO] [stderr] 58 | let iter2 = Adaptor::new(0..5, &mut storage2); [INFO] [stderr] | ^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stderr] [INFO] [stderr] warning: The function/method `::new` doesn't need a mutable reference [INFO] [stderr] --> src/tests.rs:61:36 [INFO] [stderr] | [INFO] [stderr] 61 | let iter3 = Adaptor::new(0..5, &mut storage3); [INFO] [stderr] | ^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stderr] [INFO] [stderr] warning: The function/method `::new` doesn't need a mutable reference [INFO] [stderr] --> src/tests.rs:64:38 [INFO] [stderr] | [INFO] [stderr] 64 | let iter4 = Adaptor::new(42..42, &mut storage4); [INFO] [stderr] | ^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stderr] [INFO] [stderr] warning: The function/method `::new` doesn't need a mutable reference [INFO] [stderr] --> src/tests.rs:67:36 [INFO] [stderr] | [INFO] [stderr] 67 | let iter5 = Adaptor::new(42.., &mut storage5); [INFO] [stderr] | ^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stderr] [INFO] [stderr] warning: The function/method `::new` doesn't need a mutable reference [INFO] [stderr] --> src/tests.rs:80:40 [INFO] [stderr] | [INFO] [stderr] 80 | let mut iter = Adaptor::new(range, &mut storage); [INFO] [stderr] | ^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stderr] [INFO] [stderr] Finished dev [unoptimized + debuginfo] target(s) in 0.67s [INFO] running `"docker" "inspect" "ef9533a79edcd2ae6860de2d9880716d89d32705ce2d93227cdf9b8fc3614c94"` [INFO] running `"docker" "rm" "-f" "ef9533a79edcd2ae6860de2d9880716d89d32705ce2d93227cdf9b8fc3614c94"` [INFO] [stdout] ef9533a79edcd2ae6860de2d9880716d89d32705ce2d93227cdf9b8fc3614c94