[INFO] crate disasm6502 0.2.1 is already in cache [INFO] extracting crate disasm6502 0.2.1 into work/ex/clippy-test-run/sources/stable/reg/disasm6502/0.2.1 [INFO] extracting crate disasm6502 0.2.1 into work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/reg/disasm6502/0.2.1 [INFO] validating manifest of disasm6502-0.2.1 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 disasm6502-0.2.1 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 disasm6502-0.2.1 [INFO] finished frobbing disasm6502-0.2.1 [INFO] frobbed toml for disasm6502-0.2.1 written to work/ex/clippy-test-run/sources/stable/reg/disasm6502/0.2.1/Cargo.toml [INFO] started frobbing disasm6502-0.2.1 [INFO] finished frobbing disasm6502-0.2.1 [INFO] frobbed toml for disasm6502-0.2.1 written to work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/reg/disasm6502/0.2.1/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 disasm6502-0.2.1 against stable for clippy-test-run [INFO] running `"docker" "create" "-v" "/mnt/big/crater/work/local/target-dirs/clippy-test-run/worker-0/stable:/opt/crater/target:rw,Z" "-v" "/mnt/big/crater/work/ex/clippy-test-run/sources/stable/reg/disasm6502/0.2.1:/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] bdc80c26be192eddea44c090ac7285afd62d83d5356befd85915a8b729423ebd [INFO] running `"docker" "start" "-a" "bdc80c26be192eddea44c090ac7285afd62d83d5356befd85915a8b729423ebd"` [INFO] [stderr] Checking disasm6502 v0.2.1 (/opt/crater/workdir) [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/instruction.rs:215:13 [INFO] [stderr] | [INFO] [stderr] 215 | opcode: opcode, [INFO] [stderr] | ^^^^^^^^^^^^^^ help: replace it with: `opcode` [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/instruction.rs:216:13 [INFO] [stderr] | [INFO] [stderr] 216 | cycles: cycles, [INFO] [stderr] | ^^^^^^^^^^^^^^ help: replace it with: `cycles` [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/instruction.rs:217:13 [INFO] [stderr] | [INFO] [stderr] 217 | addr_mode: addr_mode, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `addr_mode` [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/instruction.rs:218:13 [INFO] [stderr] | [INFO] [stderr] 218 | address: address, [INFO] [stderr] | ^^^^^^^^^^^^^^^^ help: replace it with: `address` [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/instruction.rs:215:13 [INFO] [stderr] | [INFO] [stderr] 215 | opcode: opcode, [INFO] [stderr] | ^^^^^^^^^^^^^^ help: replace it with: `opcode` [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/instruction.rs:216:13 [INFO] [stderr] | [INFO] [stderr] 216 | cycles: cycles, [INFO] [stderr] | ^^^^^^^^^^^^^^ help: replace it with: `cycles` [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/instruction.rs:217:13 [INFO] [stderr] | [INFO] [stderr] 217 | addr_mode: addr_mode, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `addr_mode` [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/instruction.rs:218:13 [INFO] [stderr] | [INFO] [stderr] 218 | address: address, [INFO] [stderr] | ^^^^^^^^^^^^^^^^ help: replace it with: `address` [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: unnecessary parentheses around function argument [INFO] [stderr] --> src/instruction.rs:326:75 [INFO] [stderr] | [INFO] [stderr] 326 | let value_be = (read_byte(*index, buffer) << 8 & 0xFF00) | (read_byte((*index + 0x0001), buffer) & 0x00FF); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^ help: remove these parentheses [INFO] [stderr] | [INFO] [stderr] = note: #[warn(unused_parens)] on by default [INFO] [stderr] [INFO] [stderr] warning: unnecessary parentheses around function argument [INFO] [stderr] --> src/instruction.rs:326:75 [INFO] [stderr] | [INFO] [stderr] 326 | let value_be = (read_byte(*index, buffer) << 8 & 0xFF00) | (read_byte((*index + 0x0001), buffer) & 0x00FF); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^ help: remove these parentheses [INFO] [stderr] | [INFO] [stderr] = note: #[warn(unused_parens)] on by default [INFO] [stderr] [INFO] [stderr] warning: useless use of `format!` [INFO] [stderr] --> src/instruction.rs:254:28 [INFO] [stderr] | [INFO] [stderr] 254 | Implied => format!(" "), [INFO] [stderr] | ^^^^^^^^^^^^^^^^^ help: consider using .to_string(): `" ".to_string()` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::useless_format)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stderr] [INFO] [stderr] warning: useless use of `format!` [INFO] [stderr] --> src/instruction.rs:255:28 [INFO] [stderr] | [INFO] [stderr] 255 | Accumulator => format!(" "), [INFO] [stderr] | ^^^^^^^^^^^^^^^^^ help: consider using .to_string(): `" ".to_string()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stderr] [INFO] [stderr] warning: useless use of `format!` [INFO] [stderr] --> src/instruction.rs:294:28 [INFO] [stderr] | [INFO] [stderr] 294 | Implied => format!(""), [INFO] [stderr] | ^^^^^^^^^^^ help: consider using .to_string(): `"".to_string()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stderr] [INFO] [stderr] warning: useless use of `format!` [INFO] [stderr] --> src/instruction.rs:295:28 [INFO] [stderr] | [INFO] [stderr] 295 | Accumulator => format!("A"), [INFO] [stderr] | ^^^^^^^^^^^^ help: consider using .to_string(): `"A".to_string()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stderr] [INFO] [stderr] warning: casting i8 to i16 may become silently lossy if types change [INFO] [stderr] --> src/instruction.rs:304:67 [INFO] [stderr] | [INFO] [stderr] 304 | Relative => format!("${:04X}", (self.address as i16 + (2 + operand as i8) as i16) as u16), [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `i16::from(2 + operand as i8)` [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 u16 may become silently lossy if types change [INFO] [stderr] --> src/instruction.rs:317:9 [INFO] [stderr] | [INFO] [stderr] 317 | buffer[index] as u16 [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^ help: try: `u16::from(buffer[index])` [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: redundant pattern matching, consider using `is_some()` [INFO] [stderr] --> src/instruction.rs:352:12 [INFO] [stderr] | [INFO] [stderr] 352 | if let Some(_) = operand { [INFO] [stderr] | _____- ^^^^^^^ [INFO] [stderr] 353 | | *index += 1; [INFO] [stderr] 354 | | } [INFO] [stderr] | |_____- help: try this: `if operand.is_some()` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::redundant_pattern_matching)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stderr] [INFO] [stderr] warning: redundant pattern matching, consider using `is_some()` [INFO] [stderr] --> src/instruction.rs:392:12 [INFO] [stderr] | [INFO] [stderr] 392 | if let Some(_) = ILLEGAL_OPS.into_iter().filter(|&&illegal| op_hex == illegal).next() { [INFO] [stderr] | _____- ^^^^^^^ [INFO] [stderr] 393 | | instruction.illegal = true; [INFO] [stderr] 394 | | } [INFO] [stderr] | |_____- help: try this: `if ILLEGAL_OPS.into_iter().filter(|&&illegal| op_hex == illegal).next().is_some()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stderr] [INFO] [stderr] warning: called `filter(p).next()` on an `Iterator`. This is more succinctly expressed by calling `.find(p)` instead. [INFO] [stderr] --> src/instruction.rs:392:22 [INFO] [stderr] | [INFO] [stderr] 392 | if let Some(_) = ILLEGAL_OPS.into_iter().filter(|&&illegal| op_hex == illegal).next() { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::filter_next)] on by default [INFO] [stderr] = note: replace `filter(|&&illegal| op_hex == illegal).next()` with `find(|&&illegal| op_hex == illegal)` [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#filter_next [INFO] [stderr] [INFO] [stderr] warning: this .into_iter() call is equivalent to .iter() and will not move the slice [INFO] [stderr] --> src/instruction.rs:392:34 [INFO] [stderr] | [INFO] [stderr] 392 | if let Some(_) = ILLEGAL_OPS.into_iter().filter(|&&illegal| op_hex == illegal).next() { [INFO] [stderr] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::into_iter_on_ref)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stderr] [INFO] [stderr] warning: useless use of `format!` [INFO] [stderr] --> src/instruction.rs:254:28 [INFO] [stderr] | [INFO] [stderr] 254 | Implied => format!(" "), [INFO] [stderr] | ^^^^^^^^^^^^^^^^^ help: consider using .to_string(): `" ".to_string()` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::useless_format)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stderr] [INFO] [stderr] warning: useless use of `format!` [INFO] [stderr] --> src/instruction.rs:255:28 [INFO] [stderr] | [INFO] [stderr] 255 | Accumulator => format!(" "), [INFO] [stderr] | ^^^^^^^^^^^^^^^^^ help: consider using .to_string(): `" ".to_string()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stderr] [INFO] [stderr] warning: useless use of `format!` [INFO] [stderr] --> src/instruction.rs:294:28 [INFO] [stderr] | [INFO] [stderr] 294 | Implied => format!(""), [INFO] [stderr] | ^^^^^^^^^^^ help: consider using .to_string(): `"".to_string()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stderr] [INFO] [stderr] warning: useless use of `format!` [INFO] [stderr] --> src/instruction.rs:295:28 [INFO] [stderr] | [INFO] [stderr] 295 | Accumulator => format!("A"), [INFO] [stderr] | ^^^^^^^^^^^^ help: consider using .to_string(): `"A".to_string()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stderr] [INFO] [stderr] warning: casting i8 to i16 may become silently lossy if types change [INFO] [stderr] --> src/instruction.rs:304:67 [INFO] [stderr] | [INFO] [stderr] 304 | Relative => format!("${:04X}", (self.address as i16 + (2 + operand as i8) as i16) as u16), [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `i16::from(2 + operand as i8)` [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 u16 may become silently lossy if types change [INFO] [stderr] --> src/instruction.rs:317:9 [INFO] [stderr] | [INFO] [stderr] 317 | buffer[index] as u16 [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^ help: try: `u16::from(buffer[index])` [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: redundant pattern matching, consider using `is_some()` [INFO] [stderr] --> src/instruction.rs:352:12 [INFO] [stderr] | [INFO] [stderr] 352 | if let Some(_) = operand { [INFO] [stderr] | _____- ^^^^^^^ [INFO] [stderr] 353 | | *index += 1; [INFO] [stderr] 354 | | } [INFO] [stderr] | |_____- help: try this: `if operand.is_some()` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::redundant_pattern_matching)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stderr] [INFO] [stderr] warning: redundant pattern matching, consider using `is_some()` [INFO] [stderr] --> src/instruction.rs:392:12 [INFO] [stderr] | [INFO] [stderr] 392 | if let Some(_) = ILLEGAL_OPS.into_iter().filter(|&&illegal| op_hex == illegal).next() { [INFO] [stderr] | _____- ^^^^^^^ [INFO] [stderr] 393 | | instruction.illegal = true; [INFO] [stderr] 394 | | } [INFO] [stderr] | |_____- help: try this: `if ILLEGAL_OPS.into_iter().filter(|&&illegal| op_hex == illegal).next().is_some()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stderr] [INFO] [stderr] warning: called `filter(p).next()` on an `Iterator`. This is more succinctly expressed by calling `.find(p)` instead. [INFO] [stderr] --> src/instruction.rs:392:22 [INFO] [stderr] | [INFO] [stderr] 392 | if let Some(_) = ILLEGAL_OPS.into_iter().filter(|&&illegal| op_hex == illegal).next() { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::filter_next)] on by default [INFO] [stderr] = note: replace `filter(|&&illegal| op_hex == illegal).next()` with `find(|&&illegal| op_hex == illegal)` [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#filter_next [INFO] [stderr] [INFO] [stderr] warning: this .into_iter() call is equivalent to .iter() and will not move the slice [INFO] [stderr] --> src/instruction.rs:392:34 [INFO] [stderr] | [INFO] [stderr] 392 | if let Some(_) = ILLEGAL_OPS.into_iter().filter(|&&illegal| op_hex == illegal).next() { [INFO] [stderr] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::into_iter_on_ref)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stderr] [INFO] [stderr] warning: useless use of `format!` [INFO] [stderr] --> examples/disasm6502.rs:30:26 [INFO] [stderr] | [INFO] [stderr] 30 | let op_illegal_str = format!("{}", if instruction.illegal { "???" } else { " " }); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using .to_string(): `if instruction.illegal { "???" } else { " " }.to_string()` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::useless_format)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stderr] = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) [INFO] [stderr] [INFO] [stderr] Finished dev [unoptimized + debuginfo] target(s) in 1.89s [INFO] running `"docker" "inspect" "bdc80c26be192eddea44c090ac7285afd62d83d5356befd85915a8b729423ebd"` [INFO] running `"docker" "rm" "-f" "bdc80c26be192eddea44c090ac7285afd62d83d5356befd85915a8b729423ebd"` [INFO] [stdout] bdc80c26be192eddea44c090ac7285afd62d83d5356befd85915a8b729423ebd