about summary refs log tree commit diff
diff options
context:
space:
mode:
authorCamille GILLOT <gillot.camille@gmail.com>2019-11-09 11:30:51 +0100
committerCamille GILLOT <gillot.camille@gmail.com>2019-11-12 20:50:47 +0100
commit6b56dced4c4fa1ac9d6d7629c816ad9b06c466d0 (patch)
treefef2c2b047f76024640e9bfcc5d6574d7f0e38e3
parentf9ff78bdd546b2a420fbb0056cc9d1a6a0e40132 (diff)
downloadrust-6b56dced4c4fa1ac9d6d7629c816ad9b06c466d0.tar.gz
rust-6b56dced4c4fa1ac9d6d7629c816ad9b06c466d0.zip
Fix tidy.
-rw-r--r--src/librustc_codegen_ssa/mir/place.rs4
-rw-r--r--src/librustc_mir/hair/pattern/_match.rs8
2 files changed, 9 insertions, 3 deletions
diff --git a/src/librustc_codegen_ssa/mir/place.rs b/src/librustc_codegen_ssa/mir/place.rs
index d515f114c77..d4e33ee8b6f 100644
--- a/src/librustc_codegen_ssa/mir/place.rs
+++ b/src/librustc_codegen_ssa/mir/place.rs
@@ -480,7 +480,9 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
                 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),
diff --git a/src/librustc_mir/hair/pattern/_match.rs b/src/librustc_mir/hair/pattern/_match.rs
index 9a1fbf71e6f..9894fa64779 100644
--- a/src/librustc_mir/hair/pattern/_match.rs
+++ b/src/librustc_mir/hair/pattern/_match.rs
@@ -327,7 +327,9 @@ impl PatternFolder<'tcx> for LiteralExpander<'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 @@ impl<'tcx> IntRange<'tcx> {
     ) -> 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