[INFO] updating cached repository alamminsalo/fft [INFO] running `"git" "fetch" "--all"` [INFO] [stdout] Fetching origin [INFO] [stderr] From git://github.com/alamminsalo/fft [INFO] [stderr] * branch HEAD -> FETCH_HEAD [INFO] running `"git" "clone" "work/cache/sources/gh/alamminsalo/fft" "work/ex/clippy-test-run/sources/stable/gh/alamminsalo/fft"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable/gh/alamminsalo/fft'... [INFO] [stderr] done. [INFO] running `"git" "clone" "work/cache/sources/gh/alamminsalo/fft" "work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/alamminsalo/fft"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/alamminsalo/fft'... [INFO] [stderr] done. [INFO] running `"git" "rev-parse" "HEAD"` [INFO] [stdout] b368044f0643f7b733f93e7f795f1be786b48b8f [INFO] sha for GitHub repo alamminsalo/fft: b368044f0643f7b733f93e7f795f1be786b48b8f [INFO] validating manifest of alamminsalo/fft 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 alamminsalo/fft 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 alamminsalo/fft [INFO] finished frobbing alamminsalo/fft [INFO] frobbed toml for alamminsalo/fft written to work/ex/clippy-test-run/sources/stable/gh/alamminsalo/fft/Cargo.toml [INFO] started frobbing alamminsalo/fft [INFO] finished frobbing alamminsalo/fft [INFO] frobbed toml for alamminsalo/fft written to work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/alamminsalo/fft/Cargo.toml [INFO] crate alamminsalo/fft 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 alamminsalo/fft against stable for clippy-test-run [INFO] running `"docker" "create" "-v" "/mnt/big/crater/work/local/target-dirs/clippy-test-run/worker-3/stable:/opt/crater/target:rw,Z" "-v" "/mnt/big/crater/work/ex/clippy-test-run/sources/stable/gh/alamminsalo/fft:/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] c36790e5b323dab5d1bd9a8c5b684c54ed9406e831aa35165a1e0f69957b11fc [INFO] running `"docker" "start" "-a" "c36790e5b323dab5d1bd9a8c5b684c54ed9406e831aa35165a1e0f69957b11fc"` [INFO] [stderr] Checking argparse v0.2.2 [INFO] [stderr] Checking termion v1.5.1 [INFO] [stderr] Checking plotlib v0.3.0 [INFO] [stderr] Checking num-complex v0.2.1 [INFO] [stderr] Checking tui v0.2.3 [INFO] [stderr] Checking fft v0.1.0 (/opt/crater/workdir) [INFO] [stderr] warning: 5th binding whose name is just one char [INFO] [stderr] --> src/util.rs:24:13 [INFO] [stderr] | [INFO] [stderr] 24 | let i = (fc * t0 + rad).sin() * a; [INFO] [stderr] | ^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::many_single_char_names)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#many_single_char_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/util.rs:29:13 [INFO] [stderr] | [INFO] [stderr] 29 | Sample{ data: data, rate: sr } [INFO] [stderr] | ^^^^^^^^^^ help: replace it with: `data` [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: 5th binding whose name is just one char [INFO] [stderr] --> src/util.rs:24:13 [INFO] [stderr] | [INFO] [stderr] 24 | let i = (fc * t0 + rad).sin() * a; [INFO] [stderr] | ^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::many_single_char_names)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#many_single_char_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/util.rs:29:13 [INFO] [stderr] | [INFO] [stderr] 29 | Sample{ data: data, rate: sr } [INFO] [stderr] | ^^^^^^^^^^ help: replace it with: `data` [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/util.rs:89:37 [INFO] [stderr] | [INFO] [stderr] 89 | .filter(|&p|{ p.0 > p_max * 0.3333333 }) [INFO] [stderr] | ^^^^^^^^^ help: consider: `0.333_333_3` [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/util.rs:89:37 [INFO] [stderr] | [INFO] [stderr] 89 | .filter(|&p|{ p.0 > p_max * 0.3333333 }) [INFO] [stderr] | ^^^^^^^^^ help: consider: `0.333_333_3` [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: this .into_iter() call is equivalent to .iter() and will not move the slice [INFO] [stderr] --> src/util.rs:36:27 [INFO] [stderr] | [INFO] [stderr] 36 | data: frequencies.into_iter() [INFO] [stderr] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::into_iter_on_ref)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stderr] [INFO] [stderr] warning: length comparison to zero [INFO] [stderr] --> src/util.rs:39:16 [INFO] [stderr] | [INFO] [stderr] 39 | if acc.len() > 0 { [INFO] [stderr] | ^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `!acc.is_empty()` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::len_zero)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stderr] [INFO] [stderr] warning: `if _ { .. } else { .. }` is an expression [INFO] [stderr] --> src/util.rs:62:9 [INFO] [stderr] | [INFO] [stderr] 62 | / let mut phase = 0.0; [INFO] [stderr] 63 | | if components.len() > 1 { [INFO] [stderr] 64 | | phase = components[1].parse::().expect("failed to parse phase"); [INFO] [stderr] 65 | | } [INFO] [stderr] | |_________^ help: it is more idiomatic to write: `let phase = if components.len() > 1 { components[1].parse::().expect("failed to parse phase") } else { 0.0 };` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::useless_let_if_seq)] on by default [INFO] [stderr] = note: you might not need `mut` at all [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_let_if_seq [INFO] [stderr] [INFO] [stderr] error: strict comparison of f32 or f64 [INFO] [stderr] --> src/util.rs:77:41 [INFO] [stderr] | [INFO] [stderr] 77 | while phasors.len() > p1 && phasors[p1].complex.to_polar().0 == p0_amp { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider comparing them within some error: `(phasors[p1].complex.to_polar().0 - p0_amp).abs() < error` [INFO] [stderr] | [INFO] [stderr] = note: #[deny(clippy::float_cmp)] on by default [INFO] [stderr] note: std::f32::EPSILON and std::f64::EPSILON are available. [INFO] [stderr] --> src/util.rs:77:41 [INFO] [stderr] | [INFO] [stderr] 77 | while phasors.len() > p1 && phasors[p1].complex.to_polar().0 == p0_amp { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#float_cmp [INFO] [stderr] [INFO] [stderr] warning: casting f32 to f64 may become silently lossy if types change [INFO] [stderr] --> src/lib.rs:42:33 [INFO] [stderr] | [INFO] [stderr] 42 | (i as f64 * dt, a as f64) [INFO] [stderr] | ^^^^^^^^ help: try: `f64::from(a)` [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] error: aborting due to previous error [INFO] [stderr] [INFO] [stderr] error: Could not compile `fft`. [INFO] [stderr] warning: build failed, waiting for other jobs to finish... [INFO] [stderr] error[E0308]: mismatched types [INFO] [stderr] --> src/lib.rs:158:35 [INFO] [stderr] | [INFO] [stderr] 158 | let circle = graph_circle(&sine, 5.0); [INFO] [stderr] | ^^^^^ expected slice, found struct `Sample` [INFO] [stderr] | [INFO] [stderr] = note: expected type `&[(f32, f32)]` [INFO] [stderr] found type `&Sample` [INFO] [stderr] [INFO] [stderr] error[E0308]: mismatched types [INFO] [stderr] --> src/lib.rs:167:35 [INFO] [stderr] | [INFO] [stderr] 167 | let circle = graph_circle(&sine, 5.0); [INFO] [stderr] | ^^^^^ expected slice, found struct `Sample` [INFO] [stderr] | [INFO] [stderr] = note: expected type `&[(f32, f32)]` [INFO] [stderr] found type `&Sample` [INFO] [stderr] [INFO] [stderr] error[E0308]: mismatched types [INFO] [stderr] --> src/lib.rs:171:35 [INFO] [stderr] | [INFO] [stderr] 171 | let circle = graph_circle(&sine, 10.0); [INFO] [stderr] | ^^^^^ expected slice, found struct `Sample` [INFO] [stderr] | [INFO] [stderr] = note: expected type `&[(f32, f32)]` [INFO] [stderr] found type `&Sample` [INFO] [stderr] [INFO] [stderr] error[E0308]: mismatched types [INFO] [stderr] --> src/lib.rs:180:35 [INFO] [stderr] | [INFO] [stderr] 180 | let circle = graph_circle(&sine, 5.0); [INFO] [stderr] | ^^^^^ expected slice, found struct `Sample` [INFO] [stderr] | [INFO] [stderr] = note: expected type `&[(f32, f32)]` [INFO] [stderr] found type `&Sample` [INFO] [stderr] [INFO] [stderr] error[E0308]: mismatched types [INFO] [stderr] --> src/lib.rs:191:35 [INFO] [stderr] | [INFO] [stderr] 191 | let circle = graph_circle(&sine, 5.0); [INFO] [stderr] | ^^^^^ expected slice, found struct `Sample` [INFO] [stderr] | [INFO] [stderr] = note: expected type `&[(f32, f32)]` [INFO] [stderr] found type `&Sample` [INFO] [stderr] [INFO] [stderr] error[E0308]: mismatched types [INFO] [stderr] --> src/lib.rs:197:35 [INFO] [stderr] | [INFO] [stderr] 197 | let circle = graph_circle(&sine, 60.0); [INFO] [stderr] | ^^^^^ expected slice, found struct `Sample` [INFO] [stderr] | [INFO] [stderr] = note: expected type `&[(f32, f32)]` [INFO] [stderr] found type `&Sample` [INFO] [stderr] [INFO] [stderr] error[E0308]: mismatched types [INFO] [stderr] --> src/lib.rs:205:35 [INFO] [stderr] | [INFO] [stderr] 205 | let circle = graph_circle(&sine, 5.0); [INFO] [stderr] | ^^^^^ expected slice, found struct `Sample` [INFO] [stderr] | [INFO] [stderr] = note: expected type `&[(f32, f32)]` [INFO] [stderr] found type `&Sample` [INFO] [stderr] [INFO] [stderr] error[E0308]: mismatched types [INFO] [stderr] --> src/lib.rs:212:35 [INFO] [stderr] | [INFO] [stderr] 212 | let circle = graph_circle(&sine, 60.0); [INFO] [stderr] | ^^^^^ expected slice, found struct `Sample` [INFO] [stderr] | [INFO] [stderr] = note: expected type `&[(f32, f32)]` [INFO] [stderr] found type `&Sample` [INFO] [stderr] [INFO] [stderr] error: aborting due to 8 previous errors [INFO] [stderr] [INFO] [stderr] For more information about this error, try `rustc --explain E0308`. [INFO] [stderr] error: Could not compile `fft`. [INFO] [stderr] [INFO] [stderr] To learn more, run the command again with --verbose. [INFO] running `"docker" "inspect" "c36790e5b323dab5d1bd9a8c5b684c54ed9406e831aa35165a1e0f69957b11fc"` [INFO] running `"docker" "rm" "-f" "c36790e5b323dab5d1bd9a8c5b684c54ed9406e831aa35165a1e0f69957b11fc"` [INFO] [stdout] c36790e5b323dab5d1bd9a8c5b684c54ed9406e831aa35165a1e0f69957b11fc