[INFO] updating cached repository ruuda/filebuffer [INFO] running `"git" "fetch" "--all"` [INFO] [stdout] Fetching origin [INFO] [stderr] From git://github.com/ruuda/filebuffer [INFO] [stderr] * branch HEAD -> FETCH_HEAD [INFO] running `"git" "clone" "work/cache/sources/gh/ruuda/filebuffer" "work/ex/clippy-test-run/sources/stable/gh/ruuda/filebuffer"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable/gh/ruuda/filebuffer'... [INFO] [stderr] done. [INFO] running `"git" "clone" "work/cache/sources/gh/ruuda/filebuffer" "work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/ruuda/filebuffer"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/ruuda/filebuffer'... [INFO] [stderr] done. [INFO] running `"git" "rev-parse" "HEAD"` [INFO] [stdout] 971c15ea4d88928068a0812757fa9c3e8712437f [INFO] sha for GitHub repo ruuda/filebuffer: 971c15ea4d88928068a0812757fa9c3e8712437f [INFO] validating manifest of ruuda/filebuffer 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 ruuda/filebuffer 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 ruuda/filebuffer [INFO] finished frobbing ruuda/filebuffer [INFO] frobbed toml for ruuda/filebuffer written to work/ex/clippy-test-run/sources/stable/gh/ruuda/filebuffer/Cargo.toml [INFO] started frobbing ruuda/filebuffer [INFO] finished frobbing ruuda/filebuffer [INFO] frobbed toml for ruuda/filebuffer written to work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/ruuda/filebuffer/Cargo.toml [INFO] crate ruuda/filebuffer 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 ruuda/filebuffer against stable for clippy-test-run [INFO] running `"docker" "create" "-v" "/mnt/big/crater/work/local/target-dirs/clippy-test-run/worker-2/stable:/opt/crater/target:rw,Z" "-v" "/mnt/big/crater/work/ex/clippy-test-run/sources/stable/gh/ruuda/filebuffer:/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] 08383e0e688f397a4776c48a1e18995ff120b1bf991a34546255a6bad0b67270 [INFO] running `"docker" "start" "-a" "08383e0e688f397a4776c48a1e18995ff120b1bf991a34546255a6bad0b67270"` [INFO] [stderr] Compiling gcc v0.3.35 [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] Compiling rust-crypto v0.2.36 [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 12.13s [INFO] running `"docker" "inspect" "08383e0e688f397a4776c48a1e18995ff120b1bf991a34546255a6bad0b67270"` [INFO] running `"docker" "rm" "-f" "08383e0e688f397a4776c48a1e18995ff120b1bf991a34546255a6bad0b67270"` [INFO] [stdout] 08383e0e688f397a4776c48a1e18995ff120b1bf991a34546255a6bad0b67270