diff options
| author | bors <bors@rust-lang.org> | 2021-03-08 08:39:24 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2021-03-08 08:39:24 +0000 |
| commit | f3b68d307aa869bfd6203685e726a2e91c92ff21 (patch) | |
| tree | a37458a7cc942f317c34675943161ed61829c2db | |
| parent | 6b40d120c75d5eba1bb0e6566b90b749d3267e54 (diff) | |
| parent | 5b2e7e91c3c12fb1eaf12aadc1d01a3f5ec7670c (diff) | |
| download | rust-f3b68d307aa869bfd6203685e726a2e91c92ff21.tar.gz rust-f3b68d307aa869bfd6203685e726a2e91c92ff21.zip | |
Auto merge of #82727 - oli-obk:shrinkmem, r=pnkfelix
Test the effect of shrinking the size of Rvalue by 16 bytes r? `@ghost`
| -rw-r--r-- | clippy_lints/src/redundant_clone.rs | 4 | ||||
| -rw-r--r-- | clippy_utils/src/qualify_min_const_fn.rs | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/clippy_lints/src/redundant_clone.rs b/clippy_lints/src/redundant_clone.rs index 06adbb523d7..6a4537e6735 100644 --- a/clippy_lints/src/redundant_clone.rs +++ b/clippy_lints/src/redundant_clone.rs @@ -584,10 +584,10 @@ fn rvalue_locals(rvalue: &mir::Rvalue<'_>, mut visit: impl FnMut(mir::Local)) { match rvalue { Use(op) | Repeat(op, _) | Cast(_, op, _) | UnaryOp(_, op) => visit_op(op), Aggregate(_, ops) => ops.iter().for_each(visit_op), - BinaryOp(_, lhs, rhs) | CheckedBinaryOp(_, lhs, rhs) => { + BinaryOp(_, box (lhs, rhs)) | CheckedBinaryOp(_, box (lhs, rhs)) => { visit_op(lhs); visit_op(rhs); - }, + } _ => (), } } diff --git a/clippy_utils/src/qualify_min_const_fn.rs b/clippy_utils/src/qualify_min_const_fn.rs index a482017afeb..2cb9588e13f 100644 --- a/clippy_utils/src/qualify_min_const_fn.rs +++ b/clippy_utils/src/qualify_min_const_fn.rs @@ -172,7 +172,7 @@ fn check_rvalue(tcx: TyCtxt<'tcx>, body: &Body<'tcx>, def_id: DefId, rvalue: &Rv } }, // binops are fine on integers - Rvalue::BinaryOp(_, lhs, rhs) | Rvalue::CheckedBinaryOp(_, lhs, rhs) => { + Rvalue::BinaryOp(_, box (lhs, rhs)) | Rvalue::CheckedBinaryOp(_, box (lhs, rhs)) => { check_operand(tcx, lhs, span, body)?; check_operand(tcx, rhs, span, body)?; let ty = lhs.ty(body, tcx); |
