[INFO] updating cached repository SimSmith/PSO-rust [INFO] running `"git" "fetch" "--all"` [INFO] [stdout] Fetching origin [INFO] [stderr] From git://github.com/SimSmith/PSO-rust [INFO] [stderr] * branch HEAD -> FETCH_HEAD [INFO] running `"git" "clone" "work/cache/sources/gh/SimSmith/PSO-rust" "work/ex/clippy-test-run/sources/stable/gh/SimSmith/PSO-rust"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable/gh/SimSmith/PSO-rust'... [INFO] [stderr] done. [INFO] running `"git" "clone" "work/cache/sources/gh/SimSmith/PSO-rust" "work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/SimSmith/PSO-rust"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/SimSmith/PSO-rust'... [INFO] [stderr] done. [INFO] running `"git" "rev-parse" "HEAD"` [INFO] [stdout] 424f004bd5dc9c080f05935888dba73da5554b0f [INFO] sha for GitHub repo SimSmith/PSO-rust: 424f004bd5dc9c080f05935888dba73da5554b0f [INFO] validating manifest of SimSmith/PSO-rust 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 SimSmith/PSO-rust 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 SimSmith/PSO-rust [INFO] finished frobbing SimSmith/PSO-rust [INFO] frobbed toml for SimSmith/PSO-rust written to work/ex/clippy-test-run/sources/stable/gh/SimSmith/PSO-rust/Cargo.toml [INFO] started frobbing SimSmith/PSO-rust [INFO] finished frobbing SimSmith/PSO-rust [INFO] frobbed toml for SimSmith/PSO-rust written to work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/SimSmith/PSO-rust/Cargo.toml [INFO] crate SimSmith/PSO-rust 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 SimSmith/PSO-rust 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/gh/SimSmith/PSO-rust:/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] 2d938e81c717dcb49144982ee750b3931b4104f4cbf93c98cfa1f77e38bb0cb5 [INFO] running `"docker" "start" "-a" "2d938e81c717dcb49144982ee750b3931b4104f4cbf93c98cfa1f77e38bb0cb5"` [INFO] [stderr] Checking pso v0.1.0 (/opt/crater/workdir) [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:108:22 [INFO] [stderr] | [INFO] [stderr] 108 | f_particles: &Vec, [INFO] [stderr] | ^^^^^^^^^ help: change this to: `&[f32]` [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: writing `&Vec<_>` instead of `&[_]` involves one more reference and cannot be used with non-Vec-based slices. [INFO] [stderr] --> src/main.rs:109:27 [INFO] [stderr] | [INFO] [stderr] 109 | f_best_particles: &Vec, [INFO] [stderr] | ^^^^^^^^^ help: change this to: `&[f32]` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stderr] [INFO] [stderr] warning: this function has too many arguments (9/7) [INFO] [stderr] --> src/main.rs:130:1 [INFO] [stderr] | [INFO] [stderr] 130 | / fn update_position_and_velocity( [INFO] [stderr] 131 | | particles: &mut Particles, [INFO] [stderr] 132 | | swarm_best_position: &Vector, [INFO] [stderr] 133 | | t_delta: f32, [INFO] [stderr] ... | [INFO] [stderr] 164 | | if return_w < w_lower_bound {w_lower_bound} else {return_w} [INFO] [stderr] 165 | | } [INFO] [stderr] | |_^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::too_many_arguments)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stderr] [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/main.rs:132:26 [INFO] [stderr] | [INFO] [stderr] 132 | swarm_best_position: &Vector, [INFO] [stderr] | ^^^^^^^ help: consider passing by value instead: `Vector` [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: the loop variable `i` is only used to index `particles`. [INFO] [stderr] --> src/main.rs:143:14 [INFO] [stderr] | [INFO] [stderr] 143 | for i in 0..particles.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] 143 | for in &mut particles{ [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:108:22 [INFO] [stderr] | [INFO] [stderr] 108 | f_particles: &Vec, [INFO] [stderr] | ^^^^^^^^^ help: change this to: `&[f32]` [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: writing `&Vec<_>` instead of `&[_]` involves one more reference and cannot be used with non-Vec-based slices. [INFO] [stderr] --> src/main.rs:109:27 [INFO] [stderr] | [INFO] [stderr] 109 | f_best_particles: &Vec, [INFO] [stderr] | ^^^^^^^^^ help: change this to: `&[f32]` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stderr] [INFO] [stderr] warning: this function has too many arguments (9/7) [INFO] [stderr] --> src/main.rs:130:1 [INFO] [stderr] | [INFO] [stderr] 130 | / fn update_position_and_velocity( [INFO] [stderr] 131 | | particles: &mut Particles, [INFO] [stderr] 132 | | swarm_best_position: &Vector, [INFO] [stderr] 133 | | t_delta: f32, [INFO] [stderr] ... | [INFO] [stderr] 164 | | if return_w < w_lower_bound {w_lower_bound} else {return_w} [INFO] [stderr] 165 | | } [INFO] [stderr] | |_^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::too_many_arguments)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stderr] [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/main.rs:132:26 [INFO] [stderr] | [INFO] [stderr] 132 | swarm_best_position: &Vector, [INFO] [stderr] | ^^^^^^^ help: consider passing by value instead: `Vector` [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: the loop variable `i` is only used to index `particles`. [INFO] [stderr] --> src/main.rs:143:14 [INFO] [stderr] | [INFO] [stderr] 143 | for i in 0..particles.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] 143 | for in &mut particles{ [INFO] [stderr] | ^^^^^^ ^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] Finished dev [unoptimized + debuginfo] target(s) in 1.13s [INFO] running `"docker" "inspect" "2d938e81c717dcb49144982ee750b3931b4104f4cbf93c98cfa1f77e38bb0cb5"` [INFO] running `"docker" "rm" "-f" "2d938e81c717dcb49144982ee750b3931b4104f4cbf93c98cfa1f77e38bb0cb5"` [INFO] [stdout] 2d938e81c717dcb49144982ee750b3931b4104f4cbf93c98cfa1f77e38bb0cb5