[INFO] updating cached repository rameshrajagopal/rust-examples [INFO] running `"git" "fetch" "--all"` [INFO] [stdout] Fetching origin [INFO] [stderr] From git://github.com/rameshrajagopal/rust-examples [INFO] [stderr] * branch HEAD -> FETCH_HEAD [INFO] running `"git" "clone" "work/cache/sources/gh/rameshrajagopal/rust-examples" "work/ex/clippy-test-run/sources/stable/gh/rameshrajagopal/rust-examples"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable/gh/rameshrajagopal/rust-examples'... [INFO] [stderr] done. [INFO] running `"git" "clone" "work/cache/sources/gh/rameshrajagopal/rust-examples" "work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/rameshrajagopal/rust-examples"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/rameshrajagopal/rust-examples'... [INFO] [stderr] done. [INFO] running `"git" "rev-parse" "HEAD"` [INFO] [stdout] 7846730a5b998e0b317df8e83a38ea92f7c3c423 [INFO] sha for GitHub repo rameshrajagopal/rust-examples: 7846730a5b998e0b317df8e83a38ea92f7c3c423 [INFO] validating manifest of rameshrajagopal/rust-examples 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 rameshrajagopal/rust-examples 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 rameshrajagopal/rust-examples [INFO] finished frobbing rameshrajagopal/rust-examples [INFO] frobbed toml for rameshrajagopal/rust-examples written to work/ex/clippy-test-run/sources/stable/gh/rameshrajagopal/rust-examples/Cargo.toml [INFO] started frobbing rameshrajagopal/rust-examples [INFO] finished frobbing rameshrajagopal/rust-examples [INFO] frobbed toml for rameshrajagopal/rust-examples written to work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/rameshrajagopal/rust-examples/Cargo.toml [INFO] crate rameshrajagopal/rust-examples 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 rameshrajagopal/rust-examples against stable for clippy-test-run [INFO] running `"docker" "create" "-v" "/mnt/big/crater/work/local/target-dirs/clippy-test-run/worker-4/stable:/opt/crater/target:rw,Z" "-v" "/mnt/big/crater/work/ex/clippy-test-run/sources/stable/gh/rameshrajagopal/rust-examples:/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" "-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] 18fa7c7a5686ad81a90e23876456f0edf6df40fb122180320cb22da795fceee3 [INFO] running `"docker" "start" "-a" "18fa7c7a5686ad81a90e23876456f0edf6df40fb122180320cb22da795fceee3"` [INFO] [stderr] warning: An explicit [[bin]] section is specified in Cargo.toml which currently [INFO] [stderr] disables Cargo from automatically inferring other binary targets. [INFO] [stderr] This inference behavior will change in the Rust 2018 edition and the following [INFO] [stderr] files will be included as a binary target: [INFO] [stderr] [INFO] [stderr] * /opt/crater/workdir/src/main.rs [INFO] [stderr] [INFO] [stderr] This is likely to break cargo build or cargo test as these files may not be [INFO] [stderr] ready to be compiled as a binary target today. You can future-proof yourself [INFO] [stderr] and disable this warning by adding `autobins = false` to your [package] [INFO] [stderr] section. You may also move the files to a location where Cargo would not [INFO] [stderr] automatically infer them to be a target, such as in subfolders. [INFO] [stderr] [INFO] [stderr] For more information on this warning you can consult [INFO] [stderr] https://github.com/rust-lang/cargo/issues/5330 [INFO] [stderr] Checking learn-rust v0.1.0 (/opt/crater/workdir) [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/functions.rs:13:16 [INFO] [stderr] | [INFO] [stderr] 13 | 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/functions.rs:13:22 [INFO] [stderr] | [INFO] [stderr] 13 | 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/functions.rs:25:20 [INFO] [stderr] | [INFO] [stderr] 25 | Rectangle {p1: p1, p2: p2 } [INFO] [stderr] | ^^^^^^ help: replace it with: `p1` [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/functions.rs:25:28 [INFO] [stderr] | [INFO] [stderr] 25 | Rectangle {p1: p1, p2: p2 } [INFO] [stderr] | ^^^^^^ help: replace it with: `p2` [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 argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/sum_of_n_primes.rs:3:19 [INFO] [stderr] | [INFO] [stderr] 3 | fn is_prime(num: &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: method is never used: `origin` [INFO] [stderr] --> src/functions.rs:8:5 [INFO] [stderr] | [INFO] [stderr] 8 | fn origin() -> Point { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] note: lint level defined here [INFO] [stderr] --> src/functions.rs:7:12 [INFO] [stderr] | [INFO] [stderr] 7 | #[warn(dead_code)] [INFO] [stderr] | ^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: you don't need to add `&` to all patterns [INFO] [stderr] --> src/reference_example.rs:6:5 [INFO] [stderr] | [INFO] [stderr] 6 | / match reference { [INFO] [stderr] 7 | | &val => println!("ref is {:?}", val), [INFO] [stderr] 8 | | } [INFO] [stderr] | |_____^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::match_ref_pats)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stderr] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stderr] | [INFO] [stderr] 6 | match *reference { [INFO] [stderr] 7 | val => println!("ref is {:?}", val), [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: use of a blacklisted/placeholder name `foo` [INFO] [stderr] --> src/reference_example.rs:42:9 [INFO] [stderr] | [INFO] [stderr] 42 | let foo = Foo { x: (1, 2), y: 10 }; [INFO] [stderr] | ^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::blacklisted_name)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#blacklisted_name [INFO] [stderr] [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/sum_of_n_primes.rs:3:19 [INFO] [stderr] | [INFO] [stderr] 3 | fn is_prime(num: &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: redundant field names in struct initialization [INFO] [stderr] --> src/functions.rs:13:16 [INFO] [stderr] | [INFO] [stderr] 13 | 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/functions.rs:13:22 [INFO] [stderr] | [INFO] [stderr] 13 | 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/functions.rs:25:20 [INFO] [stderr] | [INFO] [stderr] 25 | Rectangle {p1: p1, p2: p2 } [INFO] [stderr] | ^^^^^^ help: replace it with: `p1` [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/functions.rs:25:28 [INFO] [stderr] | [INFO] [stderr] 25 | Rectangle {p1: p1, p2: p2 } [INFO] [stderr] | ^^^^^^ help: replace it with: `p2` [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: method is never used: `origin` [INFO] [stderr] --> src/functions.rs:8:5 [INFO] [stderr] | [INFO] [stderr] 8 | fn origin() -> Point { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] note: lint level defined here [INFO] [stderr] --> src/functions.rs:7:12 [INFO] [stderr] | [INFO] [stderr] 7 | #[warn(dead_code)] [INFO] [stderr] | ^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: you don't need to add `&` to all patterns [INFO] [stderr] --> src/reference_example.rs:6:5 [INFO] [stderr] | [INFO] [stderr] 6 | / match reference { [INFO] [stderr] 7 | | &val => println!("ref is {:?}", val), [INFO] [stderr] 8 | | } [INFO] [stderr] | |_____^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::match_ref_pats)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stderr] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stderr] | [INFO] [stderr] 6 | match *reference { [INFO] [stderr] 7 | val => println!("ref is {:?}", val), [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: use of a blacklisted/placeholder name `foo` [INFO] [stderr] --> src/reference_example.rs:42:9 [INFO] [stderr] | [INFO] [stderr] 42 | let foo = Foo { x: (1, 2), y: 10 }; [INFO] [stderr] | ^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::blacklisted_name)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#blacklisted_name [INFO] [stderr] [INFO] [stderr] Finished dev [unoptimized + debuginfo] target(s) in 1.79s [INFO] running `"docker" "inspect" "18fa7c7a5686ad81a90e23876456f0edf6df40fb122180320cb22da795fceee3"` [INFO] running `"docker" "rm" "-f" "18fa7c7a5686ad81a90e23876456f0edf6df40fb122180320cb22da795fceee3"` [INFO] [stdout] 18fa7c7a5686ad81a90e23876456f0edf6df40fb122180320cb22da795fceee3