diff options
| author | Oli Scherer <github35764891676564198441@oli-obk.de> | 2021-03-05 09:32:47 +0000 |
|---|---|---|
| committer | Oli Scherer <github35764891676564198441@oli-obk.de> | 2021-03-05 09:33:01 +0000 |
| commit | 9a2362e5a96d2469d65a64d7b0b422b48fc2b4ee (patch) | |
| tree | a29a5df67d3551a7ed74ae41910b26e6a1366cb5 /src | |
| parent | f31481368bb64725bd2741636bf2c5fc4378ec30 (diff) | |
| download | rust-9a2362e5a96d2469d65a64d7b0b422b48fc2b4ee.tar.gz rust-9a2362e5a96d2469d65a64d7b0b422b48fc2b4ee.zip | |
Shrink the size of Rvalue by 16 bytes
Diffstat (limited to 'src')
| -rw-r--r-- | src/tools/clippy/clippy_lints/src/redundant_clone.rs | 4 | ||||
| -rw-r--r-- | src/tools/clippy/clippy_utils/src/qualify_min_const_fn.rs | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/tools/clippy/clippy_lints/src/redundant_clone.rs b/src/tools/clippy/clippy_lints/src/redundant_clone.rs index 06adbb523d7..6a4537e6735 100644 --- a/src/tools/clippy/clippy_lints/src/redundant_clone.rs +++ b/src/tools/clippy/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/src/tools/clippy/clippy_utils/src/qualify_min_const_fn.rs b/src/tools/clippy/clippy_utils/src/qualify_min_const_fn.rs index a482017afeb..2cb9588e13f 100644 --- a/src/tools/clippy/clippy_utils/src/qualify_min_const_fn.rs +++ b/src/tools/clippy/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); |
