[INFO] fetching crate cargo-fixeq 0.5.0... [INFO] linting cargo-fixeq-0.5.0 against nightly for clippy-nonminimal_bool-denied [INFO] extracting crate cargo-fixeq 0.5.0 into /workspace/builds/worker-2-tc1/source [INFO] started tweaking crates.io crate cargo-fixeq 0.5.0 [INFO] finished tweaking crates.io crate cargo-fixeq 0.5.0 [INFO] tweaked toml for crates.io crate cargo-fixeq 0.5.0 written to /workspace/builds/worker-2-tc1/source/Cargo.toml [INFO] validating manifest of crates.io crate cargo-fixeq 0.5.0 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 crates.io crate cargo-fixeq 0.5.0 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] Downloading crates ... [INFO] [stderr] Downloaded rustix v0.38.28 [INFO] [stderr] Downloaded linux-raw-sys v0.4.12 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-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] 8cdbbd2a8ec1178b4395dc0da6d94e302c946cb26979cdd0d8f7175fc6c7f3ff [INFO] running `Command { std: "docker" "start" "-a" "8cdbbd2a8ec1178b4395dc0da6d94e302c946cb26979cdd0d8f7175fc6c7f3ff", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "8cdbbd2a8ec1178b4395dc0da6d94e302c946cb26979cdd0d8f7175fc6c7f3ff", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "8cdbbd2a8ec1178b4395dc0da6d94e302c946cb26979cdd0d8f7175fc6c7f3ff", kill_on_drop: false }` [INFO] [stdout] 8cdbbd2a8ec1178b4395dc0da6d94e302c946cb26979cdd0d8f7175fc6c7f3ff [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-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] dee3b3c64dec3becfadfa1f56faec9a23bbe942b796dce892ad98861f8733170 [INFO] running `Command { std: "docker" "start" "-a" "dee3b3c64dec3becfadfa1f56faec9a23bbe942b796dce892ad98861f8733170", kill_on_drop: false }` [INFO] [stderr] Compiling proc-macro2 v1.0.70 [INFO] [stderr] Checking unicode-ident v1.0.12 [INFO] [stderr] Compiling anyhow v1.0.75 [INFO] [stderr] Compiling syn v1.0.109 [INFO] [stderr] Compiling rustix v0.38.28 [INFO] [stderr] Checking linux-raw-sys v0.4.12 [INFO] [stderr] Checking bitflags v2.4.1 [INFO] [stderr] Checking fastrand v2.0.1 [INFO] [stderr] Checking quote v1.0.33 [INFO] [stderr] Checking tempfile v3.8.1 [INFO] [stderr] Checking cargo-fixeq v0.5.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/fix.rs:30:5 [INFO] [stdout] | [INFO] [stdout] 30 | return PathBuf::new(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 30 - return PathBuf::new(); [INFO] [stdout] 30 + PathBuf::new() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/fix.rs:50:41 [INFO] [stdout] | [INFO] [stdout] 50 | parse_code::find_assert_eqs(&code) [INFO] [stdout] | ^^^^^ help: change this to: `code` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_unstable_by_key` [INFO] [stdout] --> src/fix.rs:78:5 [INFO] [stdout] | [INFO] [stdout] 78 | fixes.sort_unstable_by(|lhs, rhs| rhs.location.start.line.cmp(&lhs.location.start.line)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_sort_by [INFO] [stdout] = note: `#[warn(clippy::unnecessary_sort_by)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 78 - fixes.sort_unstable_by(|lhs, rhs| rhs.location.start.line.cmp(&lhs.location.start.line)); [INFO] [stdout] 78 + fixes.sort_unstable_by_key(|rhs| std::cmp::Reverse(rhs.location.start.line)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parse_code.rs:9:46 [INFO] [stdout] | [INFO] [stdout] 9 | if let Ok(syntax_tree) = syn::parse_file(&code) { [INFO] [stdout] | ^^^^^ help: change this to: `code` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/parse_code.rs:71:9 [INFO] [stdout] | [INFO] [stdout] 71 | / self.start.line <= line [INFO] [stdout] 72 | | && self.end.line >= line [INFO] [stdout] 73 | | && (self.start.line > line || self.start.column <= col) [INFO] [stdout] 74 | | && (self.end.line < line || self.end.column >= col) [INFO] [stdout] | |_______________________________________________________________^ [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] help: try [INFO] [stdout] | [INFO] [stdout] 71 - self.start.line <= line [INFO] [stdout] 72 - && self.end.line >= line [INFO] [stdout] 73 - && (self.start.line > line || self.start.column <= col) [INFO] [stdout] 74 - && (self.end.line < line || self.end.column >= col) [INFO] [stdout] 71 + !(self.start.line > line || self.end.line < line || self.start.column > col || self.end.column < col) [INFO] [stdout] | [INFO] [stdout] 71 - self.start.line <= line [INFO] [stdout] 72 - && self.end.line >= line [INFO] [stdout] 73 - && (self.start.line > line || self.start.column <= col) [INFO] [stdout] 74 - && (self.end.line < line || self.end.column >= col) [INFO] [stdout] 71 + self.start.line <= line && self.end.line >= line && self.start.column <= col && self.end.column >= col [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/parse_code.rs:71:9 [INFO] [stdout] | [INFO] [stdout] 71 | / self.start.line <= line [INFO] [stdout] 72 | | && self.end.line >= line [INFO] [stdout] 73 | | && (self.start.line > line || self.start.column <= col) [INFO] [stdout] | |___________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 71 - self.start.line <= line [INFO] [stdout] 72 - && self.end.line >= line [INFO] [stdout] 73 - && (self.start.line > line || self.start.column <= col) [INFO] [stdout] 71 + !(self.start.line > line || self.end.line < line || self.start.column > col) [INFO] [stdout] | [INFO] [stdout] 71 - self.start.line <= line [INFO] [stdout] 72 - && self.end.line >= line [INFO] [stdout] 73 - && (self.start.line > line || self.start.column <= col) [INFO] [stdout] 71 + self.start.line <= line && self.end.line >= line && self.start.column <= col [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/fix.rs:106:28 [INFO] [stdout] | [INFO] [stdout] 106 | fn normalize_multi_line(s: &str) -> Cow { [INFO] [stdout] | ^^^^ ^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] = note: `#[warn(mismatched_lifetime_syntaxes)]` on by default [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 106 | fn normalize_multi_line(s: &str) -> Cow<'_, str> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/fix.rs:30:5 [INFO] [stdout] | [INFO] [stdout] 30 | return PathBuf::new(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 30 - return PathBuf::new(); [INFO] [stdout] 30 + PathBuf::new() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/fix.rs:50:41 [INFO] [stdout] | [INFO] [stdout] 50 | parse_code::find_assert_eqs(&code) [INFO] [stdout] | ^^^^^ help: change this to: `code` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_unstable_by_key` [INFO] [stdout] --> src/fix.rs:78:5 [INFO] [stdout] | [INFO] [stdout] 78 | fixes.sort_unstable_by(|lhs, rhs| rhs.location.start.line.cmp(&lhs.location.start.line)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_sort_by [INFO] [stdout] = note: `#[warn(clippy::unnecessary_sort_by)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 78 - fixes.sort_unstable_by(|lhs, rhs| rhs.location.start.line.cmp(&lhs.location.start.line)); [INFO] [stdout] 78 + fixes.sort_unstable_by_key(|rhs| std::cmp::Reverse(rhs.location.start.line)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parse_code.rs:9:46 [INFO] [stdout] | [INFO] [stdout] 9 | if let Ok(syntax_tree) = syn::parse_file(&code) { [INFO] [stdout] | ^^^^^ help: change this to: `code` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/parse_code.rs:71:9 [INFO] [stdout] | [INFO] [stdout] 71 | / self.start.line <= line [INFO] [stdout] 72 | | && self.end.line >= line [INFO] [stdout] 73 | | && (self.start.line > line || self.start.column <= col) [INFO] [stdout] 74 | | && (self.end.line < line || self.end.column >= col) [INFO] [stdout] | |_______________________________________________________________^ [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] help: try [INFO] [stdout] | [INFO] [stdout] 71 - self.start.line <= line [INFO] [stdout] 72 - && self.end.line >= line [INFO] [stdout] 73 - && (self.start.line > line || self.start.column <= col) [INFO] [stdout] 74 - && (self.end.line < line || self.end.column >= col) [INFO] [stdout] 71 + !(self.start.line > line || self.end.line < line || self.start.column > col || self.end.column < col) [INFO] [stdout] | [INFO] [stdout] 71 - self.start.line <= line [INFO] [stdout] 72 - && self.end.line >= line [INFO] [stdout] 73 - && (self.start.line > line || self.start.column <= col) [INFO] [stdout] 74 - && (self.end.line < line || self.end.column >= col) [INFO] [stdout] 71 + self.start.line <= line && self.end.line >= line && self.start.column <= col && self.end.column >= col [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/parse_code.rs:71:9 [INFO] [stdout] | [INFO] [stdout] 71 | / self.start.line <= line [INFO] [stdout] 72 | | && self.end.line >= line [INFO] [stdout] 73 | | && (self.start.line > line || self.start.column <= col) [INFO] [stdout] | |___________________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 71 - self.start.line <= line [INFO] [stdout] 72 - && self.end.line >= line [INFO] [stdout] 73 - && (self.start.line > line || self.start.column <= col) [INFO] [stdout] 71 + !(self.start.line > line || self.end.line < line || self.start.column > col) [INFO] [stdout] | [INFO] [stdout] 71 - self.start.line <= line [INFO] [stdout] 72 - && self.end.line >= line [INFO] [stdout] 73 - && (self.start.line > line || self.start.column <= col) [INFO] [stdout] 71 + self.start.line <= line && self.end.line >= line && self.start.column <= col [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/fix.rs:106:28 [INFO] [stdout] | [INFO] [stdout] 106 | fn normalize_multi_line(s: &str) -> Cow { [INFO] [stdout] | ^^^^ ^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] = note: `#[warn(mismatched_lifetime_syntaxes)]` on by default [INFO] [stdout] help: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 106 | fn normalize_multi_line(s: &str) -> Cow<'_, str> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 6.24s [INFO] running `Command { std: "docker" "inspect" "dee3b3c64dec3becfadfa1f56faec9a23bbe942b796dce892ad98861f8733170", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "dee3b3c64dec3becfadfa1f56faec9a23bbe942b796dce892ad98861f8733170", kill_on_drop: false }` [INFO] [stdout] dee3b3c64dec3becfadfa1f56faec9a23bbe942b796dce892ad98861f8733170