[INFO] crate goertzel 0.2.0 is already in cache [INFO] extracting crate goertzel 0.2.0 into work/ex/clippy-test-run/sources/stable/reg/goertzel/0.2.0 [INFO] extracting crate goertzel 0.2.0 into work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/reg/goertzel/0.2.0 [INFO] validating manifest of goertzel-0.2.0 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 goertzel-0.2.0 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 goertzel-0.2.0 [INFO] finished frobbing goertzel-0.2.0 [INFO] frobbed toml for goertzel-0.2.0 written to work/ex/clippy-test-run/sources/stable/reg/goertzel/0.2.0/Cargo.toml [INFO] started frobbing goertzel-0.2.0 [INFO] finished frobbing goertzel-0.2.0 [INFO] frobbed toml for goertzel-0.2.0 written to work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/reg/goertzel/0.2.0/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 goertzel-0.2.0 against stable for clippy-test-run [INFO] running `"docker" "create" "-v" "/mnt/big/crater/work/local/target-dirs/clippy-test-run/worker-4/stable:/opt/crater/target:rw,Z" "-v" "/mnt/big/crater/work/ex/clippy-test-run/sources/stable/reg/goertzel/0.2.0:/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] b0badaa4f151d85f32ff38df924b7793799ca6d2b4272c0abfa2d14a9be5b720 [INFO] running `"docker" "start" "-a" "b0badaa4f151d85f32ff38df924b7793799ca6d2b4272c0abfa2d14a9be5b720"` [INFO] [stderr] Checking goertzel v0.2.0 (/opt/crater/workdir) [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/lib.rs:30:13 [INFO] [stderr] | [INFO] [stderr] 30 | window_size: window_size, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `window_size` [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/lib.rs:32:13 [INFO] [stderr] | [INFO] [stderr] 32 | cosine: cosine, [INFO] [stderr] | ^^^^^^^^^^^^^^ help: replace it with: `cosine` [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/lib.rs:30:13 [INFO] [stderr] | [INFO] [stderr] 30 | window_size: window_size, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `window_size` [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/lib.rs:32:13 [INFO] [stderr] | [INFO] [stderr] 32 | cosine: cosine, [INFO] [stderr] | ^^^^^^^^^^^^^^ help: replace it with: `cosine` [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: unused import: `std::f32::consts::PI` [INFO] [stderr] --> src/lib.rs:4:5 [INFO] [stderr] | [INFO] [stderr] 4 | use std::f32::consts::PI; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(unused_imports)] on by default [INFO] [stderr] [INFO] [stderr] warning: defining a method called `add` on this type; consider implementing the `std::ops::Add` trait or choosing a less ambiguous name [INFO] [stderr] --> src/lib.rs:43:5 [INFO] [stderr] | [INFO] [stderr] 43 | / pub fn add(mut self, samples: &[i16]) -> Self { [INFO] [stderr] 44 | | for &sample in samples { [INFO] [stderr] 45 | | let this = self.params.term_coefficient * self.prev - self.prevprev + (sample as f32); [INFO] [stderr] 46 | | self.prevprev = self.prev; [INFO] [stderr] ... | [INFO] [stderr] 50 | | self [INFO] [stderr] 51 | | } [INFO] [stderr] | |_____^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::should_implement_trait)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait [INFO] [stderr] [INFO] [stderr] warning: casting i16 to f32 may become silently lossy if types change [INFO] [stderr] --> src/lib.rs:45:83 [INFO] [stderr] | [INFO] [stderr] 45 | let this = self.params.term_coefficient * self.prev - self.prevprev + (sample as f32); [INFO] [stderr] | ^^^^^^^^^^^^^^^ help: try: `f32::from(sample)` [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: unnecessary parentheses around `for` head expression [INFO] [stderr] --> src/lib.rs:78:23 [INFO] [stderr] | [INFO] [stderr] 78 | for sample in (0 .. 8000) { [INFO] [stderr] | ^^^^^^^^^^^ help: remove these parentheses [INFO] [stderr] | [INFO] [stderr] = note: #[warn(unused_parens)] on by default [INFO] [stderr] [INFO] [stderr] warning: defining a method called `add` on this type; consider implementing the `std::ops::Add` trait or choosing a less ambiguous name [INFO] [stderr] --> src/lib.rs:43:5 [INFO] [stderr] | [INFO] [stderr] 43 | / pub fn add(mut self, samples: &[i16]) -> Self { [INFO] [stderr] 44 | | for &sample in samples { [INFO] [stderr] 45 | | let this = self.params.term_coefficient * self.prev - self.prevprev + (sample as f32); [INFO] [stderr] 46 | | self.prevprev = self.prev; [INFO] [stderr] ... | [INFO] [stderr] 50 | | self [INFO] [stderr] 51 | | } [INFO] [stderr] | |_____^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::should_implement_trait)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait [INFO] [stderr] [INFO] [stderr] warning: casting i16 to f32 may become silently lossy if types change [INFO] [stderr] --> src/lib.rs:45:83 [INFO] [stderr] | [INFO] [stderr] 45 | let this = self.params.term_coefficient * self.prev - self.prevprev + (sample as f32); [INFO] [stderr] | ^^^^^^^^^^^^^^^ help: try: `f32::from(sample)` [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: the loop variable `sample` is used to index `buf` [INFO] [stderr] --> src/lib.rs:78:23 [INFO] [stderr] | [INFO] [stderr] 78 | for sample in (0 .. 8000) { [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] 78 | for (sample, ) in buf.iter_mut().enumerate() { [INFO] [stderr] | ^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: casting i16 to f32 may become silently lossy if types change [INFO] [stderr] --> src/lib.rs:80:58 [INFO] [stderr] | [INFO] [stderr] 80 | buf[sample] = ((time * freq * 2. * PI).sin()*std::i16::MAX as f32) as i16; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^ help: try: `f32::from(std::i16::MAX)` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless [INFO] [stderr] [INFO] [stderr] Finished dev [unoptimized + debuginfo] target(s) in 0.87s [INFO] running `"docker" "inspect" "b0badaa4f151d85f32ff38df924b7793799ca6d2b4272c0abfa2d14a9be5b720"` [INFO] running `"docker" "rm" "-f" "b0badaa4f151d85f32ff38df924b7793799ca6d2b4272c0abfa2d14a9be5b720"` [INFO] [stdout] b0badaa4f151d85f32ff38df924b7793799ca6d2b4272c0abfa2d14a9be5b720