You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
just clippy fails due to unnecessary_mut_passed in mir-lower's lowering_test.rs #401
just clippy # i.e. cargo clippy --all-targets --lib --tests -- -D warnings
Output (10 identical errors, all in the same file):
error: the function `IntegerType::get` doesn't need a mutable reference
--> crates/mir-lower/tests/lowering_test.rs:813:35
|
813 | let i32_ty = IntegerType::get(&mut ctx, 32, Signedness::Signless);
| ^^^^^^^^
|
= note: `-D clippy::unnecessary-mut-passed` implied by `-D warnings`
...
error: could not compile `mir-lower` (test "lowering_test") due to 10 previous errors
pliron's IntegerType::get takes &Context, but ten call sites in crates/mir-lower/tests/lowering_test.rs pass &mut ctx. Rust accepts the implicit downgrade, but clippy's unnecessary_mut_passed lint flags it.
It survives on main because the CI clippy job runs cargo clippy --workspace -- -D warnings without --all-targets/--tests, so test targets are never linted there.
Unrelated to #368, which fixes different lints confined to difftest's backends.rs.
This appears to already be resolved on main. Running cargo clippy -p mir-lower --all-targets -- -D warnings on the current HEAD (commit fe4791d5) completes cleanly with no unnecessary_mut_passed warnings.
The fix likely landed as part of an upstream commit that changed the &mut ctx → &ctx calls in lowering_test.rs.
Activity
honeyspoon commentedon Jul 24, 2026
This appears to already be resolved on
main. Runningcargo clippy -p mir-lower --all-targets -- -D warningson the current HEAD (commitfe4791d5) completes cleanly with nounnecessary_mut_passedwarnings.The fix likely landed as part of an upstream commit that changed the
&mut ctx→&ctxcalls inlowering_test.rs.Lint workspace test targets in CI, and fix the one site that fails (N…