[INFO] updating cached repository JosephFerano/a02 [INFO] running `"git" "fetch" "--all"` [INFO] [stdout] Fetching origin [INFO] [stderr] From git://github.com/JosephFerano/a02 [INFO] [stderr] * branch HEAD -> FETCH_HEAD [INFO] running `"git" "clone" "work/cache/sources/gh/JosephFerano/a02" "work/ex/clippy-test-run/sources/stable/gh/JosephFerano/a02"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable/gh/JosephFerano/a02'... [INFO] [stderr] done. [INFO] running `"git" "clone" "work/cache/sources/gh/JosephFerano/a02" "work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/JosephFerano/a02"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/JosephFerano/a02'... [INFO] [stderr] done. [INFO] running `"git" "rev-parse" "HEAD"` [INFO] [stdout] 2e8aa4c26b1ca8a99fae94df55244b5ac8be2de5 [INFO] sha for GitHub repo JosephFerano/a02: 2e8aa4c26b1ca8a99fae94df55244b5ac8be2de5 [INFO] validating manifest of JosephFerano/a02 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 JosephFerano/a02 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 JosephFerano/a02 [INFO] finished frobbing JosephFerano/a02 [INFO] frobbed toml for JosephFerano/a02 written to work/ex/clippy-test-run/sources/stable/gh/JosephFerano/a02/Cargo.toml [INFO] started frobbing JosephFerano/a02 [INFO] finished frobbing JosephFerano/a02 [INFO] frobbed toml for JosephFerano/a02 written to work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/JosephFerano/a02/Cargo.toml [INFO] crate JosephFerano/a02 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 JosephFerano/a02 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-5/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/gh/JosephFerano/a02:/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] 47ea9b493eaa6e7551ad4c850dc13445f14f0c155d01cde64888ba46193b5f24 [INFO] running `"docker" "start" "-a" "47ea9b493eaa6e7551ad4c850dc13445f14f0c155d01cde64888ba46193b5f24"` [INFO] [stderr] Checking a02 v0.1.0 (/opt/crater/workdir) [INFO] [stderr] warning: writing `&Vec<_>` instead of `&[_]` involves one more reference and cannot be used with non-Vec-based slices. [INFO] [stderr] --> src/lib.rs:131:35 [INFO] [stderr] | [INFO] [stderr] 131 | pub fn get_total_faults(results : &Vec) -> usize { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^ help: change this to: `&[AccessResult]` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::ptr_arg)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stderr] [INFO] [stderr] warning: writing `&Vec<_>` instead of `&[_]` involves one more reference and cannot be used with non-Vec-based slices. [INFO] [stderr] --> src/lib.rs:131:35 [INFO] [stderr] | [INFO] [stderr] 131 | pub fn get_total_faults(results : &Vec) -> usize { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^ help: change this to: `&[AccessResult]` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::ptr_arg)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stderr] [INFO] [stderr] warning: using `clone` on a `Copy` type [INFO] [stderr] --> src/bin/second.rs:30:26 [INFO] [stderr] | [INFO] [stderr] 30 | let length = pages.len().clone(); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `pages.len()` [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: the loop variable `i` is used to index `collection` [INFO] [stderr] --> src/bin/second.rs:70:14 [INFO] [stderr] | [INFO] [stderr] 70 | for i in 0..collection.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] 70 | for (i, ) in collection.iter().enumerate() { [INFO] [stderr] | ^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: using `clone` on a `Copy` type [INFO] [stderr] --> src/bin/second.rs:30:26 [INFO] [stderr] | [INFO] [stderr] 30 | let length = pages.len().clone(); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `pages.len()` [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: the loop variable `i` is used to index `collection` [INFO] [stderr] --> src/bin/second.rs:70:14 [INFO] [stderr] | [INFO] [stderr] 70 | for i in 0..collection.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] 70 | for (i, ) in collection.iter().enumerate() { [INFO] [stderr] | ^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: the loop variable `i` is only used to index `results`. [INFO] [stderr] --> src/bin/second.rs:126:18 [INFO] [stderr] | [INFO] [stderr] 126 | for i in 1..results.len() { [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] 126 | for in results.iter().skip(1) { [INFO] [stderr] | ^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: using `clone` on a `Copy` type [INFO] [stderr] --> src/bin/optimal.rs:25:26 [INFO] [stderr] | [INFO] [stderr] 25 | let length = pages.len().clone(); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `pages.len()` [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: the loop variable `jj` is used to index `accesses` [INFO] [stderr] --> src/bin/optimal.rs:40:31 [INFO] [stderr] | [INFO] [stderr] 40 | for jj in (i + 1)..accesses.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] 40 | for (jj, ) in accesses.iter().enumerate().skip((i + 1)) { [INFO] [stderr] | ^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: using `clone` on a `Copy` type [INFO] [stderr] --> src/bin/optimal.rs:25:26 [INFO] [stderr] | [INFO] [stderr] 25 | let length = pages.len().clone(); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `pages.len()` [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: the loop variable `jj` is used to index `accesses` [INFO] [stderr] --> src/bin/optimal.rs:40:31 [INFO] [stderr] | [INFO] [stderr] 40 | for jj in (i + 1)..accesses.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] 40 | for (jj, ) in accesses.iter().enumerate().skip((i + 1)) { [INFO] [stderr] | ^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: using `clone` on a `Copy` type [INFO] [stderr] --> src/bin/wsclock.rs:31:26 [INFO] [stderr] | [INFO] [stderr] 31 | let length = v_memory.len().clone(); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `v_memory.len()` [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] error: this `if` has identical blocks [INFO] [stderr] --> src/bin/wsclock.rs:63:49 [INFO] [stderr] | [INFO] [stderr] 63 | } else if iteration > 0 { [INFO] [stderr] | _________________________________________________^ [INFO] [stderr] 64 | | // If it's second iteration and clean, [INFO] [stderr] 65 | | // give it the index of the page we're going to evict [INFO] [stderr] 66 | | if !page.is_dirty { [INFO] [stderr] ... | [INFO] [stderr] 69 | | } [INFO] [stderr] 70 | | } [INFO] [stderr] | |_________________________^ [INFO] [stderr] | [INFO] [stderr] = note: #[deny(clippy::if_same_then_else)] on by default [INFO] [stderr] note: same as this [INFO] [stderr] --> src/bin/wsclock.rs:57:38 [INFO] [stderr] | [INFO] [stderr] 57 | if age > tau { [INFO] [stderr] | ______________________________________^ [INFO] [stderr] 58 | | // If it's old and clean, give it the index of the page we're going to evict [INFO] [stderr] 59 | | if !page.is_dirty { [INFO] [stderr] 60 | | index = pointer % length; [INFO] [stderr] 61 | | break; [INFO] [stderr] 62 | | } [INFO] [stderr] 63 | | } else if iteration > 0 { [INFO] [stderr] | |_________________________^ [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stderr] [INFO] [stderr] warning: writing `&Vec<_>` instead of `&[_]` involves one more reference and cannot be used with non-Vec-based slices. [INFO] [stderr] --> src/bin/wsclock.rs:116:50 [INFO] [stderr] | [INFO] [stderr] 116 | fn contains_page(page_num : usize , collection : &Vec) -> Option { [INFO] [stderr] | ^^^^^^^^^^ help: change this to: `&[Page]` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::ptr_arg)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stderr] [INFO] [stderr] error: aborting due to previous error [INFO] [stderr] [INFO] [stderr] warning: the loop variable `i` is only used to index `results`. [INFO] [stderr] --> src/bin/optimal.rs:121:18 [INFO] [stderr] | [INFO] [stderr] 121 | for i in 1..results.len() { [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] 121 | for in results.iter().skip(1) { [INFO] [stderr] | ^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] error: Could not compile `a02`. [INFO] [stderr] warning: build failed, waiting for other jobs to finish... [INFO] [stderr] warning: using `clone` on a `Copy` type [INFO] [stderr] --> src/bin/wsclock.rs:31:26 [INFO] [stderr] | [INFO] [stderr] 31 | let length = v_memory.len().clone(); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `v_memory.len()` [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] error: this `if` has identical blocks [INFO] [stderr] --> src/bin/wsclock.rs:63:49 [INFO] [stderr] | [INFO] [stderr] 63 | } else if iteration > 0 { [INFO] [stderr] | _________________________________________________^ [INFO] [stderr] 64 | | // If it's second iteration and clean, [INFO] [stderr] 65 | | // give it the index of the page we're going to evict [INFO] [stderr] 66 | | if !page.is_dirty { [INFO] [stderr] ... | [INFO] [stderr] 69 | | } [INFO] [stderr] 70 | | } [INFO] [stderr] | |_________________________^ [INFO] [stderr] | [INFO] [stderr] = note: #[deny(clippy::if_same_then_else)] on by default [INFO] [stderr] note: same as this [INFO] [stderr] --> src/bin/wsclock.rs:57:38 [INFO] [stderr] | [INFO] [stderr] 57 | if age > tau { [INFO] [stderr] | ______________________________________^ [INFO] [stderr] 58 | | // If it's old and clean, give it the index of the page we're going to evict [INFO] [stderr] 59 | | if !page.is_dirty { [INFO] [stderr] 60 | | index = pointer % length; [INFO] [stderr] 61 | | break; [INFO] [stderr] 62 | | } [INFO] [stderr] 63 | | } else if iteration > 0 { [INFO] [stderr] | |_________________________^ [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stderr] [INFO] [stderr] warning: writing `&Vec<_>` instead of `&[_]` involves one more reference and cannot be used with non-Vec-based slices. [INFO] [stderr] --> src/bin/wsclock.rs:116:50 [INFO] [stderr] | [INFO] [stderr] 116 | fn contains_page(page_num : usize , collection : &Vec) -> Option { [INFO] [stderr] | ^^^^^^^^^^ help: change this to: `&[Page]` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::ptr_arg)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stderr] [INFO] [stderr] warning: the loop variable `i` is only used to index `results`. [INFO] [stderr] --> src/bin/wsclock.rs:174:18 [INFO] [stderr] | [INFO] [stderr] 174 | for i in 1..results.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] 174 | for in results.iter().skip(1) { [INFO] [stderr] | ^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] error: aborting due to previous error [INFO] [stderr] [INFO] [stderr] error: Could not compile `a02`. [INFO] [stderr] [INFO] [stderr] To learn more, run the command again with --verbose. [INFO] running `"docker" "inspect" "47ea9b493eaa6e7551ad4c850dc13445f14f0c155d01cde64888ba46193b5f24"` [INFO] running `"docker" "rm" "-f" "47ea9b493eaa6e7551ad4c850dc13445f14f0c155d01cde64888ba46193b5f24"` [INFO] [stdout] 47ea9b493eaa6e7551ad4c850dc13445f14f0c155d01cde64888ba46193b5f24