]> git.lizzy.rs Git - rust.git/commitdiff
MIR typeck: rustfmt
authorNiko Matsakis <niko@alum.mit.edu>
Tue, 7 Nov 2017 09:40:35 +0000 (04:40 -0500)
committerNiko Matsakis <niko@alum.mit.edu>
Thu, 16 Nov 2017 10:57:44 +0000 (05:57 -0500)
src/librustc_mir/transform/type_check.rs

index fa90835c294be63cd974b90c12f1ea96befcde25..6384fc56b3006b38ce9e0bb171dc977a1b21c2a9 100644 (file)
@@ -391,10 +391,9 @@ fn misc(&self, span: Span) -> traits::ObligationCause<'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 @@ fn fully_perform_op<OP, R>(&self,
         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)