From b24b88734d7aab59184d30209bc6053cc2ecf3a4 Mon Sep 17 00:00:00 2001 From: Niko Matsakis Date: Wed, 24 Oct 2018 08:51:16 -0400 Subject: [PATCH] select.rs: rustfmt --- src/librustc/traits/select.rs | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/librustc/traits/select.rs b/src/librustc/traits/select.rs index cdc7e3656d4d..e2a5fdd36221 100644 --- a/src/librustc/traits/select.rs +++ b/src/librustc/traits/select.rs @@ -1368,7 +1368,8 @@ impl<'cx, 'gcx, 'tcx> SelectionContext<'cx, 'gcx, 'tcx> { // Winnow, but record the exact outcome of evaluation, which // is needed for specialization. Propagate overflow if it occurs. - let mut candidates = candidates.into_iter() + let mut candidates = candidates + .into_iter() .map(|c| match self.evaluate_candidate(stack, &c) { Ok(eval) if eval.may_apply() => Ok(Some(EvaluatedCandidate { candidate: c, @@ -1377,8 +1378,8 @@ impl<'cx, 'gcx, 'tcx> SelectionContext<'cx, 'gcx, 'tcx> { Ok(_) => Ok(None), Err(OverflowError) => Err(Overflow), }) - .flat_map(Result::transpose) - .collect::, _>>()?; + .flat_map(Result::transpose) + .collect::, _>>()?; debug!( "winnowed to {} candidates for {:?}: {:?}", @@ -3004,9 +3005,7 @@ impl<'cx, 'gcx, 'tcx> SelectionContext<'cx, 'gcx, 'tcx> { let self_ty = self.infcx .shallow_resolve(*obligation.self_ty().skip_binder()); let poly_trait_ref = match self_ty.sty { - ty::Dynamic(ref data, ..) => { - data.principal().with_self_ty(self.tcx(), self_ty) - } + ty::Dynamic(ref data, ..) => data.principal().with_self_ty(self.tcx(), self_ty), _ => span_bug!(obligation.cause.span, "object candidate with non-object"), }; @@ -3672,7 +3671,10 @@ impl<'cx, 'gcx, 'tcx> SelectionContext<'cx, 'gcx, 'tcx> { ); let closure_type = self.infcx.closure_sig(closure_def_id, substs); - debug!("closure_trait_ref_unnormalized: closure_type = {:?}", closure_type); + debug!( + "closure_trait_ref_unnormalized: closure_type = {:?}", + closure_type + ); // (1) Feels icky to skip the binder here, but OTOH we know // that the self-type is an unboxed closure type and hence is