[INFO] updating cached repository miguelangelo78/Simple-Neuron [INFO] running `"git" "fetch" "--all"` [INFO] [stdout] Fetching origin [INFO] [stderr] From git://github.com/miguelangelo78/Simple-Neuron [INFO] [stderr] * branch HEAD -> FETCH_HEAD [INFO] running `"git" "clone" "work/cache/sources/gh/miguelangelo78/Simple-Neuron" "work/ex/clippy-test-run/sources/stable/gh/miguelangelo78/Simple-Neuron"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable/gh/miguelangelo78/Simple-Neuron'... [INFO] [stderr] done. [INFO] running `"git" "clone" "work/cache/sources/gh/miguelangelo78/Simple-Neuron" "work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/miguelangelo78/Simple-Neuron"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/miguelangelo78/Simple-Neuron'... [INFO] [stderr] done. [INFO] running `"git" "rev-parse" "HEAD"` [INFO] [stdout] 4d9565030f9d31fabd66f83ef273adac62ae00e2 [INFO] sha for GitHub repo miguelangelo78/Simple-Neuron: 4d9565030f9d31fabd66f83ef273adac62ae00e2 [INFO] validating manifest of miguelangelo78/Simple-Neuron 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 miguelangelo78/Simple-Neuron 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 miguelangelo78/Simple-Neuron [INFO] finished frobbing miguelangelo78/Simple-Neuron [INFO] frobbed toml for miguelangelo78/Simple-Neuron written to work/ex/clippy-test-run/sources/stable/gh/miguelangelo78/Simple-Neuron/Cargo.toml [INFO] started frobbing miguelangelo78/Simple-Neuron [INFO] finished frobbing miguelangelo78/Simple-Neuron [INFO] frobbed toml for miguelangelo78/Simple-Neuron written to work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/miguelangelo78/Simple-Neuron/Cargo.toml [INFO] crate miguelangelo78/Simple-Neuron 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 miguelangelo78/Simple-Neuron against stable for clippy-test-run [INFO] running `"docker" "create" "-v" "/mnt/big/crater/work/local/target-dirs/clippy-test-run/worker-7/stable:/opt/crater/target:rw,Z" "-v" "/mnt/big/crater/work/ex/clippy-test-run/sources/stable/gh/miguelangelo78/Simple-Neuron:/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] ec28af95866847e309da0ba4bb548fa90517779ab472b5a2a428c173fa64e08e [INFO] running `"docker" "start" "-a" "ec28af95866847e309da0ba4bb548fa90517779ab472b5a2a428c173fa64e08e"` [INFO] [stderr] Checking Simple-Neuron v0.1.0 (/opt/crater/workdir) [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/main.rs:129:3 [INFO] [stderr] | [INFO] [stderr] 129 | bias: bias, /* Set bias value */ [INFO] [stderr] | ^^^^^^^^^^ help: replace it with: `bias` [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:130:3 [INFO] [stderr] | [INFO] [stderr] 130 | learning_coeff: learning_coeff, /* Set the learning coefficient */ [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `learning_coeff` [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/main.rs:136:5 [INFO] [stderr] | [INFO] [stderr] 136 | desired: desired, [INFO] [stderr] | ^^^^^^^^^^^^^^^^ help: replace it with: `desired` [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/main.rs:137:5 [INFO] [stderr] | [INFO] [stderr] 137 | error_precision: error_precision, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `error_precision` [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/main.rs:138:5 [INFO] [stderr] | [INFO] [stderr] 138 | threshold: threshold, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `threshold` [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/main.rs:139:5 [INFO] [stderr] | [INFO] [stderr] 139 | activation_function: activation_function [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `activation_function` [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: using `println!("")` [INFO] [stderr] --> src/main.rs:176:5 [INFO] [stderr] | [INFO] [stderr] 176 | println!(""); [INFO] [stderr] | ^^^^^^^^^^^^ help: replace it with: `println!()` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::println_empty_string)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stderr] [INFO] [stderr] warning: using `println!("")` [INFO] [stderr] --> src/main.rs:181:2 [INFO] [stderr] | [INFO] [stderr] 181 | println!(""); [INFO] [stderr] | ^^^^^^^^^^^^ help: replace it with: `println!()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/main.rs:129:3 [INFO] [stderr] | [INFO] [stderr] 129 | bias: bias, /* Set bias value */ [INFO] [stderr] | ^^^^^^^^^^ help: replace it with: `bias` [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:130:3 [INFO] [stderr] | [INFO] [stderr] 130 | learning_coeff: learning_coeff, /* Set the learning coefficient */ [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `learning_coeff` [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/main.rs:136:5 [INFO] [stderr] | [INFO] [stderr] 136 | desired: desired, [INFO] [stderr] | ^^^^^^^^^^^^^^^^ help: replace it with: `desired` [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/main.rs:137:5 [INFO] [stderr] | [INFO] [stderr] 137 | error_precision: error_precision, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `error_precision` [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/main.rs:138:5 [INFO] [stderr] | [INFO] [stderr] 138 | threshold: threshold, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `threshold` [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/main.rs:139:5 [INFO] [stderr] | [INFO] [stderr] 139 | activation_function: activation_function [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `activation_function` [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: using `println!("")` [INFO] [stderr] --> src/main.rs:176:5 [INFO] [stderr] | [INFO] [stderr] 176 | println!(""); [INFO] [stderr] | ^^^^^^^^^^^^ help: replace it with: `println!()` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::println_empty_string)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stderr] [INFO] [stderr] warning: using `println!("")` [INFO] [stderr] --> src/main.rs:181:2 [INFO] [stderr] | [INFO] [stderr] 181 | println!(""); [INFO] [stderr] | ^^^^^^^^^^^^ help: replace it with: `println!()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stderr] [INFO] [stderr] warning: this if-then-else expression returns a bool literal [INFO] [stderr] --> src/main.rs:95:3 [INFO] [stderr] | [INFO] [stderr] 95 | if neuron.synapse.error <= neuron.synapse.error_precision.abs() && [INFO] [stderr] | _________^ [INFO] [stderr] 96 | | neuron.synapse.error >= -neuron.synapse.error_precision.abs() [INFO] [stderr] 97 | | { true } [INFO] [stderr] 98 | | else [INFO] [stderr] 99 | | { false }; [INFO] [stderr] | |_____________________^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::needless_bool)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool [INFO] [stderr] help: you can reduce it to [INFO] [stderr] | [INFO] [stderr] 95 | neuron.synapse.error <= neuron.synapse.error_precision.abs() && [INFO] [stderr] 96 | neuron.synapse.error >= -neuron.synapse.error_precision.abs(); [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: writing `&Vec<_>` instead of `&[_]` involves one more reference and cannot be used with non-Vec-based slices. [INFO] [stderr] --> src/main.rs:185:53 [INFO] [stderr] | [INFO] [stderr] 185 | fn update_neuron_data(neuron: &mut Neuron, dataset: &Vec, desired: f64) { [INFO] [stderr] | ^^^^^^^^^ help: change this to: `&[f64]` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::ptr_arg)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stderr] [INFO] [stderr] warning: the loop variable `i` is used to index `dataset` [INFO] [stderr] --> src/main.rs:186:11 [INFO] [stderr] | [INFO] [stderr] 186 | for i in 0..neuron.inputs.len() { [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] 186 | for (i, ) in dataset.iter().enumerate().take(neuron.inputs.len()) { [INFO] [stderr] | ^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: the loop variable `j` is only used to index `dataset`. [INFO] [stderr] --> src/main.rs:229:13 [INFO] [stderr] | [INFO] [stderr] 229 | for j in 0..dataset.len() { [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] 229 | for in &dataset { [INFO] [stderr] | ^^^^^^ ^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: this if-then-else expression returns a bool literal [INFO] [stderr] --> src/main.rs:95:3 [INFO] [stderr] | [INFO] [stderr] 95 | if neuron.synapse.error <= neuron.synapse.error_precision.abs() && [INFO] [stderr] | _________^ [INFO] [stderr] 96 | | neuron.synapse.error >= -neuron.synapse.error_precision.abs() [INFO] [stderr] 97 | | { true } [INFO] [stderr] 98 | | else [INFO] [stderr] 99 | | { false }; [INFO] [stderr] | |_____________________^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::needless_bool)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool [INFO] [stderr] help: you can reduce it to [INFO] [stderr] | [INFO] [stderr] 95 | neuron.synapse.error <= neuron.synapse.error_precision.abs() && [INFO] [stderr] 96 | neuron.synapse.error >= -neuron.synapse.error_precision.abs(); [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: writing `&Vec<_>` instead of `&[_]` involves one more reference and cannot be used with non-Vec-based slices. [INFO] [stderr] --> src/main.rs:185:53 [INFO] [stderr] | [INFO] [stderr] 185 | fn update_neuron_data(neuron: &mut Neuron, dataset: &Vec, desired: f64) { [INFO] [stderr] | ^^^^^^^^^ help: change this to: `&[f64]` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::ptr_arg)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stderr] [INFO] [stderr] warning: the loop variable `i` is used to index `dataset` [INFO] [stderr] --> src/main.rs:186:11 [INFO] [stderr] | [INFO] [stderr] 186 | for i in 0..neuron.inputs.len() { [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] 186 | for (i, ) in dataset.iter().enumerate().take(neuron.inputs.len()) { [INFO] [stderr] | ^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: the loop variable `j` is only used to index `dataset`. [INFO] [stderr] --> src/main.rs:229:13 [INFO] [stderr] | [INFO] [stderr] 229 | for j in 0..dataset.len() { [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] 229 | for in &dataset { [INFO] [stderr] | ^^^^^^ ^^^^^^^^ [INFO] [stderr] [INFO] [stderr] Finished dev [unoptimized + debuginfo] target(s) in 0.48s [INFO] running `"docker" "inspect" "ec28af95866847e309da0ba4bb548fa90517779ab472b5a2a428c173fa64e08e"` [INFO] running `"docker" "rm" "-f" "ec28af95866847e309da0ba4bb548fa90517779ab472b5a2a428c173fa64e08e"` [INFO] [stdout] ec28af95866847e309da0ba4bb548fa90517779ab472b5a2a428c173fa64e08e