]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_middle/src/mir/type_foldable.rs
Shrink the size of Rvalue by 16 bytes
[rust.git] / compiler / rustc_middle / src / mir / type_foldable.rs
index da8e189ba9d403845734e13e496efcf9e8049f5a..6fabddbd149ca677d34a6766dec3638b46bfffea 100644 (file)
@@ -181,9 +181,11 @@ fn super_fold_with<F: TypeFolder<'tcx>>(self, folder: &mut F) -> Self {
             AddressOf(mutability, place) => AddressOf(mutability, place.fold_with(folder)),
             Len(place) => Len(place.fold_with(folder)),
             Cast(kind, op, ty) => Cast(kind, op.fold_with(folder), ty.fold_with(folder)),
-            BinaryOp(op, rhs, lhs) => BinaryOp(op, rhs.fold_with(folder), lhs.fold_with(folder)),
-            CheckedBinaryOp(op, rhs, lhs) => {
-                CheckedBinaryOp(op, rhs.fold_with(folder), lhs.fold_with(folder))
+            BinaryOp(op, box (rhs, lhs)) => {
+                BinaryOp(op, box (rhs.fold_with(folder), lhs.fold_with(folder)))
+            }
+            CheckedBinaryOp(op, box (rhs, lhs)) => {
+                CheckedBinaryOp(op, box (rhs.fold_with(folder), lhs.fold_with(folder)))
             }
             UnaryOp(op, val) => UnaryOp(op, val.fold_with(folder)),
             Discriminant(place) => Discriminant(place.fold_with(folder)),
@@ -227,7 +229,7 @@ fn super_visit_with<V: TypeVisitor<'tcx>>(&self, visitor: &mut V) -> ControlFlow
                 op.visit_with(visitor)?;
                 ty.visit_with(visitor)
             }
-            BinaryOp(_, ref rhs, ref lhs) | CheckedBinaryOp(_, ref rhs, ref lhs) => {
+            BinaryOp(_, box (ref rhs, ref lhs)) | CheckedBinaryOp(_, box (ref rhs, ref lhs)) => {
                 rhs.visit_with(visitor)?;
                 lhs.visit_with(visitor)
             }