]> git.lizzy.rs Git - rust.git/commitdiff
Fix tidy.
authorCamille GILLOT <gillot.camille@gmail.com>
Sat, 9 Nov 2019 10:30:51 +0000 (11:30 +0100)
committerCamille GILLOT <gillot.camille@gmail.com>
Tue, 12 Nov 2019 19:50:47 +0000 (20:50 +0100)
src/librustc_codegen_ssa/mir/place.rs
src/librustc_mir/hair/pattern/_match.rs

index d515f114c77f09cbd2e27881711ebfca0eec0f4d..d4e33ee8b6f33e904267ffcc1c462b32557fe29d 100644 (file)
@@ -480,7 +480,9 @@ pub fn codegen_place(
                 let layout = cx.layout_of(self.monomorphize(&ty));
                 match bx.tcx().const_eval(param_env.and(cid)) {
                     Ok(val) => match val.val {
-                        ty::ConstKind::Value(mir::interpret::ConstValue::ByRef { alloc, offset }) => {
+                        ty::ConstKind::Value(mir::interpret::ConstValue::ByRef {
+                            alloc, offset
+                        }) => {
                             bx.cx().from_const_alloc(layout, alloc, offset)
                         }
                         _ => bug!("promoteds should have an allocation: {:?}", val),
index 9a1fbf71e6f4b98884a22d08fc062ee7ca4b892e..9894fa647791072a5822bd2307d35c8b84a3d9dc 100644 (file)
@@ -327,7 +327,9 @@ fn fold_pattern(&mut self, pat: &Pat<'tcx>) -> Pat<'tcx> {
                         span: pat.span,
                         kind: box PatKind::Constant {
                             value: self.tcx.mk_const(Const {
-                                val: ty::ConstKind::Value(self.fold_const_value_deref(*val, rty, crty)),
+                                val: ty::ConstKind::Value(
+                                    self.fold_const_value_deref(*val, rty, crty)
+                                ),
                                 ty: rty,
                             }),
                         },
@@ -1256,7 +1258,9 @@ fn from_const(
     ) -> Option<IntRange<'tcx>> {
         if let Some((target_size, bias)) = Self::integral_size_and_signed_bias(tcx, value.ty) {
             let ty = value.ty;
-            let val = if let ty::ConstKind::Value(ConstValue::Scalar(Scalar::Raw { data, size })) = value.val {
+            let val = if let ty::ConstKind::Value(ConstValue::Scalar(
+                Scalar::Raw { data, size }
+            )) = value.val {
                 // For this specific pattern we can skip a lot of effort and go
                 // straight to the result, after doing a bit of checking. (We
                 // could remove this branch and just use the next branch, which