[INFO] updating cached repository khyperia/Astropress [INFO] running `"git" "fetch" "--all"` [INFO] [stdout] Fetching origin [INFO] [stderr] From git://github.com/khyperia/Astropress [INFO] [stderr] * branch HEAD -> FETCH_HEAD [INFO] running `"git" "clone" "work/cache/sources/gh/khyperia/Astropress" "work/ex/clippy-test-run/sources/stable/gh/khyperia/Astropress"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable/gh/khyperia/Astropress'... [INFO] [stderr] done. [INFO] running `"git" "clone" "work/cache/sources/gh/khyperia/Astropress" "work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/khyperia/Astropress"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/khyperia/Astropress'... [INFO] [stderr] done. [INFO] running `"git" "rev-parse" "HEAD"` [INFO] [stdout] 993f0deaafa4b696b0f9053fec4c27286fb90566 [INFO] sha for GitHub repo khyperia/Astropress: 993f0deaafa4b696b0f9053fec4c27286fb90566 [INFO] validating manifest of khyperia/Astropress 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 khyperia/Astropress 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 khyperia/Astropress [INFO] finished frobbing khyperia/Astropress [INFO] frobbed toml for khyperia/Astropress written to work/ex/clippy-test-run/sources/stable/gh/khyperia/Astropress/Cargo.toml [INFO] started frobbing khyperia/Astropress [INFO] finished frobbing khyperia/Astropress [INFO] frobbed toml for khyperia/Astropress written to work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/khyperia/Astropress/Cargo.toml [INFO] crate khyperia/Astropress 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 khyperia/Astropress 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-1/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/khyperia/Astropress:/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] 18e263f3876e27b606afa0e2743dfe3e188c6b58d48b9689bc08d7e0a21c45cd [INFO] running `"docker" "start" "-a" "18e263f3876e27b606afa0e2743dfe3e188c6b58d48b9689bc08d7e0a21c45cd"` [INFO] [stderr] Checking inflate v0.3.2 [INFO] [stderr] Checking png v0.10.0 [INFO] [stderr] Checking astropress v0.1.0 (/opt/crater/workdir) [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/main.rs:18:13 [INFO] [stderr] | [INFO] [stderr] 18 | data: data, [INFO] [stderr] | ^^^^^^^^^^ help: replace it with: `data` [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:26:13 [INFO] [stderr] | [INFO] [stderr] 26 | size: size, [INFO] [stderr] | ^^^^^^^^^^ help: replace it with: `size` [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:13 [INFO] [stderr] | [INFO] [stderr] 18 | data: data, [INFO] [stderr] | ^^^^^^^^^^ help: replace it with: `data` [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:26:13 [INFO] [stderr] | [INFO] [stderr] 26 | size: size, [INFO] [stderr] | ^^^^^^^^^^ help: replace it with: `size` [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: casting u8 to u16 may become silently lossy if types change [INFO] [stderr] --> src/imgio.rs:18:28 [INFO] [stderr] | [INFO] [stderr] 18 | let int = ((arr[i * 2] as u16) << 8) | (arr[i * 2 + 1] as u16); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^ help: try: `u16::from(arr[i * 2])` [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 u8 to u16 may become silently lossy if types change [INFO] [stderr] --> src/imgio.rs:18:56 [INFO] [stderr] | [INFO] [stderr] 18 | let int = ((arr[i * 2] as u16) << 8) | (arr[i * 2 + 1] as u16); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try: `u16::from(arr[i * 2 + 1])` [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 u16 to f32 may become silently lossy if types change [INFO] [stderr] --> src/imgio.rs:19:29 [INFO] [stderr] | [INFO] [stderr] 19 | result[i] = int as f32 / (256.0 * 256.0); [INFO] [stderr] | ^^^^^^^^^^ help: try: `f32::from(int)` [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 u16 to f32 may become silently lossy if types change [INFO] [stderr] --> src/imgio.rs:33:57 [INFO] [stderr] | [INFO] [stderr] 33 | let mul = (image.data[i] * (256.0 * 256.0)).min(u16::max_value() as f32); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try: `f32::from(u16::max_value())` [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: the operation is ineffective. Consider reducing it to `i * 2` [INFO] [stderr] --> src/imgio.rs:38:14 [INFO] [stderr] | [INFO] [stderr] 38 | data[i * 2 + 0] = high; [INFO] [stderr] | ^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::identity_op)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stderr] [INFO] [stderr] warning: `ref` on an entire `let` pattern is discouraged, take a reference with `&` instead [INFO] [stderr] --> src/imgio.rs:42:9 [INFO] [stderr] | [INFO] [stderr] 42 | let ref mut w = ::std::io::BufWriter::new(file); [INFO] [stderr] | ----^^^^^^^^^----------------------------------- help: try: `let w = &mut ::std::io::BufWriter::new(file);` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::toplevel_ref_arg)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#toplevel_ref_arg [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/stack.rs:3:42 [INFO] [stderr] | [INFO] [stderr] 3 | fn stack f32>(images: &Vec, f: F) -> Image { [INFO] [stderr] | ^^^^^^^^^^^ help: change this to: `&[Image]` [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: writing `&Vec<_>` instead of `&[_]` involves one more reference and cannot be used with non-Vec-based slices. [INFO] [stderr] --> src/stack.rs:24:26 [INFO] [stderr] | [INFO] [stderr] 24 | pub fn stack_max(images: &Vec) -> Image { [INFO] [stderr] | ^^^^^^^^^^^ help: change this to: `&[Image]` [INFO] [stderr] | [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 variable `i` is used as a loop counter. Consider using `for (i, item) in &mut images.enumerate()` or similar iterators [INFO] [stderr] --> src/main.rs:87:18 [INFO] [stderr] | [INFO] [stderr] 87 | for image in &mut images { [INFO] [stderr] | ^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::explicit_counter_loop)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stderr] [INFO] [stderr] warning: casting u8 to u16 may become silently lossy if types change [INFO] [stderr] --> src/imgio.rs:18:28 [INFO] [stderr] | [INFO] [stderr] 18 | let int = ((arr[i * 2] as u16) << 8) | (arr[i * 2 + 1] as u16); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^ help: try: `u16::from(arr[i * 2])` [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 u8 to u16 may become silently lossy if types change [INFO] [stderr] --> src/imgio.rs:18:56 [INFO] [stderr] | [INFO] [stderr] 18 | let int = ((arr[i * 2] as u16) << 8) | (arr[i * 2 + 1] as u16); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try: `u16::from(arr[i * 2 + 1])` [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 u16 to f32 may become silently lossy if types change [INFO] [stderr] --> src/imgio.rs:19:29 [INFO] [stderr] | [INFO] [stderr] 19 | result[i] = int as f32 / (256.0 * 256.0); [INFO] [stderr] | ^^^^^^^^^^ help: try: `f32::from(int)` [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 u16 to f32 may become silently lossy if types change [INFO] [stderr] --> src/imgio.rs:33:57 [INFO] [stderr] | [INFO] [stderr] 33 | let mul = (image.data[i] * (256.0 * 256.0)).min(u16::max_value() as f32); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try: `f32::from(u16::max_value())` [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: the operation is ineffective. Consider reducing it to `i * 2` [INFO] [stderr] --> src/imgio.rs:38:14 [INFO] [stderr] | [INFO] [stderr] 38 | data[i * 2 + 0] = high; [INFO] [stderr] | ^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::identity_op)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stderr] [INFO] [stderr] warning: `ref` on an entire `let` pattern is discouraged, take a reference with `&` instead [INFO] [stderr] --> src/imgio.rs:42:9 [INFO] [stderr] | [INFO] [stderr] 42 | let ref mut w = ::std::io::BufWriter::new(file); [INFO] [stderr] | ----^^^^^^^^^----------------------------------- help: try: `let w = &mut ::std::io::BufWriter::new(file);` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::toplevel_ref_arg)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#toplevel_ref_arg [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/stack.rs:3:42 [INFO] [stderr] | [INFO] [stderr] 3 | fn stack f32>(images: &Vec, f: F) -> Image { [INFO] [stderr] | ^^^^^^^^^^^ help: change this to: `&[Image]` [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: writing `&Vec<_>` instead of `&[_]` involves one more reference and cannot be used with non-Vec-based slices. [INFO] [stderr] --> src/stack.rs:24:26 [INFO] [stderr] | [INFO] [stderr] 24 | pub fn stack_max(images: &Vec) -> Image { [INFO] [stderr] | ^^^^^^^^^^^ help: change this to: `&[Image]` [INFO] [stderr] | [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 variable `i` is used as a loop counter. Consider using `for (i, item) in &mut images.enumerate()` or similar iterators [INFO] [stderr] --> src/main.rs:87:18 [INFO] [stderr] | [INFO] [stderr] 87 | for image in &mut images { [INFO] [stderr] | ^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::explicit_counter_loop)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stderr] [INFO] [stderr] Finished dev [unoptimized + debuginfo] target(s) in 5.73s [INFO] running `"docker" "inspect" "18e263f3876e27b606afa0e2743dfe3e188c6b58d48b9689bc08d7e0a21c45cd"` [INFO] running `"docker" "rm" "-f" "18e263f3876e27b606afa0e2743dfe3e188c6b58d48b9689bc08d7e0a21c45cd"` [INFO] [stdout] 18e263f3876e27b606afa0e2743dfe3e188c6b58d48b9689bc08d7e0a21c45cd