[INFO] crate filebuffer 0.4.0 is already in cache [INFO] extracting crate filebuffer 0.4.0 into work/ex/clippy-test-run/sources/stable/reg/filebuffer/0.4.0 [INFO] extracting crate filebuffer 0.4.0 into work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/reg/filebuffer/0.4.0 [INFO] validating manifest of filebuffer-0.4.0 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 filebuffer-0.4.0 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 filebuffer-0.4.0 [INFO] finished frobbing filebuffer-0.4.0 [INFO] frobbed toml for filebuffer-0.4.0 written to work/ex/clippy-test-run/sources/stable/reg/filebuffer/0.4.0/Cargo.toml [INFO] started frobbing filebuffer-0.4.0 [INFO] finished frobbing filebuffer-0.4.0 [INFO] frobbed toml for filebuffer-0.4.0 written to work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/reg/filebuffer/0.4.0/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 filebuffer-0.4.0 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/reg/filebuffer/0.4.0:/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] a51a31eee6c5fadc707779c6f950563fb41d7ec653822359412dae3af32da90e [INFO] running `"docker" "start" "-a" "a51a31eee6c5fadc707779c6f950563fb41d7ec653822359412dae3af32da90e"` [INFO] [stderr] Checking gcc v0.3.35 [INFO] [stderr] Compiling rust-crypto v0.2.36 [INFO] [stderr] Checking filebuffer v0.4.0 (/opt/crater/workdir) [INFO] [stderr] Checking time v0.1.35 [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/lib.rs:118:13 [INFO] [stderr] | [INFO] [stderr] 118 | buffer: buffer, [INFO] [stderr] | ^^^^^^^^^^^^^^ help: replace it with: `buffer` [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:119:13 [INFO] [stderr] | [INFO] [stderr] 119 | length: length, [INFO] [stderr] | ^^^^^^^^^^^^^^ help: replace it with: `length` [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:120:13 [INFO] [stderr] | [INFO] [stderr] 120 | platform_data: platform_data [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `platform_data` [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: Comparing with null is better expressed by the .is_null() method [INFO] [stderr] --> src/lib.rs:147:12 [INFO] [stderr] | [INFO] [stderr] 147 | if self.buffer == ptr::null() { return 0; } [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::cmp_null)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_null [INFO] [stderr] [INFO] [stderr] warning: Comparing with null is better expressed by the .is_null() method [INFO] [stderr] --> src/lib.rs:219:12 [INFO] [stderr] | [INFO] [stderr] 219 | if self.buffer == ptr::null() { return; } [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_null [INFO] [stderr] [INFO] [stderr] warning: use of `offset` with a `usize` casted to an `isize` [INFO] [stderr] --> src/lib.rs:224:31 [INFO] [stderr] | [INFO] [stderr] 224 | let buffer = unsafe { self.buffer.offset(aligned_offset as isize) }; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.buffer.add(aligned_offset)` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::ptr_offset_with_cast)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_offset_with_cast [INFO] [stderr] [INFO] [stderr] warning: Comparing with null is better expressed by the .is_null() method [INFO] [stderr] --> src/lib.rs:258:12 [INFO] [stderr] | [INFO] [stderr] 258 | if self.buffer != ptr::null() { unmap_file(self.buffer, self.length); } [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_null [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/lib.rs:118:13 [INFO] [stderr] | [INFO] [stderr] 118 | buffer: buffer, [INFO] [stderr] | ^^^^^^^^^^^^^^ help: replace it with: `buffer` [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:119:13 [INFO] [stderr] | [INFO] [stderr] 119 | length: length, [INFO] [stderr] | ^^^^^^^^^^^^^^ help: replace it with: `length` [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:120:13 [INFO] [stderr] | [INFO] [stderr] 120 | platform_data: platform_data [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `platform_data` [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: length comparison to zero [INFO] [stderr] --> examples/sha256sum_naive.rs:29:20 [INFO] [stderr] | [INFO] [stderr] 29 | if buffer.len() == 0 { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `buffer.is_empty()` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::len_zero)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stderr] [INFO] [stderr] warning: Comparing with null is better expressed by the .is_null() method [INFO] [stderr] --> src/lib.rs:147:12 [INFO] [stderr] | [INFO] [stderr] 147 | if self.buffer == ptr::null() { return 0; } [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::cmp_null)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_null [INFO] [stderr] [INFO] [stderr] warning: Comparing with null is better expressed by the .is_null() method [INFO] [stderr] --> src/lib.rs:219:12 [INFO] [stderr] | [INFO] [stderr] 219 | if self.buffer == ptr::null() { return; } [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_null [INFO] [stderr] [INFO] [stderr] warning: use of `offset` with a `usize` casted to an `isize` [INFO] [stderr] --> src/lib.rs:224:31 [INFO] [stderr] | [INFO] [stderr] 224 | let buffer = unsafe { self.buffer.offset(aligned_offset as isize) }; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.buffer.add(aligned_offset)` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::ptr_offset_with_cast)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_offset_with_cast [INFO] [stderr] [INFO] [stderr] warning: Comparing with null is better expressed by the .is_null() method [INFO] [stderr] --> src/lib.rs:258:12 [INFO] [stderr] | [INFO] [stderr] 258 | if self.buffer != ptr::null() { unmap_file(self.buffer, self.length); } [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_null [INFO] [stderr] [INFO] [stderr] Finished dev [unoptimized + debuginfo] target(s) in 9.17s [INFO] running `"docker" "inspect" "a51a31eee6c5fadc707779c6f950563fb41d7ec653822359412dae3af32da90e"` [INFO] running `"docker" "rm" "-f" "a51a31eee6c5fadc707779c6f950563fb41d7ec653822359412dae3af32da90e"` [INFO] [stdout] a51a31eee6c5fadc707779c6f950563fb41d7ec653822359412dae3af32da90e