[INFO] updating cached repository arjantop/tlpi-examples-rust [INFO] running `"git" "fetch" "--all"` [INFO] [stdout] Fetching origin [INFO] [stderr] From git://github.com/arjantop/tlpi-examples-rust [INFO] [stderr] * branch HEAD -> FETCH_HEAD [INFO] running `"git" "clone" "work/cache/sources/gh/arjantop/tlpi-examples-rust" "work/ex/clippy-test-run/sources/stable/gh/arjantop/tlpi-examples-rust"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable/gh/arjantop/tlpi-examples-rust'... [INFO] [stderr] done. [INFO] running `"git" "clone" "work/cache/sources/gh/arjantop/tlpi-examples-rust" "work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/arjantop/tlpi-examples-rust"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/arjantop/tlpi-examples-rust'... [INFO] [stderr] done. [INFO] running `"git" "rev-parse" "HEAD"` [INFO] [stdout] 81ca551d4f78ed4ad7c04e2831778157749c50b5 [INFO] sha for GitHub repo arjantop/tlpi-examples-rust: 81ca551d4f78ed4ad7c04e2831778157749c50b5 [INFO] validating manifest of arjantop/tlpi-examples-rust 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 arjantop/tlpi-examples-rust 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 arjantop/tlpi-examples-rust [INFO] finished frobbing arjantop/tlpi-examples-rust [INFO] frobbed toml for arjantop/tlpi-examples-rust written to work/ex/clippy-test-run/sources/stable/gh/arjantop/tlpi-examples-rust/Cargo.toml [INFO] started frobbing arjantop/tlpi-examples-rust [INFO] finished frobbing arjantop/tlpi-examples-rust [INFO] frobbed toml for arjantop/tlpi-examples-rust written to work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/arjantop/tlpi-examples-rust/Cargo.toml [INFO] crate arjantop/tlpi-examples-rust 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 arjantop/tlpi-examples-rust 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/gh/arjantop/tlpi-examples-rust:/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] 307b39e8b51ffbeb0d69a5d044f012cd613cedbcb013be609fee2b25f254e751 [INFO] running `"docker" "start" "-a" "307b39e8b51ffbeb0d69a5d044f012cd613cedbcb013be609fee2b25f254e751"` [INFO] [stderr] Checking chrono v0.3.1 [INFO] [stderr] Checking lpi-examples v0.1.0 (/opt/crater/workdir) [INFO] [stderr] warning: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration) [INFO] [stderr] --> src/chapter5/t_readv.rs:14:1 [INFO] [stderr] | [INFO] [stderr] 14 | / unsafe fn as_mut_slice<'a, T>(v: &'a mut T) -> &'a mut [u8] { [INFO] [stderr] 15 | | let v_mut = v as *mut T; [INFO] [stderr] 16 | | from_raw_parts_mut(v_mut as *mut u8, size_of::()) [INFO] [stderr] 17 | | } [INFO] [stderr] | |_^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::needless_lifetimes)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stderr] [INFO] [stderr] warning: calling `as_bytes()` on a string literal [INFO] [stderr] --> src/exercises/chapter5/exercise3.rs:38:19 [INFO] [stderr] | [INFO] [stderr] 38 | write(fd, "a".as_bytes()).expect("Could not write to file"); [INFO] [stderr] | ^^^^^^^^^^^^^^ help: consider using a byte string literal instead: `b"a"` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::string_lit_as_bytes)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#string_lit_as_bytes [INFO] [stderr] [INFO] [stderr] warning: calling `as_bytes()` on a string literal [INFO] [stderr] --> src/exercises/chapter5/exercise3.rs:38:19 [INFO] [stderr] | [INFO] [stderr] 38 | write(fd, "a".as_bytes()).expect("Could not write to file"); [INFO] [stderr] | ^^^^^^^^^^^^^^ help: consider using a byte string literal instead: `b"a"` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::string_lit_as_bytes)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#string_lit_as_bytes [INFO] [stderr] [INFO] [stderr] warning: this `else { if .. }` block can be collapsed [INFO] [stderr] --> src/chapter15/t_stat.rs:25:16 [INFO] [stderr] | [INFO] [stderr] 25 | } else { [INFO] [stderr] | ________________^ [INFO] [stderr] 26 | | if perm & special as u32 != 0 { [INFO] [stderr] 27 | | special_only_str [INFO] [stderr] 28 | | } else { [INFO] [stderr] 29 | | "-" [INFO] [stderr] 30 | | } [INFO] [stderr] 31 | | } [INFO] [stderr] | |_________^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::collapsible_if)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stderr] help: try [INFO] [stderr] | [INFO] [stderr] 25 | } else if perm & special as u32 != 0 { [INFO] [stderr] 26 | special_only_str [INFO] [stderr] 27 | } else { [INFO] [stderr] 28 | "-" [INFO] [stderr] 29 | } [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] error: this `if` has the same condition as a previous if [INFO] [stderr] --> src/chapter15/t_stat.rs:66:15 [INFO] [stderr] | [INFO] [stderr] 66 | } else if ft == S_IFIFO { [INFO] [stderr] | ^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[deny(clippy::ifs_same_cond)] on by default [INFO] [stderr] note: same as this [INFO] [stderr] --> src/chapter15/t_stat.rs:64:15 [INFO] [stderr] | [INFO] [stderr] 64 | } else if ft == S_IFIFO { [INFO] [stderr] | ^^^^^^^^^^^^^ [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ifs_same_cond [INFO] [stderr] [INFO] [stderr] error: aborting due to previous error [INFO] [stderr] [INFO] [stderr] error: Could not compile `lpi-examples`. [INFO] [stderr] warning: build failed, waiting for other jobs to finish... [INFO] [stderr] warning: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration) [INFO] [stderr] --> src/chapter5/t_readv.rs:14:1 [INFO] [stderr] | [INFO] [stderr] 14 | / unsafe fn as_mut_slice<'a, T>(v: &'a mut T) -> &'a mut [u8] { [INFO] [stderr] 15 | | let v_mut = v as *mut T; [INFO] [stderr] 16 | | from_raw_parts_mut(v_mut as *mut u8, size_of::()) [INFO] [stderr] 17 | | } [INFO] [stderr] | |_^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::needless_lifetimes)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stderr] [INFO] [stderr] warning: this `else { if .. }` block can be collapsed [INFO] [stderr] --> src/chapter15/t_stat.rs:25:16 [INFO] [stderr] | [INFO] [stderr] 25 | } else { [INFO] [stderr] | ________________^ [INFO] [stderr] 26 | | if perm & special as u32 != 0 { [INFO] [stderr] 27 | | special_only_str [INFO] [stderr] 28 | | } else { [INFO] [stderr] 29 | | "-" [INFO] [stderr] 30 | | } [INFO] [stderr] 31 | | } [INFO] [stderr] | |_________^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::collapsible_if)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stderr] help: try [INFO] [stderr] | [INFO] [stderr] 25 | } else if perm & special as u32 != 0 { [INFO] [stderr] 26 | special_only_str [INFO] [stderr] 27 | } else { [INFO] [stderr] 28 | "-" [INFO] [stderr] 29 | } [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] error: this `if` has the same condition as a previous if [INFO] [stderr] --> src/chapter15/t_stat.rs:66:15 [INFO] [stderr] | [INFO] [stderr] 66 | } else if ft == S_IFIFO { [INFO] [stderr] | ^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[deny(clippy::ifs_same_cond)] on by default [INFO] [stderr] note: same as this [INFO] [stderr] --> src/chapter15/t_stat.rs:64:15 [INFO] [stderr] | [INFO] [stderr] 64 | } else if ft == S_IFIFO { [INFO] [stderr] | ^^^^^^^^^^^^^ [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ifs_same_cond [INFO] [stderr] [INFO] [stderr] error: aborting due to previous error [INFO] [stderr] [INFO] [stderr] error: Could not compile `lpi-examples`. [INFO] [stderr] [INFO] [stderr] To learn more, run the command again with --verbose. [INFO] running `"docker" "inspect" "307b39e8b51ffbeb0d69a5d044f012cd613cedbcb013be609fee2b25f254e751"` [INFO] running `"docker" "rm" "-f" "307b39e8b51ffbeb0d69a5d044f012cd613cedbcb013be609fee2b25f254e751"` [INFO] [stdout] 307b39e8b51ffbeb0d69a5d044f012cd613cedbcb013be609fee2b25f254e751