[INFO] crate imagequant 2.11.9 is already in cache [INFO] extracting crate imagequant 2.11.9 into work/ex/clippy-test-run/sources/stable/reg/imagequant/2.11.9 [INFO] extracting crate imagequant 2.11.9 into work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/reg/imagequant/2.11.9 [INFO] validating manifest of imagequant-2.11.9 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 imagequant-2.11.9 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 imagequant-2.11.9 [INFO] finished frobbing imagequant-2.11.9 [INFO] frobbed toml for imagequant-2.11.9 written to work/ex/clippy-test-run/sources/stable/reg/imagequant/2.11.9/Cargo.toml [INFO] started frobbing imagequant-2.11.9 [INFO] finished frobbing imagequant-2.11.9 [INFO] frobbed toml for imagequant-2.11.9 written to work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/reg/imagequant/2.11.9/Cargo.toml [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+stable" "generate-lockfile" "--manifest-path" "Cargo.toml" "-Zno-index-update"` [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+stable" "generate-lockfile" "--manifest-path" "Cargo.toml" "-Zno-index-update"` [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 imagequant-2.11.9 against stable for clippy-test-run [INFO] running `"docker" "create" "-v" "/mnt/big/crater/work/local/target-dirs/clippy-test-run/worker-3/stable:/opt/crater/target:rw,Z" "-v" "/mnt/big/crater/work/ex/clippy-test-run/sources/stable/reg/imagequant/2.11.9:/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] b227fe0beb25a3d1a57267d6ffa745fc604e4f85fd1159194a65d714fe8bfb0c [INFO] running `"docker" "start" "-a" "b227fe0beb25a3d1a57267d6ffa745fc604e4f85fd1159194a65d714fe8bfb0c"` [INFO] [stderr] Checking rgb v0.8.12 [INFO] [stderr] Compiling imagequant-sys v2.12.2 [INFO] [stderr] Checking imagequant v2.11.9 (/opt/crater/workdir) [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/lib.rs:100:22 [INFO] [stderr] | [INFO] [stderr] 100 | Attributes { handle: handle } [INFO] [stderr] | ^^^^^^^^^^^^^^ help: replace it with: `handle` [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/lib.rs:204:13 [INFO] [stderr] | [INFO] [stderr] 204 | attr: attr, [INFO] [stderr] | ^^^^^^^^^^ help: replace it with: `attr` [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/lib.rs:100:22 [INFO] [stderr] | [INFO] [stderr] 100 | Attributes { handle: handle } [INFO] [stderr] | ^^^^^^^^^^^^^^ help: replace it with: `handle` [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/lib.rs:204:13 [INFO] [stderr] | [INFO] [stderr] 204 | attr: attr, [INFO] [stderr] | ^^^^^^^^^^ help: replace it with: `attr` [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: unneeded unit return type [INFO] [stderr] --> src/lib.rs:148:63 [INFO] [stderr] | [INFO] [stderr] 148 | pub fn set_last_index_transparent(&mut self, value: bool) -> () { [INFO] [stderr] | ^^^^^ help: remove the `-> ()` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::unused_unit)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stderr] [INFO] [stderr] warning: unneeded unit return type [INFO] [stderr] --> src/lib.rs:148:63 [INFO] [stderr] | [INFO] [stderr] 148 | pub fn set_last_index_transparent(&mut self, value: bool) -> () { [INFO] [stderr] | ^^^^^ help: remove the `-> ()` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::unused_unit)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stderr] [INFO] [stderr] warning: you should consider adding a `Default` implementation for `Attributes` [INFO] [stderr] --> src/lib.rs:97:5 [INFO] [stderr] | [INFO] [stderr] 97 | / pub fn new() -> Self { [INFO] [stderr] 98 | | let handle = unsafe { ffi::liq_attr_create() }; [INFO] [stderr] 99 | | assert!(!handle.is_null(), "SSE-capable CPU is required for this build."); [INFO] [stderr] 100 | | Attributes { handle: handle } [INFO] [stderr] 101 | | } [INFO] [stderr] | |_____^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::new_without_default)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stderr] help: try this [INFO] [stderr] | [INFO] [stderr] 93 | impl Default for Attributes { [INFO] [stderr] 94 | fn default() -> Self { [INFO] [stderr] 95 | Self::new() [INFO] [stderr] 96 | } [INFO] [stderr] 97 | } [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: The function/method `ffi::liq_get_min_quality` doesn't need a mutable reference [INFO] [stderr] --> src/lib.rs:132:39 [INFO] [stderr] | [INFO] [stderr] 132 | (ffi::liq_get_min_quality(&mut *self.handle) as u32, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::unnecessary_mut_passed)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stderr] [INFO] [stderr] warning: The function/method `ffi::liq_get_max_quality` doesn't need a mutable reference [INFO] [stderr] --> src/lib.rs:133:39 [INFO] [stderr] | [INFO] [stderr] 133 | ffi::liq_get_max_quality(&mut *self.handle) as u32) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stderr] [INFO] [stderr] warning: The function/method `ffi::liq_image_quantize` doesn't need a mutable reference [INFO] [stderr] --> src/lib.rs:185:43 [INFO] [stderr] | [INFO] [stderr] 185 | match ffi::liq_image_quantize(&mut *image.handle, &mut *self.handle, &mut h) { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stderr] [INFO] [stderr] warning: The function/method `ffi::liq_image_quantize` doesn't need a mutable reference [INFO] [stderr] --> src/lib.rs:185:63 [INFO] [stderr] | [INFO] [stderr] 185 | match ffi::liq_image_quantize(&mut *image.handle, &mut *self.handle, &mut h) { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stderr] [INFO] [stderr] warning: The function/method `ffi::liq_histogram_quantize` doesn't need a mutable reference [INFO] [stderr] --> src/lib.rs:232:47 [INFO] [stderr] | [INFO] [stderr] 232 | match ffi::liq_histogram_quantize(&mut *self.handle, &*self.attr.handle, &mut h) { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stderr] [INFO] [stderr] warning: `ref` on an entire `let` pattern is discouraged, take a reference with `&` instead [INFO] [stderr] --> src/lib.rs:403:17 [INFO] [stderr] | [INFO] [stderr] 403 | let ref pal = *ffi::liq_get_palette(&mut *self.handle); [INFO] [stderr] | ----^^^^^^^-------------------------------------------- help: try: `let pal = &(*ffi::liq_get_palette(&mut *self.handle));` [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] error: unsafe vector initialization [INFO] [stderr] --> src/lib.rs:415:13 [INFO] [stderr] | [INFO] [stderr] 413 | let mut buf = Vec::with_capacity(len); [INFO] [stderr] | ----------------------- help: consider replace allocation with: `vec![0; len]` [INFO] [stderr] 414 | unsafe { [INFO] [stderr] 415 | buf.set_len(len); // Creates uninitialized buffer [INFO] [stderr] | ^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[deny(clippy::unsafe_vector_initialization)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unsafe_vector_initialization [INFO] [stderr] [INFO] [stderr] error: aborting due to previous error [INFO] [stderr] [INFO] [stderr] error: Could not compile `imagequant`. [INFO] [stderr] warning: build failed, waiting for other jobs to finish... [INFO] [stderr] warning: you should consider adding a `Default` implementation for `Attributes` [INFO] [stderr] --> src/lib.rs:97:5 [INFO] [stderr] | [INFO] [stderr] 97 | / pub fn new() -> Self { [INFO] [stderr] 98 | | let handle = unsafe { ffi::liq_attr_create() }; [INFO] [stderr] 99 | | assert!(!handle.is_null(), "SSE-capable CPU is required for this build."); [INFO] [stderr] 100 | | Attributes { handle: handle } [INFO] [stderr] 101 | | } [INFO] [stderr] | |_____^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::new_without_default)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stderr] help: try this [INFO] [stderr] | [INFO] [stderr] 93 | impl Default for Attributes { [INFO] [stderr] 94 | fn default() -> Self { [INFO] [stderr] 95 | Self::new() [INFO] [stderr] 96 | } [INFO] [stderr] 97 | } [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: The function/method `ffi::liq_get_min_quality` doesn't need a mutable reference [INFO] [stderr] --> src/lib.rs:132:39 [INFO] [stderr] | [INFO] [stderr] 132 | (ffi::liq_get_min_quality(&mut *self.handle) as u32, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::unnecessary_mut_passed)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stderr] [INFO] [stderr] warning: The function/method `ffi::liq_get_max_quality` doesn't need a mutable reference [INFO] [stderr] --> src/lib.rs:133:39 [INFO] [stderr] | [INFO] [stderr] 133 | ffi::liq_get_max_quality(&mut *self.handle) as u32) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stderr] [INFO] [stderr] warning: The function/method `ffi::liq_image_quantize` doesn't need a mutable reference [INFO] [stderr] --> src/lib.rs:185:43 [INFO] [stderr] | [INFO] [stderr] 185 | match ffi::liq_image_quantize(&mut *image.handle, &mut *self.handle, &mut h) { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stderr] [INFO] [stderr] warning: The function/method `ffi::liq_image_quantize` doesn't need a mutable reference [INFO] [stderr] --> src/lib.rs:185:63 [INFO] [stderr] | [INFO] [stderr] 185 | match ffi::liq_image_quantize(&mut *image.handle, &mut *self.handle, &mut h) { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stderr] [INFO] [stderr] warning: The function/method `ffi::liq_histogram_quantize` doesn't need a mutable reference [INFO] [stderr] --> src/lib.rs:232:47 [INFO] [stderr] | [INFO] [stderr] 232 | match ffi::liq_histogram_quantize(&mut *self.handle, &*self.attr.handle, &mut h) { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stderr] [INFO] [stderr] warning: `ref` on an entire `let` pattern is discouraged, take a reference with `&` instead [INFO] [stderr] --> src/lib.rs:403:17 [INFO] [stderr] | [INFO] [stderr] 403 | let ref pal = *ffi::liq_get_palette(&mut *self.handle); [INFO] [stderr] | ----^^^^^^^-------------------------------------------- help: try: `let pal = &(*ffi::liq_get_palette(&mut *self.handle));` [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] error: unsafe vector initialization [INFO] [stderr] --> src/lib.rs:415:13 [INFO] [stderr] | [INFO] [stderr] 413 | let mut buf = Vec::with_capacity(len); [INFO] [stderr] | ----------------------- help: consider replace allocation with: `vec![0; len]` [INFO] [stderr] 414 | unsafe { [INFO] [stderr] 415 | buf.set_len(len); // Creates uninitialized buffer [INFO] [stderr] | ^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[deny(clippy::unsafe_vector_initialization)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unsafe_vector_initialization [INFO] [stderr] [INFO] [stderr] warning: `ref` on an entire `let` pattern is discouraged, take a reference with `&` instead [INFO] [stderr] --> src/lib.rs:501:9 [INFO] [stderr] | [INFO] [stderr] 501 | let ref mut img = liq.new_image(&fakebitmap[..], width, height, 0.0).unwrap(); [INFO] [stderr] | ----^^^^^^^^^^^--------------------------------------------------------------- help: try: `let img = &mut liq.new_image(&fakebitmap[..], width, height, 0.0).unwrap();` [INFO] [stderr] | [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: `ref` on an entire `let` pattern is discouraged, take a reference with `&` instead [INFO] [stderr] --> src/lib.rs:526:9 [INFO] [stderr] | [INFO] [stderr] 526 | let ref mut img = liq.new_image(&bitmap[..], 2, 1, 0.).unwrap(); [INFO] [stderr] | ----^^^^^^^^^^^------------------------------------------------- help: try: `let img = &mut liq.new_image(&bitmap[..], 2, 1, 0.).unwrap();` [INFO] [stderr] | [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: The function/method `quantize` doesn't need a mutable reference [INFO] [stderr] --> src/lib.rs:559:20 [INFO] [stderr] | [INFO] [stderr] 559 | a.quantize(&mut img).unwrap() [INFO] [stderr] | ^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stderr] [INFO] [stderr] error: aborting due to previous error [INFO] [stderr] [INFO] [stderr] error: Could not compile `imagequant`. [INFO] [stderr] [INFO] [stderr] To learn more, run the command again with --verbose. [INFO] running `"docker" "inspect" "b227fe0beb25a3d1a57267d6ffa745fc604e4f85fd1159194a65d714fe8bfb0c"` [INFO] running `"docker" "rm" "-f" "b227fe0beb25a3d1a57267d6ffa745fc604e4f85fd1159194a65d714fe8bfb0c"` [INFO] [stdout] b227fe0beb25a3d1a57267d6ffa745fc604e4f85fd1159194a65d714fe8bfb0c