[INFO] updating cached repository Euphoric/EconomicSim [INFO] running `"git" "fetch" "--all"` [INFO] [stdout] Fetching origin [INFO] [stderr] From git://github.com/Euphoric/EconomicSim [INFO] [stderr] * branch HEAD -> FETCH_HEAD [INFO] running `"git" "clone" "work/cache/sources/gh/Euphoric/EconomicSim" "work/ex/clippy-test-run/sources/stable/gh/Euphoric/EconomicSim"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable/gh/Euphoric/EconomicSim'... [INFO] [stderr] done. [INFO] running `"git" "clone" "work/cache/sources/gh/Euphoric/EconomicSim" "work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/Euphoric/EconomicSim"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/Euphoric/EconomicSim'... [INFO] [stderr] done. [INFO] running `"git" "rev-parse" "HEAD"` [INFO] [stdout] 01d71306fbc3e508eeb5f5be7ffadf80d30fc545 [INFO] sha for GitHub repo Euphoric/EconomicSim: 01d71306fbc3e508eeb5f5be7ffadf80d30fc545 [INFO] validating manifest of Euphoric/EconomicSim 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 Euphoric/EconomicSim 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 Euphoric/EconomicSim [INFO] finished frobbing Euphoric/EconomicSim [INFO] frobbed toml for Euphoric/EconomicSim written to work/ex/clippy-test-run/sources/stable/gh/Euphoric/EconomicSim/Cargo.toml [INFO] started frobbing Euphoric/EconomicSim [INFO] finished frobbing Euphoric/EconomicSim [INFO] frobbed toml for Euphoric/EconomicSim written to work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/Euphoric/EconomicSim/Cargo.toml [INFO] crate Euphoric/EconomicSim 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 Euphoric/EconomicSim against stable+rustflags=-Dclippy::into_iter_on_array for clippy-test-run [INFO] running `"docker" "create" "-v" "/mnt/big/crater/work/local/target-dirs/clippy-test-run/worker-4/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array:/opt/crater/target:rw,Z" "-v" "/mnt/big/crater/work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/Euphoric/EconomicSim:/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 -Dclippy::into_iter_on_array" "-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] fc45255ccf3bfb5b732f379b33b566e24cc00a7b49159a76dfb0d5b9784385f3 [INFO] running `"docker" "start" "-a" "fc45255ccf3bfb5b732f379b33b566e24cc00a7b49159a76dfb0d5b9784385f3"` [INFO] [stderr] Checking populations v0.1.0 (/opt/crater/workdir) [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/main.rs:49:29 [INFO] [stderr] | [INFO] [stderr] 49 | Production::Dimmishing {product:product, multiple:mult, dimminish : dimm } [INFO] [stderr] | ^^^^^^^^^^^^^^^ help: replace it with: `product` [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/main.rs:49:29 [INFO] [stderr] | [INFO] [stderr] 49 | Production::Dimmishing {product:product, multiple:mult, dimminish : dimm } [INFO] [stderr] | ^^^^^^^^^^^^^^^ help: replace it with: `product` [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: long literal lacking separators [INFO] [stderr] --> src/main.rs:146:33 [INFO] [stderr] | [INFO] [stderr] 146 | if sold_ratio > 1.000001 { [INFO] [stderr] | ^^^^^^^^ help: consider: `1.000_001` [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: long literal lacking separators [INFO] [stderr] --> src/main.rs:220:44 [INFO] [stderr] | [INFO] [stderr] 220 | if prod.products[x] < -0.0000001 { [INFO] [stderr] | ^^^^^^^^^ help: consider: `0.000_000_1` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unreadable_literal [INFO] [stderr] [INFO] [stderr] warning: long literal lacking separators [INFO] [stderr] --> src/main.rs:224:33 [INFO] [stderr] | [INFO] [stderr] 224 | if prod.gold < -0.0000001 { [INFO] [stderr] | ^^^^^^^^^ help: consider: `0.000_000_1` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unreadable_literal [INFO] [stderr] [INFO] [stderr] warning: variable `wanted_resources` is assigned to, but never used [INFO] [stderr] --> src/main.rs:111:25 [INFO] [stderr] | [INFO] [stderr] 111 | let mut wanted_resources = 0_f64; [INFO] [stderr] | ^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(unused_variables)] on by default [INFO] [stderr] = note: consider using `_wanted_resources` instead [INFO] [stderr] [INFO] [stderr] warning: variable `wanted_gold` is assigned to, but never used [INFO] [stderr] --> src/main.rs:119:25 [INFO] [stderr] | [INFO] [stderr] 119 | let mut wanted_gold = 0_f64; [INFO] [stderr] | ^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: consider using `_wanted_gold` instead [INFO] [stderr] [INFO] [stderr] warning: long literal lacking separators [INFO] [stderr] --> src/main.rs:146:33 [INFO] [stderr] | [INFO] [stderr] 146 | if sold_ratio > 1.000001 { [INFO] [stderr] | ^^^^^^^^ help: consider: `1.000_001` [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: long literal lacking separators [INFO] [stderr] --> src/main.rs:220:44 [INFO] [stderr] | [INFO] [stderr] 220 | if prod.products[x] < -0.0000001 { [INFO] [stderr] | ^^^^^^^^^ help: consider: `0.000_000_1` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unreadable_literal [INFO] [stderr] [INFO] [stderr] warning: long literal lacking separators [INFO] [stderr] --> src/main.rs:224:33 [INFO] [stderr] | [INFO] [stderr] 224 | if prod.gold < -0.0000001 { [INFO] [stderr] | ^^^^^^^^^ help: consider: `0.000_000_1` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unreadable_literal [INFO] [stderr] [INFO] [stderr] warning: variant is never constructed: `Relative` [INFO] [stderr] --> src/main.rs:30:5 [INFO] [stderr] | [INFO] [stderr] 30 | Relative {product : usize, ratio : f64}, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(dead_code)] on by default [INFO] [stderr] [INFO] [stderr] warning: you don't need to add `&` to all patterns [INFO] [stderr] --> src/main.rs:36:9 [INFO] [stderr] | [INFO] [stderr] 36 | / match self { [INFO] [stderr] 37 | | &Production::None => (0, 0.0), [INFO] [stderr] 38 | | &Production::Relative { product, ratio } => (product, population * ratio), [INFO] [stderr] 39 | | &Production::Dimmishing { product, multiple, dimminish } => (product, ((population+1.0).powf(1.0-dimminish) - 1.0)/(1.0-dimminish) * multiple), [INFO] [stderr] 40 | | } [INFO] [stderr] | |_________^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::match_ref_pats)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stderr] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stderr] | [INFO] [stderr] 36 | match *self { [INFO] [stderr] 37 | Production::None => (0, 0.0), [INFO] [stderr] 38 | Production::Relative { product, ratio } => (product, population * ratio), [INFO] [stderr] 39 | Production::Dimmishing { product, multiple, dimminish } => (product, ((population+1.0).powf(1.0-dimminish) - 1.0)/(1.0-dimminish) * multiple), [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: the loop variable `x` is only used to index `producers`. [INFO] [stderr] --> src/main.rs:81:18 [INFO] [stderr] | [INFO] [stderr] 81 | for x in 0..producer_count { [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] 81 | for in producers.iter_mut().take(producer_count) { [INFO] [stderr] | ^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: the loop variable `x` is only used to index `producers`. [INFO] [stderr] --> src/main.rs:90:22 [INFO] [stderr] | [INFO] [stderr] 90 | for x in 0..producer_count { [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] 90 | for in producers.iter().take(producer_count) { [INFO] [stderr] | ^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false [INFO] [stderr] --> src/main.rs:107:20 [INFO] [stderr] | [INFO] [stderr] 107 | if sellers.len() <= 0 || buyers.len() <= 0 { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[deny(clippy::absurd_extreme_comparisons)] on by default [INFO] [stderr] = help: because 0 is the minimum value for this type, the case where the two sides are not equal never occurs, consider using sellers.len() == 0 instead [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#absurd_extreme_comparisons [INFO] [stderr] [INFO] [stderr] error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false [INFO] [stderr] --> src/main.rs:107:42 [INFO] [stderr] | [INFO] [stderr] 107 | if sellers.len() <= 0 || buyers.len() <= 0 { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: because 0 is the minimum value for this type, the case where the two sides are not equal never occurs, consider using buyers.len() == 0 instead [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#absurd_extreme_comparisons [INFO] [stderr] [INFO] [stderr] warning: the loop variable `x` is used to index `producers` [INFO] [stderr] --> src/main.rs:161:18 [INFO] [stderr] | [INFO] [stderr] 161 | for x in 0..producer_count { [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] 161 | for (x, ) in producers.iter_mut().enumerate().take(producer_count) { [INFO] [stderr] | ^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: the loop variable `x` is only used to index `producers`. [INFO] [stderr] --> src/main.rs:207:22 [INFO] [stderr] | [INFO] [stderr] 207 | for x in 1..producer_count { [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] 207 | for in producers.iter_mut().take(producer_count).skip(1) { [INFO] [stderr] | ^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] error: aborting due to 2 previous errors [INFO] [stderr] [INFO] [stderr] error: Could not compile `populations`. [INFO] [stderr] warning: build failed, waiting for other jobs to finish... [INFO] [stderr] warning: variable `wanted_resources` is assigned to, but never used [INFO] [stderr] --> src/main.rs:111:25 [INFO] [stderr] | [INFO] [stderr] 111 | let mut wanted_resources = 0_f64; [INFO] [stderr] | ^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(unused_variables)] on by default [INFO] [stderr] = note: consider using `_wanted_resources` instead [INFO] [stderr] [INFO] [stderr] warning: variable `wanted_gold` is assigned to, but never used [INFO] [stderr] --> src/main.rs:119:25 [INFO] [stderr] | [INFO] [stderr] 119 | let mut wanted_gold = 0_f64; [INFO] [stderr] | ^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: consider using `_wanted_gold` instead [INFO] [stderr] [INFO] [stderr] warning: variant is never constructed: `Relative` [INFO] [stderr] --> src/main.rs:30:5 [INFO] [stderr] | [INFO] [stderr] 30 | Relative {product : usize, ratio : f64}, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(dead_code)] on by default [INFO] [stderr] [INFO] [stderr] warning: you don't need to add `&` to all patterns [INFO] [stderr] --> src/main.rs:36:9 [INFO] [stderr] | [INFO] [stderr] 36 | / match self { [INFO] [stderr] 37 | | &Production::None => (0, 0.0), [INFO] [stderr] 38 | | &Production::Relative { product, ratio } => (product, population * ratio), [INFO] [stderr] 39 | | &Production::Dimmishing { product, multiple, dimminish } => (product, ((population+1.0).powf(1.0-dimminish) - 1.0)/(1.0-dimminish) * multiple), [INFO] [stderr] 40 | | } [INFO] [stderr] | |_________^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::match_ref_pats)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stderr] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stderr] | [INFO] [stderr] 36 | match *self { [INFO] [stderr] 37 | Production::None => (0, 0.0), [INFO] [stderr] 38 | Production::Relative { product, ratio } => (product, population * ratio), [INFO] [stderr] 39 | Production::Dimmishing { product, multiple, dimminish } => (product, ((population+1.0).powf(1.0-dimminish) - 1.0)/(1.0-dimminish) * multiple), [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: the loop variable `x` is only used to index `producers`. [INFO] [stderr] --> src/main.rs:81:18 [INFO] [stderr] | [INFO] [stderr] 81 | for x in 0..producer_count { [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] 81 | for in producers.iter_mut().take(producer_count) { [INFO] [stderr] | ^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: the loop variable `x` is only used to index `producers`. [INFO] [stderr] --> src/main.rs:90:22 [INFO] [stderr] | [INFO] [stderr] 90 | for x in 0..producer_count { [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] 90 | for in producers.iter().take(producer_count) { [INFO] [stderr] | ^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false [INFO] [stderr] --> src/main.rs:107:20 [INFO] [stderr] | [INFO] [stderr] 107 | if sellers.len() <= 0 || buyers.len() <= 0 { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[deny(clippy::absurd_extreme_comparisons)] on by default [INFO] [stderr] = help: because 0 is the minimum value for this type, the case where the two sides are not equal never occurs, consider using sellers.len() == 0 instead [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#absurd_extreme_comparisons [INFO] [stderr] [INFO] [stderr] error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false [INFO] [stderr] --> src/main.rs:107:42 [INFO] [stderr] | [INFO] [stderr] 107 | if sellers.len() <= 0 || buyers.len() <= 0 { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: because 0 is the minimum value for this type, the case where the two sides are not equal never occurs, consider using buyers.len() == 0 instead [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#absurd_extreme_comparisons [INFO] [stderr] [INFO] [stderr] warning: the loop variable `x` is used to index `producers` [INFO] [stderr] --> src/main.rs:161:18 [INFO] [stderr] | [INFO] [stderr] 161 | for x in 0..producer_count { [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] 161 | for (x, ) in producers.iter_mut().enumerate().take(producer_count) { [INFO] [stderr] | ^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: the loop variable `x` is only used to index `producers`. [INFO] [stderr] --> src/main.rs:207:22 [INFO] [stderr] | [INFO] [stderr] 207 | for x in 1..producer_count { [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] 207 | for in producers.iter_mut().take(producer_count).skip(1) { [INFO] [stderr] | ^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] error: aborting due to 2 previous errors [INFO] [stderr] [INFO] [stderr] error: Could not compile `populations`. [INFO] [stderr] [INFO] [stderr] To learn more, run the command again with --verbose. [INFO] running `"docker" "inspect" "fc45255ccf3bfb5b732f379b33b566e24cc00a7b49159a76dfb0d5b9784385f3"` [INFO] running `"docker" "rm" "-f" "fc45255ccf3bfb5b732f379b33b566e24cc00a7b49159a76dfb0d5b9784385f3"` [INFO] [stdout] fc45255ccf3bfb5b732f379b33b566e24cc00a7b49159a76dfb0d5b9784385f3