[INFO] crate classfile-parser 0.3.2 is already in cache [INFO] extracting crate classfile-parser 0.3.2 into work/ex/clippy-test-run/sources/stable/reg/classfile-parser/0.3.2 [INFO] extracting crate classfile-parser 0.3.2 into work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/reg/classfile-parser/0.3.2 [INFO] validating manifest of classfile-parser-0.3.2 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 classfile-parser-0.3.2 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 classfile-parser-0.3.2 [INFO] finished frobbing classfile-parser-0.3.2 [INFO] frobbed toml for classfile-parser-0.3.2 written to work/ex/clippy-test-run/sources/stable/reg/classfile-parser/0.3.2/Cargo.toml [INFO] started frobbing classfile-parser-0.3.2 [INFO] finished frobbing classfile-parser-0.3.2 [INFO] frobbed toml for classfile-parser-0.3.2 written to work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/reg/classfile-parser/0.3.2/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 classfile-parser-0.3.2 against stable for clippy-test-run [INFO] running `"docker" "create" "-v" "/mnt/big/crater/work/local/target-dirs/clippy-test-run/worker-1/stable:/opt/crater/target:rw,Z" "-v" "/mnt/big/crater/work/ex/clippy-test-run/sources/stable/reg/classfile-parser/0.3.2:/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] 7af73d6e43fbaed45f78e09228ae08db127d66e9b7efd50364c27a8182e1887f [INFO] running `"docker" "start" "-a" "7af73d6e43fbaed45f78e09228ae08db127d66e9b7efd50364c27a8182e1887f"` [INFO] [stderr] Checking classfile-parser v0.3.2 (/opt/crater/workdir) [INFO] [stderr] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stderr] --> src/constant_info/parser.rs:147:56 [INFO] [stderr] | [INFO] [stderr] 147 | fn const_block_parser(input: &[u8], const_type: u8) -> Result<(&[u8], ConstantInfo), Err<&[u8], u32>> { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::type_complexity)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stderr] [INFO] [stderr] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stderr] --> src/constant_info/parser.rs:167:44 [INFO] [stderr] | [INFO] [stderr] 167 | fn single_constant_parser(input: &[u8]) -> Result<(&[u8], ConstantInfo), Err<&[u8], u32>> { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stderr] [INFO] [stderr] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stderr] --> src/constant_info/parser.rs:175:61 [INFO] [stderr] | [INFO] [stderr] 175 | pub fn constant_parser(i: &[u8], const_pool_size: usize) -> Result<(&[u8], Vec), Err<&[u8], u32>> { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stderr] [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/attribute_info/parser.rs:64:25 [INFO] [stderr] | [INFO] [stderr] 64 | fn verification_type(v: &u8) -> Option { [INFO] [stderr] | ^^^ help: consider passing by value instead: `u8` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::trivially_copy_pass_by_ref)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stderr] [INFO] [stderr] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stderr] --> src/constant_info/parser.rs:147:56 [INFO] [stderr] | [INFO] [stderr] 147 | fn const_block_parser(input: &[u8], const_type: u8) -> Result<(&[u8], ConstantInfo), Err<&[u8], u32>> { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::type_complexity)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stderr] [INFO] [stderr] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stderr] --> src/constant_info/parser.rs:167:44 [INFO] [stderr] | [INFO] [stderr] 167 | fn single_constant_parser(input: &[u8]) -> Result<(&[u8], ConstantInfo), Err<&[u8], u32>> { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stderr] [INFO] [stderr] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stderr] --> src/constant_info/parser.rs:175:61 [INFO] [stderr] | [INFO] [stderr] 175 | pub fn constant_parser(i: &[u8], const_pool_size: usize) -> Result<(&[u8], Vec), Err<&[u8], u32>> { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stderr] [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/attribute_info/parser.rs:64:25 [INFO] [stderr] | [INFO] [stderr] 64 | fn verification_type(v: &u8) -> Option { [INFO] [stderr] | ^^^ help: consider passing by value instead: `u8` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::trivially_copy_pass_by_ref)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stderr] [INFO] [stderr] warning: you seem to be trying to use match for destructuring a single pattern. Consider using `if let` [INFO] [stderr] --> src/lib.rs:33:5 [INFO] [stderr] | [INFO] [stderr] 33 | / match file.read_to_end(&mut class_bytes) { [INFO] [stderr] 34 | | Err(why) => return Err(format!("Unable to read {}: {}", display, Error::description(&why))), [INFO] [stderr] 35 | | Ok(_) => {}, [INFO] [stderr] 36 | | }; [INFO] [stderr] | |_____^ help: try this: `if let Err(why) = file.read_to_end(&mut class_bytes) { return Err(format!("Unable to read {}: {}", display, Error::description(&why))) }` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::single_match)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stderr] [INFO] [stderr] warning: you seem to be trying to use match for destructuring a single pattern. Consider using `if let` [INFO] [stderr] --> src/lib.rs:33:5 [INFO] [stderr] | [INFO] [stderr] 33 | / match file.read_to_end(&mut class_bytes) { [INFO] [stderr] 34 | | Err(why) => return Err(format!("Unable to read {}: {}", display, Error::description(&why))), [INFO] [stderr] 35 | | Ok(_) => {}, [INFO] [stderr] 36 | | }; [INFO] [stderr] | |_____^ help: try this: `if let Err(why) = file.read_to_end(&mut class_bytes) { return Err(format!("Unable to read {}: {}", display, Error::description(&why))) }` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::single_match)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stderr] [INFO] [stderr] warning: you seem to be trying to use match for destructuring a single pattern. Consider using `if let` [INFO] [stderr] --> tests/classfile.rs:21:17 [INFO] [stderr] | [INFO] [stderr] 21 | / match *const_item { [INFO] [stderr] 22 | | ConstantInfo::Utf8(ref c) => { [INFO] [stderr] 23 | | if c.utf8_string == "Code" { [INFO] [stderr] 24 | | code_const_index = (const_index + 1) as u16; [INFO] [stderr] ... | [INFO] [stderr] 27 | | _ => {}, [INFO] [stderr] 28 | | } [INFO] [stderr] | |_________________^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::single_match)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stderr] help: try this [INFO] [stderr] | [INFO] [stderr] 21 | if let ConstantInfo::Utf8(ref c) = *const_item { [INFO] [stderr] 22 | if c.utf8_string == "Code" { [INFO] [stderr] 23 | code_const_index = (const_index + 1) as u16; [INFO] [stderr] 24 | } [INFO] [stderr] 25 | } [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: the variable `interface_index` is used as a loop counter. Consider using `for (interface_index, item) in &c.interfaces.enumerate()` or similar iterators [INFO] [stderr] --> tests/classfile.rs:34:22 [INFO] [stderr] | [INFO] [stderr] 34 | for i in &c.interfaces { [INFO] [stderr] | ^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::explicit_counter_loop)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stderr] [INFO] [stderr] warning: the variable `field_index` is used as a loop counter. Consider using `for (field_index, item) in &c.fields.enumerate()` or similar iterators [INFO] [stderr] --> tests/classfile.rs:41:22 [INFO] [stderr] | [INFO] [stderr] 41 | for f in &c.fields { [INFO] [stderr] | ^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stderr] [INFO] [stderr] warning: the variable `method_index` is used as a loop counter. Consider using `for (method_index, item) in &c.methods.enumerate()` or similar iterators [INFO] [stderr] --> tests/classfile.rs:47:22 [INFO] [stderr] | [INFO] [stderr] 47 | for m in &c.methods { [INFO] [stderr] | ^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop [INFO] [stderr] [INFO] [stderr] warning: you seem to be trying to use match for destructuring a single pattern. Consider using `if let` [INFO] [stderr] --> tests/classfile.rs:85:17 [INFO] [stderr] | [INFO] [stderr] 85 | / match *const_item { [INFO] [stderr] 86 | | ConstantInfo::Utf8(ref c) => { [INFO] [stderr] 87 | | if c.utf8_string == "2H₂ + O₂ ⇌ 2H₂O, R = 4.7 kΩ, ⌀ 200 mm" { [INFO] [stderr] 88 | | found_utf_maths_string = true; [INFO] [stderr] ... | [INFO] [stderr] 97 | | _ => {}, [INFO] [stderr] 98 | | } [INFO] [stderr] | |_________________^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stderr] help: try this [INFO] [stderr] | [INFO] [stderr] 85 | if let ConstantInfo::Utf8(ref c) = *const_item { [INFO] [stderr] 86 | if c.utf8_string == "2H₂ + O₂ ⇌ 2H₂O, R = 4.7 kΩ, ⌀ 200 mm" { [INFO] [stderr] 87 | found_utf_maths_string = true; [INFO] [stderr] 88 | } [INFO] [stderr] 89 | if c.utf8_string == "ᚻᛖ ᚳᚹᚫᚦ ᚦᚫᛏ ᚻᛖ ᛒᚢᛞᛖ ᚩᚾ ᚦᚫᛗ ᛚᚪᚾᛞᛖ ᚾᚩᚱᚦᚹᛖᚪᚱᛞᚢᛗ ᚹᛁᚦ ᚦᚪ ᚹᛖᛥᚫ" { [INFO] [stderr] 90 | found_utf_runes_string = true; [INFO] [stderr] ... [INFO] [stderr] [INFO] [stderr] warning: you seem to be trying to use match for destructuring a single pattern. Consider using `if let` [INFO] [stderr] --> tests/classfile.rs:111:5 [INFO] [stderr] | [INFO] [stderr] 111 | / match res { [INFO] [stderr] 112 | | Result::Ok((_, _)) => panic!("The file is not valid and shouldn't be parsed"), [INFO] [stderr] 113 | | _ => {}, [INFO] [stderr] 114 | | }; [INFO] [stderr] | |_____^ help: try this: `if let Result::Ok((_, _)) = res { panic!("The file is not valid and shouldn't be parsed") }` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stderr] [INFO] [stderr] warning: you seem to be trying to use match for destructuring a single pattern. Consider using `if let` [INFO] [stderr] --> tests/attr_bootstrap_methods.rs:20:17 [INFO] [stderr] | [INFO] [stderr] 20 | / match *const_item { [INFO] [stderr] 21 | | ConstantInfo::Utf8(ref c) => { [INFO] [stderr] 22 | | if c.utf8_string == "BootstrapMethods" { [INFO] [stderr] 23 | | if bootstrap_method_const_index != 0 { [INFO] [stderr] ... | [INFO] [stderr] 29 | | _ => {} [INFO] [stderr] 30 | | } [INFO] [stderr] | |_________________^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::single_match)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stderr] help: try this [INFO] [stderr] | [INFO] [stderr] 20 | if let ConstantInfo::Utf8(ref c) = *const_item { [INFO] [stderr] 21 | if c.utf8_string == "BootstrapMethods" { [INFO] [stderr] 22 | if bootstrap_method_const_index != 0 { [INFO] [stderr] 23 | assert!(false, "Should not find more than one BootstrapMethods constant"); [INFO] [stderr] 24 | } [INFO] [stderr] 25 | bootstrap_method_const_index = (const_index + 1) as u16; [INFO] [stderr] ... [INFO] [stderr] [INFO] [stderr] warning: you seem to be trying to use match for destructuring a single pattern. Consider using `if let` [INFO] [stderr] --> tests/attr_bootstrap_methods.rs:73:17 [INFO] [stderr] | [INFO] [stderr] 73 | / match *const_item { [INFO] [stderr] 74 | | ConstantInfo::Utf8(ref c) => { [INFO] [stderr] 75 | | if c.utf8_string == "BootstrapMethods" { [INFO] [stderr] 76 | | assert!(false, "Should not have found a BootstrapMethods constant in a class not requiring it") [INFO] [stderr] ... | [INFO] [stderr] 79 | | _ => {} [INFO] [stderr] 80 | | } [INFO] [stderr] | |_________________^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stderr] help: try this [INFO] [stderr] | [INFO] [stderr] 73 | if let ConstantInfo::Utf8(ref c) = *const_item { [INFO] [stderr] 74 | if c.utf8_string == "BootstrapMethods" { [INFO] [stderr] 75 | assert!(false, "Should not have found a BootstrapMethods constant in a class not requiring it") [INFO] [stderr] 76 | } [INFO] [stderr] 77 | } [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] Finished dev [unoptimized + debuginfo] target(s) in 4.17s [INFO] running `"docker" "inspect" "7af73d6e43fbaed45f78e09228ae08db127d66e9b7efd50364c27a8182e1887f"` [INFO] running `"docker" "rm" "-f" "7af73d6e43fbaed45f78e09228ae08db127d66e9b7efd50364c27a8182e1887f"` [INFO] [stdout] 7af73d6e43fbaed45f78e09228ae08db127d66e9b7efd50364c27a8182e1887f