[INFO] updating cached repository icdts/cp-rs [INFO] running `"git" "fetch" "--all"` [INFO] [stdout] Fetching origin [INFO] [stderr] From git://github.com/icdts/cp-rs [INFO] [stderr] * branch HEAD -> FETCH_HEAD [INFO] running `"git" "clone" "work/cache/sources/gh/icdts/cp-rs" "work/ex/clippy-test-run/sources/stable/gh/icdts/cp-rs"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable/gh/icdts/cp-rs'... [INFO] [stderr] done. [INFO] running `"git" "clone" "work/cache/sources/gh/icdts/cp-rs" "work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/icdts/cp-rs"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/icdts/cp-rs'... [INFO] [stderr] done. [INFO] running `"git" "rev-parse" "HEAD"` [INFO] [stdout] e12b09aef4d803a55afe5108ca42c66cf8eea774 [INFO] sha for GitHub repo icdts/cp-rs: e12b09aef4d803a55afe5108ca42c66cf8eea774 [INFO] validating manifest of icdts/cp-rs 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 icdts/cp-rs 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 icdts/cp-rs [INFO] finished frobbing icdts/cp-rs [INFO] frobbed toml for icdts/cp-rs written to work/ex/clippy-test-run/sources/stable/gh/icdts/cp-rs/Cargo.toml [INFO] started frobbing icdts/cp-rs [INFO] finished frobbing icdts/cp-rs [INFO] frobbed toml for icdts/cp-rs written to work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/icdts/cp-rs/Cargo.toml [INFO] crate icdts/cp-rs 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 icdts/cp-rs 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-4/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/icdts/cp-rs:/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] ffebffdd715634b49027893d7b5fab17fad90ddf864177843a57b81cc579fc04 [INFO] running `"docker" "start" "-a" "ffebffdd715634b49027893d7b5fab17fad90ddf864177843a57b81cc579fc04"` [INFO] [stderr] Checking num v0.1.40 [INFO] [stderr] Checking chrono v0.4.0 [INFO] [stderr] Checking cp-rs v0.1.0 (/opt/crater/workdir) [INFO] [stderr] warning: literal with an empty format string [INFO] [stderr] --> src/chapter1.rs:203:19 [INFO] [stderr] | [INFO] [stderr] 203 | println!("{}",r#""(?P[^"]*)""#); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::print_literal)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_literal [INFO] [stderr] [INFO] [stderr] warning: literal with an empty format string [INFO] [stderr] --> src/chapter1.rs:203:19 [INFO] [stderr] | [INFO] [stderr] 203 | println!("{}",r#""(?P[^"]*)""#); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::print_literal)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_literal [INFO] [stderr] [INFO] [stderr] warning: returning the result of a let binding from a block. Consider returning the expression directly. [INFO] [stderr] --> src/chapter1.rs:97:5 [INFO] [stderr] | [INFO] [stderr] 97 | output [INFO] [stderr] | ^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::let_and_return)] on by default [INFO] [stderr] note: this expression can be directly returned [INFO] [stderr] --> src/chapter1.rs:96:18 [INFO] [stderr] | [INFO] [stderr] 96 | let output = re.replace_all(input, "$sb***$eb").to_string(); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stderr] [INFO] [stderr] warning: returning the result of a let binding from a block. Consider returning the expression directly. [INFO] [stderr] --> src/chapter1.rs:97:5 [INFO] [stderr] | [INFO] [stderr] 97 | output [INFO] [stderr] | ^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::let_and_return)] on by default [INFO] [stderr] note: this expression can be directly returned [INFO] [stderr] --> src/chapter1.rs:96:18 [INFO] [stderr] | [INFO] [stderr] 96 | let output = re.replace_all(input, "$sb***$eb").to_string(); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stderr] [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/chapter1.rs:59:36 [INFO] [stderr] | [INFO] [stderr] 59 | fn s2_3_2_solution(l : &[i32], v : &i32) -> bool [INFO] [stderr] | ^^^^ help: consider passing by value instead: `i32` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::trivially_copy_pass_by_ref)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [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/chapter1.rs:134:26 [INFO] [stderr] | [INFO] [stderr] 134 | fn s3_1_solution(input : & Vec<(u32,u32)> ) -> Vec<(u32,u32,u32)> [INFO] [stderr] | ^^^^^^^^^^^^^^^^ help: change this to: `&[(u32,u32)]` [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 `z` is only used to index `input`. [INFO] [stderr] --> src/chapter1.rs:139:14 [INFO] [stderr] | [INFO] [stderr] 139 | for z in 0..size [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] 139 | for in input.iter().take(size) [INFO] [stderr] | ^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: `if _ { .. } else { .. }` is an expression [INFO] [stderr] --> src/chapter1.rs:142:9 [INFO] [stderr] | [INFO] [stderr] 142 | / let mut iter = i..j; [INFO] [stderr] 143 | | if i > j [INFO] [stderr] 144 | | { [INFO] [stderr] 145 | | iter = j..i; [INFO] [stderr] 146 | | } [INFO] [stderr] | |_________^ help: it is more idiomatic to write: `let iter = if i > j { j..i } else { i..j };` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::useless_let_if_seq)] on by default [INFO] [stderr] = note: you might not need `mut` at all [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: manual implementation of an assign operation [INFO] [stderr] --> src/chapter1.rs:170:13 [INFO] [stderr] | [INFO] [stderr] 170 | n = n/2; [INFO] [stderr] | ^^^^^^^ help: replace it with: `n /= 2` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::assign_op_pattern)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stderr] [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/chapter1.rs:59:36 [INFO] [stderr] | [INFO] [stderr] 59 | fn s2_3_2_solution(l : &[i32], v : &i32) -> bool [INFO] [stderr] | ^^^^ help: consider passing by value instead: `i32` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::trivially_copy_pass_by_ref)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [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/chapter1.rs:134:26 [INFO] [stderr] | [INFO] [stderr] 134 | fn s3_1_solution(input : & Vec<(u32,u32)> ) -> Vec<(u32,u32,u32)> [INFO] [stderr] | ^^^^^^^^^^^^^^^^ help: change this to: `&[(u32,u32)]` [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 `z` is only used to index `input`. [INFO] [stderr] --> src/chapter1.rs:139:14 [INFO] [stderr] | [INFO] [stderr] 139 | for z in 0..size [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] 139 | for in input.iter().take(size) [INFO] [stderr] | ^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: `if _ { .. } else { .. }` is an expression [INFO] [stderr] --> src/chapter1.rs:142:9 [INFO] [stderr] | [INFO] [stderr] 142 | / let mut iter = i..j; [INFO] [stderr] 143 | | if i > j [INFO] [stderr] 144 | | { [INFO] [stderr] 145 | | iter = j..i; [INFO] [stderr] 146 | | } [INFO] [stderr] | |_________^ help: it is more idiomatic to write: `let iter = if i > j { j..i } else { i..j };` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::useless_let_if_seq)] on by default [INFO] [stderr] = note: you might not need `mut` at all [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: manual implementation of an assign operation [INFO] [stderr] --> src/chapter1.rs:170:13 [INFO] [stderr] | [INFO] [stderr] 170 | n = n/2; [INFO] [stderr] | ^^^^^^^ help: replace it with: `n /= 2` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::assign_op_pattern)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stderr] [INFO] [stderr] Finished dev [unoptimized + debuginfo] target(s) in 3.89s [INFO] running `"docker" "inspect" "ffebffdd715634b49027893d7b5fab17fad90ddf864177843a57b81cc579fc04"` [INFO] running `"docker" "rm" "-f" "ffebffdd715634b49027893d7b5fab17fad90ddf864177843a57b81cc579fc04"` [INFO] [stdout] ffebffdd715634b49027893d7b5fab17fad90ddf864177843a57b81cc579fc04