Skip to content

Fix difftest Clippy warnings under -D warnings #367

Closed

Description

@uurl

Context

Running Clippy on crates/fuzzer/rustlantis/difftest with warnings denied currently fails because of existing warnings in difftest/src/backends.rs.

These warnings are unrelated to the ExecResults optimization work, so they should be handled in a separate cleanup PR.

Problem

The following command fails:

cargo clippy --all-targets -- -D warnings

The failures are caused by existing Clippy diagnostics in difftest/src/backends.rs:

  • clippy::let_and_return in run_compile_command
  • clippy::upper_case_acronyms for LLVM
  • clippy::needless_borrow when invoking rustup run ... miri
  • clippy::upper_case_acronyms for GCC

Proposed change

Apply the minimal cleanup needed to make strict Clippy pass:

  • Return the compiler.wait_with_output().expect(...) expression directly.
  • Rename private struct LLVM to Llvm.
  • Rename private struct GCC to Gcc.
  • Remove the unnecessary borrow in the Miri rustup run command.

The renamed structs are private implementation details, so this should not affect the public API.

Acceptance criteria

  • cargo fmt passes.
  • RUST_TEST_THREADS=1 cargo test passes.
  • cargo clippy --all-targets -- -D warnings passes.
  • No behavioral changes are introduced.
  • The PR only touches Clippy cleanup in difftest/src/backends.rs.

Activity

  1. added
    QoL-improvement
    on Jul 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    QoL-improvement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions