[INFO] updating cached repository theboginator/calculator [INFO] running `"git" "fetch" "--all"` [INFO] [stdout] Fetching origin [INFO] [stderr] From git://github.com/theboginator/calculator [INFO] [stderr] * branch HEAD -> FETCH_HEAD [INFO] running `"git" "clone" "work/cache/sources/gh/theboginator/calculator" "work/ex/clippy-test-run/sources/stable/gh/theboginator/calculator"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable/gh/theboginator/calculator'... [INFO] [stderr] done. [INFO] running `"git" "clone" "work/cache/sources/gh/theboginator/calculator" "work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/theboginator/calculator"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/theboginator/calculator'... [INFO] [stderr] done. [INFO] running `"git" "rev-parse" "HEAD"` [INFO] [stdout] 7ba39205e7d59a0d71630a41ef2a2004ea025a0e [INFO] sha for GitHub repo theboginator/calculator: 7ba39205e7d59a0d71630a41ef2a2004ea025a0e [INFO] validating manifest of theboginator/calculator 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 theboginator/calculator 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 theboginator/calculator [INFO] finished frobbing theboginator/calculator [INFO] frobbed toml for theboginator/calculator written to work/ex/clippy-test-run/sources/stable/gh/theboginator/calculator/Cargo.toml [INFO] started frobbing theboginator/calculator [INFO] finished frobbing theboginator/calculator [INFO] frobbed toml for theboginator/calculator written to work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/theboginator/calculator/Cargo.toml [INFO] crate theboginator/calculator 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 theboginator/calculator 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-0/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/theboginator/calculator:/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] 3264aa3f6de73cdf0961c857de4c8fb53a2e3a69f2a87b85f32567887ab55fc4 [INFO] running `"docker" "start" "-a" "3264aa3f6de73cdf0961c857de4c8fb53a2e3a69f2a87b85f32567887ab55fc4"` [INFO] [stderr] Checking calculator v0.1.0 (/opt/crater/workdir) [INFO] [stderr] warning: using `print!()` with a format string that ends in a single newline, consider using `println!()` instead [INFO] [stderr] --> src/main.rs:11:5 [INFO] [stderr] | [INFO] [stderr] 11 | print!("\n"); [INFO] [stderr] | ^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::print_with_newline)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_with_newline [INFO] [stderr] [INFO] [stderr] warning: using `print!()` with a format string that ends in a single newline, consider using `println!()` instead [INFO] [stderr] --> src/main.rs:75:9 [INFO] [stderr] | [INFO] [stderr] 75 | print!("{}\n", output); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_with_newline [INFO] [stderr] [INFO] [stderr] warning: using `print!()` with a format string that ends in a single newline, consider using `println!()` instead [INFO] [stderr] --> src/main.rs:11:5 [INFO] [stderr] | [INFO] [stderr] 11 | print!("\n"); [INFO] [stderr] | ^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::print_with_newline)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_with_newline [INFO] [stderr] [INFO] [stderr] warning: using `print!()` with a format string that ends in a single newline, consider using `println!()` instead [INFO] [stderr] --> src/main.rs:75:9 [INFO] [stderr] | [INFO] [stderr] 75 | print!("{}\n", output); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_with_newline [INFO] [stderr] [INFO] [stderr] warning: unneeded return statement [INFO] [stderr] --> src/main.rs:17:5 [INFO] [stderr] | [INFO] [stderr] 17 | return input; [INFO] [stderr] | ^^^^^^^^^^^^^ help: remove `return` as shown: `input` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::needless_return)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stderr] [INFO] [stderr] warning: unneeded return statement [INFO] [stderr] --> src/main.rs:49:5 [INFO] [stderr] | [INFO] [stderr] 49 | return answer; [INFO] [stderr] | ^^^^^^^^^^^^^^ help: remove `return` as shown: `answer` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stderr] [INFO] [stderr] warning: unneeded return statement [INFO] [stderr] --> src/main.rs:17:5 [INFO] [stderr] | [INFO] [stderr] 17 | return input; [INFO] [stderr] | ^^^^^^^^^^^^^ help: remove `return` as shown: `input` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::needless_return)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stderr] [INFO] [stderr] warning: unneeded return statement [INFO] [stderr] --> src/main.rs:49:5 [INFO] [stderr] | [INFO] [stderr] 49 | return answer; [INFO] [stderr] | ^^^^^^^^^^^^^^ help: remove `return` as shown: `answer` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stderr] [INFO] [stderr] warning: called `ok().expect()` on a Result value. You can call `expect` directly on the `Result` [INFO] [stderr] --> src/main.rs:12:5 [INFO] [stderr] | [INFO] [stderr] 12 | io::stdout().flush().ok().expect("Could not flush stdout"); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::ok_expect)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ok_expect [INFO] [stderr] [INFO] [stderr] warning: `if _ { .. } else { .. }` is an expression [INFO] [stderr] --> src/main.rs:22:5 [INFO] [stderr] | [INFO] [stderr] 22 | / let mut answer: f32 = 0.0; [INFO] [stderr] 23 | | if input.contains('+'){ [INFO] [stderr] 24 | | let v: Vec<&str> = input.split('+').collect(); [INFO] [stderr] 25 | | //print!("{:?}", v); [INFO] [stderr] ... | [INFO] [stderr] 29 | | [INFO] [stderr] 30 | | } [INFO] [stderr] | |_____^ help: it is more idiomatic to write: `let answer = if input.contains('+') { ..; a+b } 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: approximate value of `f{32, 64}::consts::PI` found. Consider using it directly [INFO] [stderr] --> src/main.rs:55:31 [INFO] [stderr] | [INFO] [stderr] 55 | variable_map.insert("pi", 3.14159); //make our first constant, pi [INFO] [stderr] | ^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[deny(clippy::approx_constant)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#approx_constant [INFO] [stderr] [INFO] [stderr] error: aborting due to previous error [INFO] [stderr] [INFO] [stderr] error: Could not compile `calculator`. [INFO] [stderr] warning: build failed, waiting for other jobs to finish... [INFO] [stderr] warning: called `ok().expect()` on a Result value. You can call `expect` directly on the `Result` [INFO] [stderr] --> src/main.rs:12:5 [INFO] [stderr] | [INFO] [stderr] 12 | io::stdout().flush().ok().expect("Could not flush stdout"); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::ok_expect)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ok_expect [INFO] [stderr] [INFO] [stderr] warning: `if _ { .. } else { .. }` is an expression [INFO] [stderr] --> src/main.rs:22:5 [INFO] [stderr] | [INFO] [stderr] 22 | / let mut answer: f32 = 0.0; [INFO] [stderr] 23 | | if input.contains('+'){ [INFO] [stderr] 24 | | let v: Vec<&str> = input.split('+').collect(); [INFO] [stderr] 25 | | //print!("{:?}", v); [INFO] [stderr] ... | [INFO] [stderr] 29 | | [INFO] [stderr] 30 | | } [INFO] [stderr] | |_____^ help: it is more idiomatic to write: `let answer = if input.contains('+') { ..; a+b } 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: approximate value of `f{32, 64}::consts::PI` found. Consider using it directly [INFO] [stderr] --> src/main.rs:55:31 [INFO] [stderr] | [INFO] [stderr] 55 | variable_map.insert("pi", 3.14159); //make our first constant, pi [INFO] [stderr] | ^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[deny(clippy::approx_constant)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#approx_constant [INFO] [stderr] [INFO] [stderr] error: aborting due to previous error [INFO] [stderr] [INFO] [stderr] error: Could not compile `calculator`. [INFO] [stderr] [INFO] [stderr] To learn more, run the command again with --verbose. [INFO] running `"docker" "inspect" "3264aa3f6de73cdf0961c857de4c8fb53a2e3a69f2a87b85f32567887ab55fc4"` [INFO] running `"docker" "rm" "-f" "3264aa3f6de73cdf0961c857de4c8fb53a2e3a69f2a87b85f32567887ab55fc4"` [INFO] [stdout] 3264aa3f6de73cdf0961c857de4c8fb53a2e3a69f2a87b85f32567887ab55fc4