[INFO] cloning repository https://github.com/Callum-Irving/brainf-ck-interpreter [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/Callum-Irving/brainf-ck-interpreter" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FCallum-Irving%2Fbrainf-ck-interpreter", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FCallum-Irving%2Fbrainf-ck-interpreter'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 09fe11c7f6aaf7b8bf6aa5957d45d603c3360f81 [INFO] linting Callum-Irving/brainf-ck-interpreter against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FCallum-Irving%2Fbrainf-ck-interpreter" "/workspace/builds/worker-4-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-4-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/Callum-Irving/brainf-ck-interpreter [INFO] finished tweaking git repo https://github.com/Callum-Irving/brainf-ck-interpreter [INFO] tweaked toml for git repo https://github.com/Callum-Irving/brainf-ck-interpreter written to /workspace/builds/worker-4-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/Callum-Irving/brainf-ck-interpreter 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/Callum-Irving/brainf-ck-interpreter 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 numtoa v0.1.0 [INFO] [stderr] Downloaded redox_termios v0.1.2 [INFO] [stderr] Downloaded termion v1.5.6 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-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] e781f51941644163e180dffc5cb1c15179c99c03082eadc5c9e192f438772d27 [INFO] running `Command { std: "docker" "start" "-a" "e781f51941644163e180dffc5cb1c15179c99c03082eadc5c9e192f438772d27", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "e781f51941644163e180dffc5cb1c15179c99c03082eadc5c9e192f438772d27", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "e781f51941644163e180dffc5cb1c15179c99c03082eadc5c9e192f438772d27", kill_on_drop: false }` [INFO] [stdout] e781f51941644163e180dffc5cb1c15179c99c03082eadc5c9e192f438772d27 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-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] 653d5bf6801ccb68b7621062853d5978f68ac87097599202830b4ea84b081668 [INFO] running `Command { std: "docker" "start" "-a" "653d5bf6801ccb68b7621062853d5978f68ac87097599202830b4ea84b081668", kill_on_drop: false }` [INFO] [stderr] Compiling libc v0.2.112 [INFO] [stderr] Checking numtoa v0.1.0 [INFO] [stderr] Checking termion v1.5.6 [INFO] [stderr] Checking bf-interpreter v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/main.rs:13:14 [INFO] [stdout] | [INFO] [stdout] 13 | program: &Vec, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 13 - program: &Vec, [INFO] [stdout] 13 + program: &[u8], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/main.rs:45:20 [INFO] [stdout] | [INFO] [stdout] 45 | if !byte.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try: `byte.is_some()` [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: called `unwrap` on `byte` after checking its variant with `is_none` [INFO] [stdout] --> src/main.rs:46:38 [INFO] [stdout] | [INFO] [stdout] 45 | if !byte.is_none() { [INFO] [stdout] | -------------- the check is happening here [INFO] [stdout] 46 | data[data_ptr] = byte.unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/main.rs:50:17 [INFO] [stdout] | [INFO] [stdout] 50 | / if data[data_ptr] == 0 { [INFO] [stdout] 51 | | get_corresponding(&program, &mut instruction_ptr, 1, '[', ']'); [INFO] [stdout] 52 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 49 ~ '[' [INFO] [stdout] 50 ~ if data[data_ptr] == 0 => { [INFO] [stdout] 51 | get_corresponding(&program, &mut instruction_ptr, 1, '[', ']'); [INFO] [stdout] 52 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/main.rs:55:17 [INFO] [stdout] | [INFO] [stdout] 55 | / if data[data_ptr] != 0 { [INFO] [stdout] 56 | | get_corresponding(&program, &mut instruction_ptr, -1, ']', '['); [INFO] [stdout] 57 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 54 ~ ']' [INFO] [stdout] 55 ~ if data[data_ptr] != 0 => { [INFO] [stdout] 56 | get_corresponding(&program, &mut instruction_ptr, -1, ']', '['); [INFO] [stdout] 57 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling .bytes() is very inefficient when data is not in memory [INFO] [stdout] --> src/main.rs:44:28 [INFO] [stdout] | [INFO] [stdout] 44 | let byte = stdin().bytes().next().and_then(|r| r.ok()); [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider using `BufReader` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unbuffered_bytes [INFO] [stdout] = note: `#[warn(clippy::unbuffered_bytes)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/main.rs:117:17 [INFO] [stdout] | [INFO] [stdout] 117 | / if data[data_ptr] == 0 { [INFO] [stdout] 118 | | get_corresponding(&program, &mut instruction_ptr, 1, '[', ']'); [INFO] [stdout] 119 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 116 ~ '[' [INFO] [stdout] 117 ~ if data[data_ptr] == 0 => { [INFO] [stdout] 118 | get_corresponding(&program, &mut instruction_ptr, 1, '[', ']'); [INFO] [stdout] 119 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/main.rs:122:17 [INFO] [stdout] | [INFO] [stdout] 122 | / if data[data_ptr] != 0 { [INFO] [stdout] 123 | | get_corresponding(&program, &mut instruction_ptr, -1, ']', '['); [INFO] [stdout] 124 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 121 ~ ']' [INFO] [stdout] 122 ~ if data[data_ptr] != 0 => { [INFO] [stdout] 123 | get_corresponding(&program, &mut instruction_ptr, -1, ']', '['); [INFO] [stdout] 124 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should use the `starts_with` method [INFO] [stdout] --> src/main.rs:161:20 [INFO] [stdout] | [INFO] [stdout] 161 | if arg.chars().next() == Some('-') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `arg.starts_with('-')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#chars_next_cmp [INFO] [stdout] = note: `#[warn(clippy::chars_next_cmp)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/main.rs:166:20 [INFO] [stdout] | [INFO] [stdout] 166 | if filename == "" { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `filename.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] = note: `#[warn(clippy::comparison_to_empty)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/main.rs:177:8 [INFO] [stdout] | [INFO] [stdout] 177 | if filename == "" { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `filename.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/main.rs:13:14 [INFO] [stdout] | [INFO] [stdout] 13 | program: &Vec, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 13 - program: &Vec, [INFO] [stdout] 13 + program: &[u8], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/main.rs:45:20 [INFO] [stdout] | [INFO] [stdout] 45 | if !byte.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try: `byte.is_some()` [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: called `unwrap` on `byte` after checking its variant with `is_none` [INFO] [stdout] --> src/main.rs:46:38 [INFO] [stdout] | [INFO] [stdout] 45 | if !byte.is_none() { [INFO] [stdout] | -------------- the check is happening here [INFO] [stdout] 46 | data[data_ptr] = byte.unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/main.rs:50:17 [INFO] [stdout] | [INFO] [stdout] 50 | / if data[data_ptr] == 0 { [INFO] [stdout] 51 | | get_corresponding(&program, &mut instruction_ptr, 1, '[', ']'); [INFO] [stdout] 52 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 49 ~ '[' [INFO] [stdout] 50 ~ if data[data_ptr] == 0 => { [INFO] [stdout] 51 | get_corresponding(&program, &mut instruction_ptr, 1, '[', ']'); [INFO] [stdout] 52 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/main.rs:55:17 [INFO] [stdout] | [INFO] [stdout] 55 | / if data[data_ptr] != 0 { [INFO] [stdout] 56 | | get_corresponding(&program, &mut instruction_ptr, -1, ']', '['); [INFO] [stdout] 57 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 54 ~ ']' [INFO] [stdout] 55 ~ if data[data_ptr] != 0 => { [INFO] [stdout] 56 | get_corresponding(&program, &mut instruction_ptr, -1, ']', '['); [INFO] [stdout] 57 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling .bytes() is very inefficient when data is not in memory [INFO] [stdout] --> src/main.rs:44:28 [INFO] [stdout] | [INFO] [stdout] 44 | let byte = stdin().bytes().next().and_then(|r| r.ok()); [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider using `BufReader` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unbuffered_bytes [INFO] [stdout] = note: `#[warn(clippy::unbuffered_bytes)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/main.rs:117:17 [INFO] [stdout] | [INFO] [stdout] 117 | / if data[data_ptr] == 0 { [INFO] [stdout] 118 | | get_corresponding(&program, &mut instruction_ptr, 1, '[', ']'); [INFO] [stdout] 119 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 116 ~ '[' [INFO] [stdout] 117 ~ if data[data_ptr] == 0 => { [INFO] [stdout] 118 | get_corresponding(&program, &mut instruction_ptr, 1, '[', ']'); [INFO] [stdout] 119 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/main.rs:122:17 [INFO] [stdout] | [INFO] [stdout] 122 | / if data[data_ptr] != 0 { [INFO] [stdout] 123 | | get_corresponding(&program, &mut instruction_ptr, -1, ']', '['); [INFO] [stdout] 124 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 121 ~ ']' [INFO] [stdout] 122 ~ if data[data_ptr] != 0 => { [INFO] [stdout] 123 | get_corresponding(&program, &mut instruction_ptr, -1, ']', '['); [INFO] [stdout] 124 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should use the `starts_with` method [INFO] [stdout] --> src/main.rs:161:20 [INFO] [stdout] | [INFO] [stdout] 161 | if arg.chars().next() == Some('-') { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `arg.starts_with('-')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#chars_next_cmp [INFO] [stdout] = note: `#[warn(clippy::chars_next_cmp)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/main.rs:166:20 [INFO] [stdout] | [INFO] [stdout] 166 | if filename == "" { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `filename.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] = note: `#[warn(clippy::comparison_to_empty)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: comparison to empty slice [INFO] [stdout] --> src/main.rs:177:8 [INFO] [stdout] | [INFO] [stdout] 177 | if filename == "" { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `filename.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_to_empty [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 1.72s [INFO] running `Command { std: "docker" "inspect" "653d5bf6801ccb68b7621062853d5978f68ac87097599202830b4ea84b081668", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "653d5bf6801ccb68b7621062853d5978f68ac87097599202830b4ea84b081668", kill_on_drop: false }` [INFO] [stdout] 653d5bf6801ccb68b7621062853d5978f68ac87097599202830b4ea84b081668