[INFO] updating cached repository bencecile/binary-flare [INFO] running `"git" "fetch" "--all"` [INFO] [stdout] Fetching origin [INFO] [stderr] From git://github.com/bencecile/binary-flare [INFO] [stderr] * branch HEAD -> FETCH_HEAD [INFO] running `"git" "clone" "work/cache/sources/gh/bencecile/binary-flare" "work/ex/clippy-test-run/sources/stable/gh/bencecile/binary-flare"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable/gh/bencecile/binary-flare'... [INFO] [stderr] done. [INFO] running `"git" "clone" "work/cache/sources/gh/bencecile/binary-flare" "work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/bencecile/binary-flare"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/bencecile/binary-flare'... [INFO] [stderr] done. [INFO] running `"git" "rev-parse" "HEAD"` [INFO] [stdout] 7be2d2bde1c27d8086bdf1f1ce62440416adf575 [INFO] sha for GitHub repo bencecile/binary-flare: 7be2d2bde1c27d8086bdf1f1ce62440416adf575 [INFO] validating manifest of bencecile/binary-flare 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 bencecile/binary-flare 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 bencecile/binary-flare [INFO] finished frobbing bencecile/binary-flare [INFO] frobbed toml for bencecile/binary-flare written to work/ex/clippy-test-run/sources/stable/gh/bencecile/binary-flare/Cargo.toml [INFO] started frobbing bencecile/binary-flare [INFO] finished frobbing bencecile/binary-flare [INFO] frobbed toml for bencecile/binary-flare written to work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/bencecile/binary-flare/Cargo.toml [INFO] crate bencecile/binary-flare 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 bencecile/binary-flare 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/bencecile/binary-flare:/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] f7539669dd0f333b659d309253c73bc045e7af757da7ba22878fe5b700fd8bf1 [INFO] running `"docker" "start" "-a" "f7539669dd0f333b659d309253c73bc045e7af757da7ba22878fe5b700fd8bf1"` [INFO] [stderr] Compiling miniz-sys v0.1.9 [INFO] [stderr] Checking rand v0.4.2 [INFO] [stderr] Checking num_cpus v1.8.0 [INFO] [stderr] Checking time v0.1.39 [INFO] [stderr] Checking rayon-core v1.4.0 [INFO] [stderr] Checking flate2 v1.0.1 [INFO] [stderr] Checking rayon v1.0.0 [INFO] [stderr] Checking binaryflare v0.1.0 (/opt/crater/workdir) [INFO] [stderr] warning: using `write!()` with a format string that ends in a single newline, consider using `writeln!()` instead [INFO] [stderr] --> src/main.rs:101:9 [INFO] [stderr] | [INFO] [stderr] 101 | write!(results_string, "In: {}\n", base.display()).unwrap(); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::write_with_newline)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stderr] [INFO] [stderr] warning: using `write!()` with a format string that ends in a single newline, consider using `writeln!()` instead [INFO] [stderr] --> src/main.rs:102:9 [INFO] [stderr] | [INFO] [stderr] 102 | write!(results_string, "Out:\n").unwrap(); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stderr] [INFO] [stderr] warning: using `write!()` with a format string that ends in a single newline, consider using `writeln!()` instead [INFO] [stderr] --> src/main.rs:105:13 [INFO] [stderr] | [INFO] [stderr] 105 | write!(results_string, " {}\n", file.display()).unwrap(); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stderr] [INFO] [stderr] warning: using `write!()` with a format string that ends in a single newline, consider using `writeln!()` instead [INFO] [stderr] --> src/main.rs:101:9 [INFO] [stderr] | [INFO] [stderr] 101 | write!(results_string, "In: {}\n", base.display()).unwrap(); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::write_with_newline)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stderr] [INFO] [stderr] warning: using `write!()` with a format string that ends in a single newline, consider using `writeln!()` instead [INFO] [stderr] --> src/main.rs:102:9 [INFO] [stderr] | [INFO] [stderr] 102 | write!(results_string, "Out:\n").unwrap(); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stderr] [INFO] [stderr] warning: using `write!()` with a format string that ends in a single newline, consider using `writeln!()` instead [INFO] [stderr] --> src/main.rs:105:13 [INFO] [stderr] | [INFO] [stderr] 105 | write!(results_string, " {}\n", file.display()).unwrap(); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stderr] [INFO] [stderr] warning: Constants have by default a `'static` lifetime [INFO] [stderr] --> src/formats/xp3.rs:109:16 [INFO] [stderr] | [INFO] [stderr] 109 | const HEADER: &'static [u8] = &[ 0x58, 0x50, 0x33, 0x0d, 0x0a, 0x20, 0x0a, 0x1a, 0x8b, 0x67, 0x01 ]; [INFO] [stderr] | -^^^^^^^----- help: consider removing `'static`: `&[u8]` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::const_static_lifetime)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#const_static_lifetime [INFO] [stderr] [INFO] [stderr] warning: Constants have by default a `'static` lifetime [INFO] [stderr] --> src/main.rs:22:17 [INFO] [stderr] | [INFO] [stderr] 22 | const OUT_DIR: &'static str = "out"; [INFO] [stderr] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#const_static_lifetime [INFO] [stderr] [INFO] [stderr] warning: Constants have by default a `'static` lifetime [INFO] [stderr] --> src/formats/xp3.rs:109:16 [INFO] [stderr] | [INFO] [stderr] 109 | const HEADER: &'static [u8] = &[ 0x58, 0x50, 0x33, 0x0d, 0x0a, 0x20, 0x0a, 0x1a, 0x8b, 0x67, 0x01 ]; [INFO] [stderr] | -^^^^^^^----- help: consider removing `'static`: `&[u8]` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::const_static_lifetime)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#const_static_lifetime [INFO] [stderr] [INFO] [stderr] warning: Constants have by default a `'static` lifetime [INFO] [stderr] --> src/main.rs:22:17 [INFO] [stderr] | [INFO] [stderr] 22 | const OUT_DIR: &'static str = "out"; [INFO] [stderr] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#const_static_lifetime [INFO] [stderr] [INFO] [stderr] warning: function is never used: `make_relative` [INFO] [stderr] --> src/file_utils.rs:19:1 [INFO] [stderr] | [INFO] [stderr] 19 | pub fn make_relative(old: &PathBuf, new_base: &PathBuf) -> PathBuf { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(dead_code)] on by default [INFO] [stderr] [INFO] [stderr] error: incompatible bit mask: `_ & 2147483648` can never be equal to `1` [INFO] [stderr] --> src/formats/xp3.rs:313:12 [INFO] [stderr] | [INFO] [stderr] 313 | if item_flags & PROTECTED_MASK == 1 { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[deny(clippy::bad_bit_mask)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bad_bit_mask [INFO] [stderr] [INFO] [stderr] warning: casting u8 to u32 may become silently lossy if types change [INFO] [stderr] --> src/formats/xp3.rs:397:41 [INFO] [stderr] | [INFO] [stderr] 397 | let compressed = if flags & (ENCODING_MASK as u32) == 1 { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `u32::from(ENCODING_MASK)` [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 u32 may become silently lossy if types change [INFO] [stderr] --> src/formats/xp3.rs:399:31 [INFO] [stderr] | [INFO] [stderr] 399 | } else if flags & (ENCODING_MASK as u32) == 0 { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `u32::from(ENCODING_MASK)` [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] error: this .into_iter() call is equivalent to .iter() and will not move the array [INFO] [stderr] --> src/formats/mod.rs:45:7 [INFO] [stderr] | [INFO] [stderr] 45 | ].into_iter().filter_map(|&(format, is_correct_format)| { [INFO] [stderr] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stderr] | [INFO] [stderr] = note: #[deny(clippy::into_iter_on_array)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_array [INFO] [stderr] [INFO] [stderr] warning: casting u8 to u16 may become silently lossy if types change [INFO] [stderr] --> src/stream/types.rs:79:27 [INFO] [stderr] | [INFO] [stderr] 79 | *code_point = (bytes[i * 2] as u16) + ((bytes[(i * 2) + 1] as u16) << 8); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `u16::from(bytes[i * 2])` [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 u8 to u16 may become silently lossy if types change [INFO] [stderr] --> src/stream/types.rs:79:52 [INFO] [stderr] | [INFO] [stderr] 79 | *code_point = (bytes[i * 2] as u16) + ((bytes[(i * 2) + 1] as u16) << 8); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `u16::from(bytes[(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: item `stream::ReadStream` has a public `len` method but no corresponding `is_empty` method [INFO] [stderr] --> src/stream/mod.rs:20:1 [INFO] [stderr] | [INFO] [stderr] 20 | / impl ReadStream { [INFO] [stderr] 21 | | ///Creates a new ReadStream [INFO] [stderr] 22 | | pub fn new(stream: R, little_endian: bool) -> Self { [INFO] [stderr] 23 | | ReadStream { [INFO] [stderr] ... | [INFO] [stderr] 88 | | } [INFO] [stderr] 89 | | } [INFO] [stderr] | |_^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::len_without_is_empty)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_without_is_empty [INFO] [stderr] [INFO] [stderr] warning: length comparison to zero [INFO] [stderr] --> src/main.rs:64:8 [INFO] [stderr] | [INFO] [stderr] 64 | if flares.len() == 0 { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `flares.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: length comparison to zero [INFO] [stderr] --> src/main.rs:72:11 [INFO] [stderr] | [INFO] [stderr] 72 | while flares.len() > 0 { [INFO] [stderr] | ^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `!flares.is_empty()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stderr] [INFO] [stderr] error: aborting due to 2 previous errors [INFO] [stderr] [INFO] [stderr] error: Could not compile `binaryflare`. [INFO] [stderr] warning: build failed, waiting for other jobs to finish... [INFO] [stderr] warning: function is never used: `make_relative` [INFO] [stderr] --> src/file_utils.rs:19:1 [INFO] [stderr] | [INFO] [stderr] 19 | pub fn make_relative(old: &PathBuf, new_base: &PathBuf) -> PathBuf { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(dead_code)] on by default [INFO] [stderr] [INFO] [stderr] error: incompatible bit mask: `_ & 2147483648` can never be equal to `1` [INFO] [stderr] --> src/formats/xp3.rs:313:12 [INFO] [stderr] | [INFO] [stderr] 313 | if item_flags & PROTECTED_MASK == 1 { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[deny(clippy::bad_bit_mask)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bad_bit_mask [INFO] [stderr] [INFO] [stderr] warning: casting u8 to u32 may become silently lossy if types change [INFO] [stderr] --> src/formats/xp3.rs:397:41 [INFO] [stderr] | [INFO] [stderr] 397 | let compressed = if flags & (ENCODING_MASK as u32) == 1 { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `u32::from(ENCODING_MASK)` [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 u32 may become silently lossy if types change [INFO] [stderr] --> src/formats/xp3.rs:399:31 [INFO] [stderr] | [INFO] [stderr] 399 | } else if flags & (ENCODING_MASK as u32) == 0 { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `u32::from(ENCODING_MASK)` [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] error: this .into_iter() call is equivalent to .iter() and will not move the array [INFO] [stderr] --> src/formats/mod.rs:45:7 [INFO] [stderr] | [INFO] [stderr] 45 | ].into_iter().filter_map(|&(format, is_correct_format)| { [INFO] [stderr] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stderr] | [INFO] [stderr] = note: #[deny(clippy::into_iter_on_array)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_array [INFO] [stderr] [INFO] [stderr] warning: casting u8 to u16 may become silently lossy if types change [INFO] [stderr] --> src/stream/types.rs:79:27 [INFO] [stderr] | [INFO] [stderr] 79 | *code_point = (bytes[i * 2] as u16) + ((bytes[(i * 2) + 1] as u16) << 8); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `u16::from(bytes[i * 2])` [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 u8 to u16 may become silently lossy if types change [INFO] [stderr] --> src/stream/types.rs:79:52 [INFO] [stderr] | [INFO] [stderr] 79 | *code_point = (bytes[i * 2] as u16) + ((bytes[(i * 2) + 1] as u16) << 8); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `u16::from(bytes[(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: item `stream::ReadStream` has a public `len` method but no corresponding `is_empty` method [INFO] [stderr] --> src/stream/mod.rs:20:1 [INFO] [stderr] | [INFO] [stderr] 20 | / impl ReadStream { [INFO] [stderr] 21 | | ///Creates a new ReadStream [INFO] [stderr] 22 | | pub fn new(stream: R, little_endian: bool) -> Self { [INFO] [stderr] 23 | | ReadStream { [INFO] [stderr] ... | [INFO] [stderr] 88 | | } [INFO] [stderr] 89 | | } [INFO] [stderr] | |_^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::len_without_is_empty)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_without_is_empty [INFO] [stderr] [INFO] [stderr] warning: length comparison to zero [INFO] [stderr] --> src/main.rs:64:8 [INFO] [stderr] | [INFO] [stderr] 64 | if flares.len() == 0 { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `flares.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: length comparison to zero [INFO] [stderr] --> src/main.rs:72:11 [INFO] [stderr] | [INFO] [stderr] 72 | while flares.len() > 0 { [INFO] [stderr] | ^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `!flares.is_empty()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stderr] [INFO] [stderr] error: aborting due to 2 previous errors [INFO] [stderr] [INFO] [stderr] error: Could not compile `binaryflare`. [INFO] [stderr] [INFO] [stderr] To learn more, run the command again with --verbose. [INFO] running `"docker" "inspect" "f7539669dd0f333b659d309253c73bc045e7af757da7ba22878fe5b700fd8bf1"` [INFO] running `"docker" "rm" "-f" "f7539669dd0f333b659d309253c73bc045e7af757da7ba22878fe5b700fd8bf1"` [INFO] [stdout] f7539669dd0f333b659d309253c73bc045e7af757da7ba22878fe5b700fd8bf1