[INFO] crate bitcoin-chain 0.3.1 is already in cache [INFO] extracting crate bitcoin-chain 0.3.1 into work/ex/clippy-test-run/sources/stable/reg/bitcoin-chain/0.3.1 [INFO] extracting crate bitcoin-chain 0.3.1 into work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/reg/bitcoin-chain/0.3.1 [INFO] validating manifest of bitcoin-chain-0.3.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 bitcoin-chain-0.3.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 bitcoin-chain-0.3.1 [INFO] finished frobbing bitcoin-chain-0.3.1 [INFO] frobbed toml for bitcoin-chain-0.3.1 written to work/ex/clippy-test-run/sources/stable/reg/bitcoin-chain/0.3.1/Cargo.toml [INFO] started frobbing bitcoin-chain-0.3.1 [INFO] finished frobbing bitcoin-chain-0.3.1 [INFO] frobbed toml for bitcoin-chain-0.3.1 written to work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/reg/bitcoin-chain/0.3.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 bitcoin-chain-0.3.1 against stable for clippy-test-run [INFO] running `"docker" "create" "-v" "/mnt/big/crater/work/local/target-dirs/clippy-test-run/worker-5/stable:/opt/crater/target:rw,Z" "-v" "/mnt/big/crater/work/ex/clippy-test-run/sources/stable/reg/bitcoin-chain/0.3.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] 3e9ff82c90d5db03ae44bb9c031fbb668a1f9f71c17ff32f784da9d9968bf28d [INFO] running `"docker" "start" "-a" "3e9ff82c90d5db03ae44bb9c031fbb668a1f9f71c17ff32f784da9d9968bf28d"` [INFO] [stderr] Checking bitcoin-chain v0.3.1 (/opt/crater/workdir) [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/blockchain.rs:224:13 [INFO] [stderr] | [INFO] [stderr] 224 | network: network, [INFO] [stderr] | ^^^^^^^^^^^^^^^^ help: replace it with: `network` [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/blockchain.rs:225:13 [INFO] [stderr] | [INFO] [stderr] 225 | tree: tree, [INFO] [stderr] | ^^^^^^^^^^ help: replace it with: `tree` [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/blockchain.rs:227:13 [INFO] [stderr] | [INFO] [stderr] 227 | best_hash: best_hash, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `best_hash` [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/blockchain.rs:228:13 [INFO] [stderr] | [INFO] [stderr] 228 | genesis_hash: genesis_hash [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `genesis_hash` [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/blockchain.rs:404:13 [INFO] [stderr] | [INFO] [stderr] 404 | network: network, [INFO] [stderr] | ^^^^^^^^^^^^^^^^ help: replace it with: `network` [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/blockchain.rs:444:37 [INFO] [stderr] | [INFO] [stderr] 444 | self.real_add_block(Block { header: header, txdata: vec![] }, false) [INFO] [stderr] | ^^^^^^^^^^^^^^ help: replace it with: `header` [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/blockchain.rs:521:21 [INFO] [stderr] | [INFO] [stderr] 521 | block: block, [INFO] [stderr] | ^^^^^^^^^^^^ help: replace it with: `block` [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/blockchain.rs:524:21 [INFO] [stderr] | [INFO] [stderr] 524 | has_txdata: has_txdata, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `has_txdata` [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/blockchain.rs:525:21 [INFO] [stderr] | [INFO] [stderr] 525 | prev: prev, [INFO] [stderr] | ^^^^^^^^^^ help: replace it with: `prev` [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/patricia_tree.rs:146:21 [INFO] [stderr] | [INFO] [stderr] 146 | child_l: child_l, [INFO] [stderr] | ^^^^^^^^^^^^^^^^ help: replace it with: `child_l` [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/patricia_tree.rs:147:21 [INFO] [stderr] | [INFO] [stderr] 147 | child_r: child_r, [INFO] [stderr] | ^^^^^^^^^^^^^^^^ help: replace it with: `child_r` [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/patricia_tree.rs:173:25 [INFO] [stderr] | [INFO] [stderr] 173 | child_l: child_l, [INFO] [stderr] | ^^^^^^^^^^^^^^^^ help: replace it with: `child_l` [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/patricia_tree.rs:174:25 [INFO] [stderr] | [INFO] [stderr] 174 | child_r: child_r, [INFO] [stderr] | ^^^^^^^^^^^^^^^^ help: replace it with: `child_r` [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/blockchain.rs:224:13 [INFO] [stderr] | [INFO] [stderr] 224 | network: network, [INFO] [stderr] | ^^^^^^^^^^^^^^^^ help: replace it with: `network` [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/blockchain.rs:225:13 [INFO] [stderr] | [INFO] [stderr] 225 | tree: tree, [INFO] [stderr] | ^^^^^^^^^^ help: replace it with: `tree` [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/blockchain.rs:227:13 [INFO] [stderr] | [INFO] [stderr] 227 | best_hash: best_hash, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `best_hash` [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/blockchain.rs:228:13 [INFO] [stderr] | [INFO] [stderr] 228 | genesis_hash: genesis_hash [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `genesis_hash` [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/blockchain.rs:404:13 [INFO] [stderr] | [INFO] [stderr] 404 | network: network, [INFO] [stderr] | ^^^^^^^^^^^^^^^^ help: replace it with: `network` [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/blockchain.rs:444:37 [INFO] [stderr] | [INFO] [stderr] 444 | self.real_add_block(Block { header: header, txdata: vec![] }, false) [INFO] [stderr] | ^^^^^^^^^^^^^^ help: replace it with: `header` [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/blockchain.rs:521:21 [INFO] [stderr] | [INFO] [stderr] 521 | block: block, [INFO] [stderr] | ^^^^^^^^^^^^ help: replace it with: `block` [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/blockchain.rs:524:21 [INFO] [stderr] | [INFO] [stderr] 524 | has_txdata: has_txdata, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `has_txdata` [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/blockchain.rs:525:21 [INFO] [stderr] | [INFO] [stderr] 525 | prev: prev, [INFO] [stderr] | ^^^^^^^^^^ help: replace it with: `prev` [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/patricia_tree.rs:146:21 [INFO] [stderr] | [INFO] [stderr] 146 | child_l: child_l, [INFO] [stderr] | ^^^^^^^^^^^^^^^^ help: replace it with: `child_l` [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/patricia_tree.rs:147:21 [INFO] [stderr] | [INFO] [stderr] 147 | child_r: child_r, [INFO] [stderr] | ^^^^^^^^^^^^^^^^ help: replace it with: `child_r` [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/patricia_tree.rs:173:25 [INFO] [stderr] | [INFO] [stderr] 173 | child_l: child_l, [INFO] [stderr] | ^^^^^^^^^^^^^^^^ help: replace it with: `child_l` [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/patricia_tree.rs:174:25 [INFO] [stderr] | [INFO] [stderr] 174 | child_r: child_r, [INFO] [stderr] | ^^^^^^^^^^^^^^^^ help: replace it with: `child_r` [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: long literal lacking separators [INFO] [stderr] --> src/patricia_tree.rs:558:41 [INFO] [stderr] | [INFO] [stderr] 558 | let mut key = Uint256::from_u64(0xDEADBEEFDEADBEEF).unwrap(); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^ help: consider: `0xDEAD_BEEF_DEAD_BEEF` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::unreadable_literal)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unreadable_literal [INFO] [stderr] [INFO] [stderr] warning: casting u32 to u64 may become silently lossy if types change [INFO] [stderr] --> src/blockchain.rs:490:61 [INFO] [stderr] | [INFO] [stderr] 490 | target = target / Uint256::from_u64(DIFFCHANGE_TIMESPAN as u64).unwrap(); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `u64::from(DIFFCHANGE_TIMESPAN)` [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: you should consider adding a `Default` implementation for `patricia_tree::PatriciaTree` [INFO] [stderr] --> src/patricia_tree.rs:49:5 [INFO] [stderr] | [INFO] [stderr] 49 | / pub fn new() -> PatriciaTree { [INFO] [stderr] 50 | | PatriciaTree { [INFO] [stderr] 51 | | data: None, [INFO] [stderr] 52 | | child_l: None, [INFO] [stderr] ... | [INFO] [stderr] 56 | | } [INFO] [stderr] 57 | | } [INFO] [stderr] | |_____^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::new_without_default)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stderr] help: try this [INFO] [stderr] | [INFO] [stderr] 41 | impl Default for patricia_tree::PatriciaTree { [INFO] [stderr] 42 | fn default() -> Self { [INFO] [stderr] 43 | Self::new() [INFO] [stderr] 44 | } [INFO] [stderr] 45 | } [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: casting u32 to u64 may become silently lossy if types change [INFO] [stderr] --> src/blockchain.rs:490:61 [INFO] [stderr] | [INFO] [stderr] 490 | target = target / Uint256::from_u64(DIFFCHANGE_TIMESPAN as u64).unwrap(); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `u64::from(DIFFCHANGE_TIMESPAN)` [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: you should consider adding a `Default` implementation for `patricia_tree::PatriciaTree` [INFO] [stderr] --> src/patricia_tree.rs:49:5 [INFO] [stderr] | [INFO] [stderr] 49 | / pub fn new() -> PatriciaTree { [INFO] [stderr] 50 | | PatriciaTree { [INFO] [stderr] 51 | | data: None, [INFO] [stderr] 52 | | child_l: None, [INFO] [stderr] ... | [INFO] [stderr] 56 | | } [INFO] [stderr] 57 | | } [INFO] [stderr] | |_____^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::new_without_default)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stderr] help: try this [INFO] [stderr] | [INFO] [stderr] 41 | impl Default for patricia_tree::PatriciaTree { [INFO] [stderr] 42 | fn default() -> Self { [INFO] [stderr] 43 | Self::new() [INFO] [stderr] 44 | } [INFO] [stderr] 45 | } [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: the loop variable `i` is used to index `data` [INFO] [stderr] --> src/patricia_tree.rs:648:18 [INFO] [stderr] | [INFO] [stderr] 648 | for i in 0..n_elems { [INFO] [stderr] | ^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::needless_range_loop)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stderr] help: consider using an iterator [INFO] [stderr] | [INFO] [stderr] 648 | for (i, ) in data.iter_mut().enumerate().take(n_elems) { [INFO] [stderr] | ^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: the loop variable `i` is used to index `data` [INFO] [stderr] --> src/patricia_tree.rs:670:18 [INFO] [stderr] | [INFO] [stderr] 670 | for i in 0..n_elems { [INFO] [stderr] | ^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stderr] help: consider using an iterator [INFO] [stderr] | [INFO] [stderr] 670 | for (i, ) in data.iter_mut().enumerate().take(n_elems) { [INFO] [stderr] | ^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] Finished dev [unoptimized + debuginfo] target(s) in 2.60s [INFO] running `"docker" "inspect" "3e9ff82c90d5db03ae44bb9c031fbb668a1f9f71c17ff32f784da9d9968bf28d"` [INFO] running `"docker" "rm" "-f" "3e9ff82c90d5db03ae44bb9c031fbb668a1f9f71c17ff32f784da9d9968bf28d"` [INFO] [stdout] 3e9ff82c90d5db03ae44bb9c031fbb668a1f9f71c17ff32f784da9d9968bf28d