[INFO] updating cached repository crazymerlyn/tinyrenderer-rs [INFO] running `"git" "fetch" "--all"` [INFO] [stdout] Fetching origin [INFO] [stderr] From git://github.com/crazymerlyn/tinyrenderer-rs [INFO] [stderr] * branch HEAD -> FETCH_HEAD [INFO] running `"git" "clone" "work/cache/sources/gh/crazymerlyn/tinyrenderer-rs" "work/ex/clippy-test-run/sources/stable/gh/crazymerlyn/tinyrenderer-rs"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable/gh/crazymerlyn/tinyrenderer-rs'... [INFO] [stderr] done. [INFO] running `"git" "clone" "work/cache/sources/gh/crazymerlyn/tinyrenderer-rs" "work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/crazymerlyn/tinyrenderer-rs"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/crazymerlyn/tinyrenderer-rs'... [INFO] [stderr] done. [INFO] running `"git" "rev-parse" "HEAD"` [INFO] [stdout] 66622902d347ec9cf83303dad5689ea665e7c242 [INFO] sha for GitHub repo crazymerlyn/tinyrenderer-rs: 66622902d347ec9cf83303dad5689ea665e7c242 [INFO] validating manifest of crazymerlyn/tinyrenderer-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 crazymerlyn/tinyrenderer-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 crazymerlyn/tinyrenderer-rs [INFO] finished frobbing crazymerlyn/tinyrenderer-rs [INFO] frobbed toml for crazymerlyn/tinyrenderer-rs written to work/ex/clippy-test-run/sources/stable/gh/crazymerlyn/tinyrenderer-rs/Cargo.toml [INFO] started frobbing crazymerlyn/tinyrenderer-rs [INFO] finished frobbing crazymerlyn/tinyrenderer-rs [INFO] frobbed toml for crazymerlyn/tinyrenderer-rs written to work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/crazymerlyn/tinyrenderer-rs/Cargo.toml [INFO] crate crazymerlyn/tinyrenderer-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 crazymerlyn/tinyrenderer-rs 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/crazymerlyn/tinyrenderer-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" "-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] 446458373f196324c016224036741e60216cee9db70ad455051d5c4879ca8aff [INFO] running `"docker" "start" "-a" "446458373f196324c016224036741e60216cee9db70ad455051d5c4879ca8aff"` [INFO] [stderr] Checking tinyrenderer v0.1.0 (/opt/crater/workdir) [INFO] [stderr] warning: `if _ { .. } else { .. }` is an expression [INFO] [stderr] --> src/main.rs:15:5 [INFO] [stderr] | [INFO] [stderr] 15 | / let mut steep = false; [INFO] [stderr] 16 | | if (x0 as i32 - x1 as i32).abs() < (y0 as i32 - y1 as i32).abs() { [INFO] [stderr] 17 | | swap!(x0, y0); [INFO] [stderr] 18 | | swap!(x1, y1); [INFO] [stderr] 19 | | steep = true; [INFO] [stderr] 20 | | } [INFO] [stderr] | |_____^ help: it is more idiomatic to write: `let steep = if (x0 as i32 - x1 as i32).abs() < (y0 as i32 - y1 as i32).abs() { ..; true } else { false };` [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: this looks like you are swapping `$a` and `$b` manually [INFO] [stderr] --> src/main.rs:8:9 [INFO] [stderr] | [INFO] [stderr] 8 | / let temp = $a; [INFO] [stderr] 9 | | $a = $b; [INFO] [stderr] 10 | | $b = temp; [INFO] [stderr] | |_________________^ help: try: `std::mem::swap(&mut $a, &mut $b)` [INFO] [stderr] ... [INFO] [stderr] 17 | swap!(x0, y0); [INFO] [stderr] | -------------- in this macro invocation [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::manual_swap)] on by default [INFO] [stderr] = note: or maybe you should use `std::mem::replace`? [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_swap [INFO] [stderr] [INFO] [stderr] warning: this looks like you are swapping `$a` and `$b` manually [INFO] [stderr] --> src/main.rs:8:9 [INFO] [stderr] | [INFO] [stderr] 8 | / let temp = $a; [INFO] [stderr] 9 | | $a = $b; [INFO] [stderr] 10 | | $b = temp; [INFO] [stderr] | |_________________^ help: try: `std::mem::swap(&mut $a, &mut $b)` [INFO] [stderr] ... [INFO] [stderr] 18 | swap!(x1, y1); [INFO] [stderr] | -------------- in this macro invocation [INFO] [stderr] | [INFO] [stderr] = note: or maybe you should use `std::mem::replace`? [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_swap [INFO] [stderr] [INFO] [stderr] warning: this looks like you are swapping `$a` and `$b` manually [INFO] [stderr] --> src/main.rs:8:9 [INFO] [stderr] | [INFO] [stderr] 8 | / let temp = $a; [INFO] [stderr] 9 | | $a = $b; [INFO] [stderr] 10 | | $b = temp; [INFO] [stderr] | |_________________^ help: try: `std::mem::swap(&mut $a, &mut $b)` [INFO] [stderr] ... [INFO] [stderr] 22 | swap!(x0, x1); [INFO] [stderr] | -------------- in this macro invocation [INFO] [stderr] | [INFO] [stderr] = note: or maybe you should use `std::mem::replace`? [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_swap [INFO] [stderr] [INFO] [stderr] warning: this looks like you are swapping `$a` and `$b` manually [INFO] [stderr] --> src/main.rs:8:9 [INFO] [stderr] | [INFO] [stderr] 8 | / let temp = $a; [INFO] [stderr] 9 | | $a = $b; [INFO] [stderr] 10 | | $b = temp; [INFO] [stderr] | |_________________^ help: try: `std::mem::swap(&mut $a, &mut $b)` [INFO] [stderr] ... [INFO] [stderr] 23 | swap!(y0, y1); [INFO] [stderr] | -------------- in this macro invocation [INFO] [stderr] | [INFO] [stderr] = note: or maybe you should use `std::mem::replace`? [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_swap [INFO] [stderr] [INFO] [stderr] warning: an inclusive range would be more readable [INFO] [stderr] --> src/main.rs:31:14 [INFO] [stderr] | [INFO] [stderr] 31 | for x in x0..x1+1 { [INFO] [stderr] | ^^^^^^^^ help: use: `x0..=x1` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::range_plus_one)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#range_plus_one [INFO] [stderr] [INFO] [stderr] warning: `if _ { .. } else { .. }` is an expression [INFO] [stderr] --> src/main.rs:15:5 [INFO] [stderr] | [INFO] [stderr] 15 | / let mut steep = false; [INFO] [stderr] 16 | | if (x0 as i32 - x1 as i32).abs() < (y0 as i32 - y1 as i32).abs() { [INFO] [stderr] 17 | | swap!(x0, y0); [INFO] [stderr] 18 | | swap!(x1, y1); [INFO] [stderr] 19 | | steep = true; [INFO] [stderr] 20 | | } [INFO] [stderr] | |_____^ help: it is more idiomatic to write: `let steep = if (x0 as i32 - x1 as i32).abs() < (y0 as i32 - y1 as i32).abs() { ..; true } else { false };` [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: this looks like you are swapping `$a` and `$b` manually [INFO] [stderr] --> src/main.rs:8:9 [INFO] [stderr] | [INFO] [stderr] 8 | / let temp = $a; [INFO] [stderr] 9 | | $a = $b; [INFO] [stderr] 10 | | $b = temp; [INFO] [stderr] | |_________________^ help: try: `std::mem::swap(&mut $a, &mut $b)` [INFO] [stderr] ... [INFO] [stderr] 17 | swap!(x0, y0); [INFO] [stderr] | -------------- in this macro invocation [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::manual_swap)] on by default [INFO] [stderr] = note: or maybe you should use `std::mem::replace`? [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_swap [INFO] [stderr] [INFO] [stderr] warning: this looks like you are swapping `$a` and `$b` manually [INFO] [stderr] --> src/main.rs:8:9 [INFO] [stderr] | [INFO] [stderr] 8 | / let temp = $a; [INFO] [stderr] 9 | | $a = $b; [INFO] [stderr] 10 | | $b = temp; [INFO] [stderr] | |_________________^ help: try: `std::mem::swap(&mut $a, &mut $b)` [INFO] [stderr] ... [INFO] [stderr] 18 | swap!(x1, y1); [INFO] [stderr] | -------------- in this macro invocation [INFO] [stderr] | [INFO] [stderr] = note: or maybe you should use `std::mem::replace`? [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_swap [INFO] [stderr] [INFO] [stderr] warning: this looks like you are swapping `$a` and `$b` manually [INFO] [stderr] --> src/main.rs:8:9 [INFO] [stderr] | [INFO] [stderr] 8 | / let temp = $a; [INFO] [stderr] 9 | | $a = $b; [INFO] [stderr] 10 | | $b = temp; [INFO] [stderr] | |_________________^ help: try: `std::mem::swap(&mut $a, &mut $b)` [INFO] [stderr] ... [INFO] [stderr] 22 | swap!(x0, x1); [INFO] [stderr] | -------------- in this macro invocation [INFO] [stderr] | [INFO] [stderr] = note: or maybe you should use `std::mem::replace`? [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_swap [INFO] [stderr] [INFO] [stderr] warning: this looks like you are swapping `$a` and `$b` manually [INFO] [stderr] --> src/main.rs:8:9 [INFO] [stderr] | [INFO] [stderr] 8 | / let temp = $a; [INFO] [stderr] 9 | | $a = $b; [INFO] [stderr] 10 | | $b = temp; [INFO] [stderr] | |_________________^ help: try: `std::mem::swap(&mut $a, &mut $b)` [INFO] [stderr] ... [INFO] [stderr] 23 | swap!(y0, y1); [INFO] [stderr] | -------------- in this macro invocation [INFO] [stderr] | [INFO] [stderr] = note: or maybe you should use `std::mem::replace`? [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_swap [INFO] [stderr] [INFO] [stderr] warning: an inclusive range would be more readable [INFO] [stderr] --> src/main.rs:31:14 [INFO] [stderr] | [INFO] [stderr] 31 | for x in x0..x1+1 { [INFO] [stderr] | ^^^^^^^^ help: use: `x0..=x1` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::range_plus_one)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#range_plus_one [INFO] [stderr] [INFO] [stderr] Finished dev [unoptimized + debuginfo] target(s) in 2.05s [INFO] running `"docker" "inspect" "446458373f196324c016224036741e60216cee9db70ad455051d5c4879ca8aff"` [INFO] running `"docker" "rm" "-f" "446458373f196324c016224036741e60216cee9db70ad455051d5c4879ca8aff"` [INFO] [stdout] 446458373f196324c016224036741e60216cee9db70ad455051d5c4879ca8aff