[INFO] updating cached repository caphindsight/rust-convex-polygon [INFO] running `"git" "fetch" "--all"` [INFO] [stdout] Fetching origin [INFO] [stderr] From git://github.com/caphindsight/rust-convex-polygon [INFO] [stderr] * branch HEAD -> FETCH_HEAD [INFO] running `"git" "clone" "work/cache/sources/gh/caphindsight/rust-convex-polygon" "work/ex/clippy-test-run/sources/stable/gh/caphindsight/rust-convex-polygon"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable/gh/caphindsight/rust-convex-polygon'... [INFO] [stderr] done. [INFO] running `"git" "clone" "work/cache/sources/gh/caphindsight/rust-convex-polygon" "work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/caphindsight/rust-convex-polygon"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/caphindsight/rust-convex-polygon'... [INFO] [stderr] done. [INFO] running `"git" "rev-parse" "HEAD"` [INFO] [stdout] a0fc9cffdf7859bf4171178314c0058873c370e5 [INFO] sha for GitHub repo caphindsight/rust-convex-polygon: a0fc9cffdf7859bf4171178314c0058873c370e5 [INFO] validating manifest of caphindsight/rust-convex-polygon 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 caphindsight/rust-convex-polygon 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 caphindsight/rust-convex-polygon [INFO] finished frobbing caphindsight/rust-convex-polygon [INFO] frobbed toml for caphindsight/rust-convex-polygon written to work/ex/clippy-test-run/sources/stable/gh/caphindsight/rust-convex-polygon/Cargo.toml [INFO] started frobbing caphindsight/rust-convex-polygon [INFO] finished frobbing caphindsight/rust-convex-polygon [INFO] frobbed toml for caphindsight/rust-convex-polygon written to work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/caphindsight/rust-convex-polygon/Cargo.toml [INFO] crate caphindsight/rust-convex-polygon 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 caphindsight/rust-convex-polygon 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-6/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/caphindsight/rust-convex-polygon:/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] bc12f3fb013319542e4c18cfbdc02ddedd3d72a5fa1ce00ebd310b9a8303b55e [INFO] running `"docker" "start" "-a" "bc12f3fb013319542e4c18cfbdc02ddedd3d72a5fa1ce00ebd310b9a8303b55e"` [INFO] [stderr] Checking convex_polygon v0.1.0 (/opt/crater/workdir) [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/main.rs:18:22 [INFO] [stderr] | [INFO] [stderr] 18 | p.push(Point{x: x, y: y}); [INFO] [stderr] | ^^^^ help: replace it with: `x` [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/main.rs:18:28 [INFO] [stderr] | [INFO] [stderr] 18 | p.push(Point{x: x, y: y}); [INFO] [stderr] | ^^^^ help: replace it with: `y` [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/main.rs:18:22 [INFO] [stderr] | [INFO] [stderr] 18 | p.push(Point{x: x, y: y}); [INFO] [stderr] | ^^^^ help: replace it with: `x` [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/main.rs:18:28 [INFO] [stderr] | [INFO] [stderr] 18 | p.push(Point{x: x, y: y}); [INFO] [stderr] | ^^^^ help: replace it with: `y` [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/main.rs:20:5 [INFO] [stderr] | [INFO] [stderr] 20 | return p; [INFO] [stderr] | ^^^^^^^^^ help: remove `return` as shown: `p` [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/main.rs:47:5 [INFO] [stderr] | [INFO] [stderr] 47 | return Option::Some(res); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove `return` as shown: `Option::Some(res)` [INFO] [stderr] | [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/main.rs:20:5 [INFO] [stderr] | [INFO] [stderr] 20 | return p; [INFO] [stderr] | ^^^^^^^^^ help: remove `return` as shown: `p` [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/main.rs:47:5 [INFO] [stderr] | [INFO] [stderr] 47 | return Option::Some(res); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove `return` as shown: `Option::Some(res)` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stderr] [INFO] [stderr] warning: the function has a cyclomatic complexity of 29 [INFO] [stderr] --> src/main.rs:12:1 [INFO] [stderr] | [INFO] [stderr] 12 | / fn input() -> Vec { [INFO] [stderr] 13 | | let n: usize = read!(); [INFO] [stderr] 14 | | let mut p: Vec = Vec::::with_capacity(n); [INFO] [stderr] 15 | | for _ in 0..n { [INFO] [stderr] ... | [INFO] [stderr] 20 | | return p; [INFO] [stderr] 21 | | } [INFO] [stderr] | |_^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::cyclomatic_complexity)] on by default [INFO] [stderr] = help: you could split it up into multiple smaller functions [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cyclomatic_complexity [INFO] [stderr] [INFO] [stderr] warning: the loop variable `i` is only used to index `p`. [INFO] [stderr] --> src/main.rs:26:14 [INFO] [stderr] | [INFO] [stderr] 26 | for i in 0..n { [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] 26 | for in p.iter().take(n) { [INFO] [stderr] | ^^^^^^ ^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: the function has a cyclomatic complexity of 29 [INFO] [stderr] --> src/main.rs:12:1 [INFO] [stderr] | [INFO] [stderr] 12 | / fn input() -> Vec { [INFO] [stderr] 13 | | let n: usize = read!(); [INFO] [stderr] 14 | | let mut p: Vec = Vec::::with_capacity(n); [INFO] [stderr] 15 | | for _ in 0..n { [INFO] [stderr] ... | [INFO] [stderr] 20 | | return p; [INFO] [stderr] 21 | | } [INFO] [stderr] | |_^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::cyclomatic_complexity)] on by default [INFO] [stderr] = help: you could split it up into multiple smaller functions [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cyclomatic_complexity [INFO] [stderr] [INFO] [stderr] warning: length comparison to zero [INFO] [stderr] --> src/main.rs:36:8 [INFO] [stderr] | [INFO] [stderr] 36 | if a.len() == 0 { [INFO] [stderr] | ^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `a.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: length comparison to zero [INFO] [stderr] --> src/main.rs:51:8 [INFO] [stderr] | [INFO] [stderr] 51 | if stack.len() == 0 { [INFO] [stderr] | ^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `stack.is_empty()` [INFO] [stderr] | [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 only used to index `p`. [INFO] [stderr] --> src/main.rs:96:14 [INFO] [stderr] | [INFO] [stderr] 96 | for i in 1..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] 96 | for in p.iter().take(n).skip(1) { [INFO] [stderr] | ^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: the loop variable `i` is only used to index `p`. [INFO] [stderr] --> src/main.rs:26:14 [INFO] [stderr] | [INFO] [stderr] 26 | for i in 0..n { [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] 26 | for in p.iter().take(n) { [INFO] [stderr] | ^^^^^^ ^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: length comparison to zero [INFO] [stderr] --> src/main.rs:36:8 [INFO] [stderr] | [INFO] [stderr] 36 | if a.len() == 0 { [INFO] [stderr] | ^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `a.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: length comparison to zero [INFO] [stderr] --> src/main.rs:51:8 [INFO] [stderr] | [INFO] [stderr] 51 | if stack.len() == 0 { [INFO] [stderr] | ^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `stack.is_empty()` [INFO] [stderr] | [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 only used to index `p`. [INFO] [stderr] --> src/main.rs:96:14 [INFO] [stderr] | [INFO] [stderr] 96 | for i in 1..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] 96 | for in p.iter().take(n).skip(1) { [INFO] [stderr] | ^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] Finished dev [unoptimized + debuginfo] target(s) in 0.73s [INFO] running `"docker" "inspect" "bc12f3fb013319542e4c18cfbdc02ddedd3d72a5fa1ce00ebd310b9a8303b55e"` [INFO] running `"docker" "rm" "-f" "bc12f3fb013319542e4c18cfbdc02ddedd3d72a5fa1ce00ebd310b9a8303b55e"` [INFO] [stdout] bc12f3fb013319542e4c18cfbdc02ddedd3d72a5fa1ce00ebd310b9a8303b55e