Skip to content

Commit f3b68d3

Browse files
committed
Auto merge of #82727 - oli-obk:shrinkmem, r=pnkfelix
Test the effect of shrinking the size of Rvalue by 16 bytes r? `@ghost`
2 parents 6b40d12 + 5b2e7e9 commit f3b68d3

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

clippy_lints/src/redundant_clone.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -584,10 +584,10 @@ fn rvalue_locals(rvalue: &mir::Rvalue<'_>, mut visit: impl FnMut(mir::Local)) {
584584
match rvalue {
585585
Use(op) | Repeat(op, _) | Cast(_, op, _) | UnaryOp(_, op) => visit_op(op),
586586
Aggregate(_, ops) => ops.iter().for_each(visit_op),
587-
BinaryOp(_, lhs, rhs) | CheckedBinaryOp(_, lhs, rhs) => {
587+
BinaryOp(_, box (lhs, rhs)) | CheckedBinaryOp(_, box (lhs, rhs)) => {
588588
visit_op(lhs);
589589
visit_op(rhs);
590-
},
590+
}
591591
_ => (),
592592
}
593593
}

clippy_utils/src/qualify_min_const_fn.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ fn check_rvalue(tcx: TyCtxt<'tcx>, body: &Body<'tcx>, def_id: DefId, rvalue: &Rv
172172
}
173173
},
174174
// binops are fine on integers
175-
Rvalue::BinaryOp(_, lhs, rhs) | Rvalue::CheckedBinaryOp(_, lhs, rhs) => {
175+
Rvalue::BinaryOp(_, box (lhs, rhs)) | Rvalue::CheckedBinaryOp(_, box (lhs, rhs)) => {
176176
check_operand(tcx, lhs, span, body)?;
177177
check_operand(tcx, rhs, span, body)?;
178178
let ty = lhs.ty(body, tcx);

0 commit comments

Comments
 (0)