[INFO] cloning repository https://github.com/chaiwatthiwapat/rust-basic [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/chaiwatthiwapat/rust-basic" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fchaiwatthiwapat%2Frust-basic", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fchaiwatthiwapat%2Frust-basic'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 3e383eec4292bbdd28d8fd9c71da8564de90622d [INFO] linting chaiwatthiwapat/rust-basic against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fchaiwatthiwapat%2Frust-basic" "/workspace/builds/worker-7-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-7-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/chaiwatthiwapat/rust-basic [INFO] finished tweaking git repo https://github.com/chaiwatthiwapat/rust-basic [INFO] tweaked toml for git repo https://github.com/chaiwatthiwapat/rust-basic written to /workspace/builds/worker-7-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/chaiwatthiwapat/rust-basic on toolchain nightly [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate git repo https://github.com/chaiwatthiwapat/rust-basic already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Updating crates.io index [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded getset v0.1.5 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 1fbbb7fd0af4651fd0efedceee6ac2cb25bc6ff88f9af8ebe66f4706f1104dcf [INFO] running `Command { std: "docker" "start" "-a" "1fbbb7fd0af4651fd0efedceee6ac2cb25bc6ff88f9af8ebe66f4706f1104dcf", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "1fbbb7fd0af4651fd0efedceee6ac2cb25bc6ff88f9af8ebe66f4706f1104dcf", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "1fbbb7fd0af4651fd0efedceee6ac2cb25bc6ff88f9af8ebe66f4706f1104dcf", kill_on_drop: false }` [INFO] [stdout] 1fbbb7fd0af4651fd0efedceee6ac2cb25bc6ff88f9af8ebe66f4706f1104dcf [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "clippy" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] bc1f7552994dd9469c003889c6bb60b4c8fd55aa17e38d3e82669e89c2baf3f4 [INFO] running `Command { std: "docker" "start" "-a" "bc1f7552994dd9469c003889c6bb60b4c8fd55aa17e38d3e82669e89c2baf3f4", kill_on_drop: false }` [INFO] [stderr] Compiling proc-macro-error-attr2 v2.0.0 [INFO] [stderr] Compiling proc-macro-error2 v2.0.1 [INFO] [stderr] Compiling getset v0.1.5 [INFO] [stderr] Checking rs v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/my_struct/car.rs:15:13 [INFO] [stdout] | [INFO] [stdout] 15 | name: name, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `name` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/my_struct/car.rs:16:13 [INFO] [stdout] | [INFO] [stdout] 16 | color: color [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `color` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/error.rs:3:8 [INFO] [stdout] | [INFO] [stdout] 3 | if !grade(100).is_err() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `grade(100).is_ok()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `!RangeInclusive::contains` implementation [INFO] [stdout] --> src/error.rs:23:8 [INFO] [stdout] | [INFO] [stdout] 23 | if score < 0 || score > 100 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `!(0..=100).contains(&score)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] = note: `#[warn(clippy::manual_range_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/main.rs:21:5 [INFO] [stdout] | [INFO] [stdout] 21 | let x: i8; [INFO] [stdout] | ^^^^^^^^^^ created here [INFO] [stdout] 22 | x = 10; [INFO] [stdout] | ^^^^^^ initialised here [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] = note: `#[warn(clippy::needless_late_init)]` on by default [INFO] [stdout] help: move the declaration `x` here [INFO] [stdout] | [INFO] [stdout] 21 ~ [INFO] [stdout] 22 ~ let x: i8 = 10; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/main.rs:41:5 [INFO] [stdout] | [INFO] [stdout] 41 | let x: [i32; 5]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ created here [INFO] [stdout] 42 | x = [1, 2, 3, 4, 5]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ initialised here [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] help: move the declaration `x` here [INFO] [stdout] | [INFO] [stdout] 41 ~ [INFO] [stdout] 42 ~ let x: [i32; 5] = [1, 2, 3, 4, 5]; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/main.rs:52:5 [INFO] [stdout] | [INFO] [stdout] 51 | let result = y + x; [INFO] [stdout] | ------------------- unnecessary `let` binding [INFO] [stdout] 52 | result [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 51 ~ [INFO] [stdout] 52 ~ y + x [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/main.rs:56:5 [INFO] [stdout] | [INFO] [stdout] 56 | let grd; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] help: move the declaration `grd` here and remove the assignments from the branches [INFO] [stdout] | [INFO] [stdout] 56 ~ [INFO] [stdout] 57 | [INFO] [stdout] 58 ~ let grd = if scr >= 80 { [INFO] [stdout] 59 ~ "A" [INFO] [stdout] 60 | } [INFO] [stdout] 61 | else { [INFO] [stdout] 62 ~ "F" [INFO] [stdout] 63 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> src/main.rs:109:5 [INFO] [stdout] | [INFO] [stdout] 109 | / let mut x: Vec = Vec::new(); [INFO] [stdout] 110 | | x.push(10); [INFO] [stdout] 111 | | x.push(20); [INFO] [stdout] 112 | | x.push(30); [INFO] [stdout] | |_______________^ help: consider using the `vec![]` macro: `let x: Vec = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] = note: `#[warn(clippy::vec_init_then_push)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `!RangeInclusive::contains` implementation [INFO] [stdout] --> src/main.rs:163:8 [INFO] [stdout] | [INFO] [stdout] 163 | if score < 0 || score > 100 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `!(0..=100).contains(&score)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `!RangeInclusive::contains` implementation [INFO] [stdout] --> src/main.rs:174:8 [INFO] [stdout] | [INFO] [stdout] 174 | if score < 0 || score > 100 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `!(0..=100).contains(&score)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `!RangeInclusive::contains` implementation [INFO] [stdout] --> src/main.rs:182:8 [INFO] [stdout] | [INFO] [stdout] 182 | if score < 0 || score > 100 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `!(0..=100).contains(&score)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/my_struct/car.rs:15:13 [INFO] [stdout] | [INFO] [stdout] 15 | name: name, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `name` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/my_struct/car.rs:16:13 [INFO] [stdout] | [INFO] [stdout] 16 | color: color [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `color` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/error.rs:3:8 [INFO] [stdout] | [INFO] [stdout] 3 | if !grade(100).is_err() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `grade(100).is_ok()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `!RangeInclusive::contains` implementation [INFO] [stdout] --> src/error.rs:23:8 [INFO] [stdout] | [INFO] [stdout] 23 | if score < 0 || score > 100 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `!(0..=100).contains(&score)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] = note: `#[warn(clippy::manual_range_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/main.rs:21:5 [INFO] [stdout] | [INFO] [stdout] 21 | let x: i8; [INFO] [stdout] | ^^^^^^^^^^ created here [INFO] [stdout] 22 | x = 10; [INFO] [stdout] | ^^^^^^ initialised here [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] = note: `#[warn(clippy::needless_late_init)]` on by default [INFO] [stdout] help: move the declaration `x` here [INFO] [stdout] | [INFO] [stdout] 21 ~ [INFO] [stdout] 22 ~ let x: i8 = 10; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/main.rs:41:5 [INFO] [stdout] | [INFO] [stdout] 41 | let x: [i32; 5]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ created here [INFO] [stdout] 42 | x = [1, 2, 3, 4, 5]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ initialised here [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] help: move the declaration `x` here [INFO] [stdout] | [INFO] [stdout] 41 ~ [INFO] [stdout] 42 ~ let x: [i32; 5] = [1, 2, 3, 4, 5]; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/main.rs:52:5 [INFO] [stdout] | [INFO] [stdout] 51 | let result = y + x; [INFO] [stdout] | ------------------- unnecessary `let` binding [INFO] [stdout] 52 | result [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 51 ~ [INFO] [stdout] 52 ~ y + x [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/main.rs:56:5 [INFO] [stdout] | [INFO] [stdout] 56 | let grd; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] help: move the declaration `grd` here and remove the assignments from the branches [INFO] [stdout] | [INFO] [stdout] 56 ~ [INFO] [stdout] 57 | [INFO] [stdout] 58 ~ let grd = if scr >= 80 { [INFO] [stdout] 59 ~ "A" [INFO] [stdout] 60 | } [INFO] [stdout] 61 | else { [INFO] [stdout] 62 ~ "F" [INFO] [stdout] 63 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> src/main.rs:109:5 [INFO] [stdout] | [INFO] [stdout] 109 | / let mut x: Vec = Vec::new(); [INFO] [stdout] 110 | | x.push(10); [INFO] [stdout] 111 | | x.push(20); [INFO] [stdout] 112 | | x.push(30); [INFO] [stdout] | |_______________^ help: consider using the `vec![]` macro: `let x: Vec = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] = note: `#[warn(clippy::vec_init_then_push)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `!RangeInclusive::contains` implementation [INFO] [stdout] --> src/main.rs:163:8 [INFO] [stdout] | [INFO] [stdout] 163 | if score < 0 || score > 100 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `!(0..=100).contains(&score)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `!RangeInclusive::contains` implementation [INFO] [stdout] --> src/main.rs:174:8 [INFO] [stdout] | [INFO] [stdout] 174 | if score < 0 || score > 100 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `!(0..=100).contains(&score)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `!RangeInclusive::contains` implementation [INFO] [stdout] --> src/main.rs:182:8 [INFO] [stdout] | [INFO] [stdout] 182 | if score < 0 || score > 100 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `!(0..=100).contains(&score)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 1.73s [INFO] running `Command { std: "docker" "inspect" "bc1f7552994dd9469c003889c6bb60b4c8fd55aa17e38d3e82669e89c2baf3f4", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "bc1f7552994dd9469c003889c6bb60b4c8fd55aa17e38d3e82669e89c2baf3f4", kill_on_drop: false }` [INFO] [stdout] bc1f7552994dd9469c003889c6bb60b4c8fd55aa17e38d3e82669e89c2baf3f4