about summary refs log tree commit diff
diff options
context:
space:
mode:
authorNiko Matsakis <niko@alum.mit.edu>2017-11-07 04:40:35 -0500
committerNiko Matsakis <niko@alum.mit.edu>2017-11-16 05:57:44 -0500
commit37945fe3e89951a92c5abd110e8fa1a368c7eed9 (patch)
tree96c1f4cdd9310a1484ae6ba3ff066def4656027a
parent034018cd9036ae3375e9b59d940b98b6aec766da (diff)
downloadrust-37945fe3e89951a92c5abd110e8fa1a368c7eed9.tar.gz
rust-37945fe3e89951a92c5abd110e8fa1a368c7eed9.zip
MIR typeck: rustfmt
-rw-r--r--src/librustc_mir/transform/type_check.rs14
1 files changed, 4 insertions, 10 deletions
diff --git a/src/librustc_mir/transform/type_check.rs b/src/librustc_mir/transform/type_check.rs
index fa90835c294..6384fc56b30 100644
--- a/src/librustc_mir/transform/type_check.rs
+++ b/src/librustc_mir/transform/type_check.rs
@@ -391,10 +391,9 @@ impl<'a, 'gcx, 'tcx> TypeChecker<'a, 'gcx, 'tcx> {
         traits::ObligationCause::misc(span, self.body_id)
     }
 
-    fn fully_perform_op<OP, R>(&self,
-                               op: OP)
-                               -> Result<R, TypeError<'tcx>>
-        where OP: FnOnce() -> InferResult<'tcx, R>
+    fn fully_perform_op<OP, R>(&self, op: OP) -> Result<R, TypeError<'tcx>>
+    where
+        OP: FnOnce() -> InferResult<'tcx, R>,
     {
         let mut fulfill_cx = FulfillmentContext::new();
         let InferOk { value, obligations } = self.infcx.commit_if_ok(|_| op())?;
@@ -405,12 +404,7 @@ impl<'a, 'gcx, 'tcx> TypeChecker<'a, 'gcx, 'tcx> {
         Ok(value)
     }
 
-    fn sub_types(
-        &self,
-        sub: Ty<'tcx>,
-        sup: Ty<'tcx>,
-        _at_location: Location,
-    ) -> UnitResult<'tcx> {
+    fn sub_types(&self, sub: Ty<'tcx>, sup: Ty<'tcx>, _at_location: Location) -> UnitResult<'tcx> {
         self.fully_perform_op(|| {
             self.infcx
                 .at(&self.misc(self.last_span), self.param_env)