[INFO] updating cached repository krtx/rust-raytrace [INFO] running `"git" "fetch" "--all"` [INFO] [stdout] Fetching origin [INFO] [stderr] From git://github.com/krtx/rust-raytrace [INFO] [stderr] * branch HEAD -> FETCH_HEAD [INFO] running `"git" "clone" "work/cache/sources/gh/krtx/rust-raytrace" "work/ex/clippy-test-run/sources/stable/gh/krtx/rust-raytrace"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable/gh/krtx/rust-raytrace'... [INFO] [stderr] done. [INFO] running `"git" "clone" "work/cache/sources/gh/krtx/rust-raytrace" "work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/krtx/rust-raytrace"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/krtx/rust-raytrace'... [INFO] [stderr] done. [INFO] running `"git" "rev-parse" "HEAD"` [INFO] [stdout] aa8dab26f00a846ad84409d0761c13c51f9b4cca [INFO] sha for GitHub repo krtx/rust-raytrace: aa8dab26f00a846ad84409d0761c13c51f9b4cca [INFO] validating manifest of krtx/rust-raytrace 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 krtx/rust-raytrace 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 krtx/rust-raytrace [INFO] finished frobbing krtx/rust-raytrace [INFO] frobbed toml for krtx/rust-raytrace written to work/ex/clippy-test-run/sources/stable/gh/krtx/rust-raytrace/Cargo.toml [INFO] started frobbing krtx/rust-raytrace [INFO] finished frobbing krtx/rust-raytrace [INFO] frobbed toml for krtx/rust-raytrace written to work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/krtx/rust-raytrace/Cargo.toml [INFO] crate krtx/rust-raytrace 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 krtx/rust-raytrace 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-3/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/krtx/rust-raytrace:/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] cbfefbdc3686925654262a52df6f5d744b780bb82c4a28ae36c57b2746fbe8f1 [INFO] running `"docker" "start" "-a" "cbfefbdc3686925654262a52df6f5d744b780bb82c4a28ae36c57b2746fbe8f1"` [INFO] [stderr] Checking rand v0.3.15 [INFO] [stderr] Checking raytrace v0.1.0 (/opt/crater/workdir) [INFO] [stderr] warning: 5th binding whose name is just one char [INFO] [stderr] --> src/obj.rs:15:51 [INFO] [stderr] | [INFO] [stderr] 15 | pub fn sphere_new(x: f64, y: f64, z: f64, r: f64, m: Material) -> Sphere { [INFO] [stderr] | ^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::many_single_char_names)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#many_single_char_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/obj.rs:16:39 [INFO] [stderr] | [INFO] [stderr] 16 | Sphere { origin: geometry::Vec3 { x: x, y: y, z: z }, [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/obj.rs:16:45 [INFO] [stderr] | [INFO] [stderr] 16 | Sphere { origin: geometry::Vec3 { x: x, y: y, z: z }, [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/obj.rs:16:51 [INFO] [stderr] | [INFO] [stderr] 16 | Sphere { origin: geometry::Vec3 { x: x, y: y, z: z }, [INFO] [stderr] | ^^^^ help: replace it with: `z` [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: 5th binding whose name is just one char [INFO] [stderr] --> src/obj.rs:27:50 [INFO] [stderr] | [INFO] [stderr] 27 | pub fn plane_new(x: f64, y: f64, z: f64, d: f64, m: Material) -> Plane { [INFO] [stderr] | ^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#many_single_char_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/obj.rs:28:38 [INFO] [stderr] | [INFO] [stderr] 28 | Plane { normal: geometry::Vec3 { x: x, y: y, z: z }.normalize(), [INFO] [stderr] | ^^^^ help: replace it with: `x` [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/obj.rs:28:44 [INFO] [stderr] | [INFO] [stderr] 28 | Plane { normal: geometry::Vec3 { x: x, y: y, z: z }.normalize(), [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/obj.rs:28:50 [INFO] [stderr] | [INFO] [stderr] 28 | Plane { normal: geometry::Vec3 { x: x, y: y, z: z }.normalize(), [INFO] [stderr] | ^^^^ help: replace it with: `z` [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/obj.rs:61:34 [INFO] [stderr] | [INFO] [stderr] 61 | Some(HitRecord { t: t, [INFO] [stderr] | ^^^^ help: replace it with: `t` [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/obj.rs:63:34 [INFO] [stderr] | [INFO] [stderr] 63 | normal: normal, [INFO] [stderr] | ^^^^^^^^^^^^^^ help: replace it with: `normal` [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/obj.rs:77:29 [INFO] [stderr] | [INFO] [stderr] 77 | Some(HitRecord{ t: t, [INFO] [stderr] | ^^^^ help: replace it with: `t` [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: 5th binding whose name is just one char [INFO] [stderr] --> src/obj.rs:15:51 [INFO] [stderr] | [INFO] [stderr] 15 | pub fn sphere_new(x: f64, y: f64, z: f64, r: f64, m: Material) -> Sphere { [INFO] [stderr] | ^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::many_single_char_names)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#many_single_char_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/obj.rs:16:39 [INFO] [stderr] | [INFO] [stderr] 16 | Sphere { origin: geometry::Vec3 { x: x, y: y, z: z }, [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/obj.rs:16:45 [INFO] [stderr] | [INFO] [stderr] 16 | Sphere { origin: geometry::Vec3 { x: x, y: y, z: z }, [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/obj.rs:16:51 [INFO] [stderr] | [INFO] [stderr] 16 | Sphere { origin: geometry::Vec3 { x: x, y: y, z: z }, [INFO] [stderr] | ^^^^ help: replace it with: `z` [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: 5th binding whose name is just one char [INFO] [stderr] --> src/obj.rs:27:50 [INFO] [stderr] | [INFO] [stderr] 27 | pub fn plane_new(x: f64, y: f64, z: f64, d: f64, m: Material) -> Plane { [INFO] [stderr] | ^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#many_single_char_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/obj.rs:28:38 [INFO] [stderr] | [INFO] [stderr] 28 | Plane { normal: geometry::Vec3 { x: x, y: y, z: z }.normalize(), [INFO] [stderr] | ^^^^ help: replace it with: `x` [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/obj.rs:28:44 [INFO] [stderr] | [INFO] [stderr] 28 | Plane { normal: geometry::Vec3 { x: x, y: y, z: z }.normalize(), [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/obj.rs:28:50 [INFO] [stderr] | [INFO] [stderr] 28 | Plane { normal: geometry::Vec3 { x: x, y: y, z: z }.normalize(), [INFO] [stderr] | ^^^^ help: replace it with: `z` [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/obj.rs:61:34 [INFO] [stderr] | [INFO] [stderr] 61 | Some(HitRecord { t: t, [INFO] [stderr] | ^^^^ help: replace it with: `t` [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/obj.rs:63:34 [INFO] [stderr] | [INFO] [stderr] 63 | normal: normal, [INFO] [stderr] | ^^^^^^^^^^^^^^ help: replace it with: `normal` [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/obj.rs:77:29 [INFO] [stderr] | [INFO] [stderr] 77 | Some(HitRecord{ t: t, [INFO] [stderr] | ^^^^ help: replace it with: `t` [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: returning the result of a let binding from a block. Consider returning the expression directly. [INFO] [stderr] --> src/main.rs:35:9 [INFO] [stderr] | [INFO] [stderr] 35 | hit [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/main.rs:31:19 [INFO] [stderr] | [INFO] [stderr] 31 | let hit = self.planes.iter().fold( [INFO] [stderr] | ___________________^ [INFO] [stderr] 32 | | hit, [INFO] [stderr] 33 | | |acc, plane| take_min(acc, plane.hit(ray)) [INFO] [stderr] 34 | | ); [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/main.rs:35:9 [INFO] [stderr] | [INFO] [stderr] 35 | hit [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/main.rs:31:19 [INFO] [stderr] | [INFO] [stderr] 31 | let hit = self.planes.iter().fold( [INFO] [stderr] | ___________________^ [INFO] [stderr] 32 | | hit, [INFO] [stderr] 33 | | |acc, plane| take_min(acc, plane.hit(ray)) [INFO] [stderr] 34 | | ); [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: field is never used: `directional_light` [INFO] [stderr] --> src/main.rs:10:5 [INFO] [stderr] | [INFO] [stderr] 10 | directional_light: geometry::Vec3, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(dead_code)] on by default [INFO] [stderr] [INFO] [stderr] warning: casting i32 to f64 may become silently lossy if types change [INFO] [stderr] --> src/main.rs:61:46 [INFO] [stderr] | [INFO] [stderr] 61 | ((power_positional * (r as f64)) as i32, [INFO] [stderr] | ^^^^^^^^^^ help: try: `f64::from(r)` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::cast_lossless)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless [INFO] [stderr] [INFO] [stderr] warning: casting i32 to f64 may become silently lossy if types change [INFO] [stderr] --> src/main.rs:62:46 [INFO] [stderr] | [INFO] [stderr] 62 | (power_positional * (g as f64)) as i32, [INFO] [stderr] | ^^^^^^^^^^ help: try: `f64::from(g)` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless [INFO] [stderr] [INFO] [stderr] warning: casting i32 to f64 may become silently lossy if types change [INFO] [stderr] --> src/main.rs:63:46 [INFO] [stderr] | [INFO] [stderr] 63 | (power_positional * (b as f64)) as i32) [INFO] [stderr] | ^^^^^^^^^^ help: try: `f64::from(b)` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless [INFO] [stderr] [INFO] [stderr] warning: casting i32 to f64 may become silently lossy if types change [INFO] [stderr] --> src/main.rs:120:52 [INFO] [stderr] | [INFO] [stderr] 120 | let point = geometry::Vec3 { x: 0.08 * x as f64, y: 0.08 * y as f64, z: -10.0 }; [INFO] [stderr] | ^^^^^^^^ help: try: `f64::from(x)` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless [INFO] [stderr] [INFO] [stderr] warning: casting i32 to f64 may become silently lossy if types change [INFO] [stderr] --> src/main.rs:120:72 [INFO] [stderr] | [INFO] [stderr] 120 | let point = geometry::Vec3 { x: 0.08 * x as f64, y: 0.08 * y as f64, z: -10.0 }; [INFO] [stderr] | ^^^^^^^^ help: try: `f64::from(y)` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless [INFO] [stderr] [INFO] [stderr] warning: field is never used: `directional_light` [INFO] [stderr] --> src/main.rs:10:5 [INFO] [stderr] | [INFO] [stderr] 10 | directional_light: geometry::Vec3, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(dead_code)] on by default [INFO] [stderr] [INFO] [stderr] warning: casting i32 to f64 may become silently lossy if types change [INFO] [stderr] --> src/main.rs:61:46 [INFO] [stderr] | [INFO] [stderr] 61 | ((power_positional * (r as f64)) as i32, [INFO] [stderr] | ^^^^^^^^^^ help: try: `f64::from(r)` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::cast_lossless)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless [INFO] [stderr] [INFO] [stderr] warning: casting i32 to f64 may become silently lossy if types change [INFO] [stderr] --> src/main.rs:62:46 [INFO] [stderr] | [INFO] [stderr] 62 | (power_positional * (g as f64)) as i32, [INFO] [stderr] | ^^^^^^^^^^ help: try: `f64::from(g)` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless [INFO] [stderr] [INFO] [stderr] warning: casting i32 to f64 may become silently lossy if types change [INFO] [stderr] --> src/main.rs:63:46 [INFO] [stderr] | [INFO] [stderr] 63 | (power_positional * (b as f64)) as i32) [INFO] [stderr] | ^^^^^^^^^^ help: try: `f64::from(b)` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless [INFO] [stderr] [INFO] [stderr] warning: casting i32 to f64 may become silently lossy if types change [INFO] [stderr] --> src/main.rs:120:52 [INFO] [stderr] | [INFO] [stderr] 120 | let point = geometry::Vec3 { x: 0.08 * x as f64, y: 0.08 * y as f64, z: -10.0 }; [INFO] [stderr] | ^^^^^^^^ help: try: `f64::from(x)` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless [INFO] [stderr] [INFO] [stderr] warning: casting i32 to f64 may become silently lossy if types change [INFO] [stderr] --> src/main.rs:120:72 [INFO] [stderr] | [INFO] [stderr] 120 | let point = geometry::Vec3 { x: 0.08 * x as f64, y: 0.08 * y as f64, z: -10.0 }; [INFO] [stderr] | ^^^^^^^^ help: try: `f64::from(y)` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless [INFO] [stderr] [INFO] [stderr] Finished dev [unoptimized + debuginfo] target(s) in 2.78s [INFO] running `"docker" "inspect" "cbfefbdc3686925654262a52df6f5d744b780bb82c4a28ae36c57b2746fbe8f1"` [INFO] running `"docker" "rm" "-f" "cbfefbdc3686925654262a52df6f5d744b780bb82c4a28ae36c57b2746fbe8f1"` [INFO] [stdout] cbfefbdc3686925654262a52df6f5d744b780bb82c4a28ae36c57b2746fbe8f1