@@ -1368,7 +1368,8 @@ impl<'cx, 'gcx, 'tcx> SelectionContext<'cx, 'gcx, 'tcx> {
1368
1368
1369
1369
// Winnow, but record the exact outcome of evaluation, which
1370
1370
// is needed for specialization. Propagate overflow if it occurs.
1371
- let mut candidates = candidates. into_iter ( )
1371
+ let mut candidates = candidates
1372
+ . into_iter ( )
1372
1373
. map ( |c| match self . evaluate_candidate ( stack, & c) {
1373
1374
Ok ( eval) if eval. may_apply ( ) => Ok ( Some ( EvaluatedCandidate {
1374
1375
candidate : c,
@@ -1377,8 +1378,8 @@ impl<'cx, 'gcx, 'tcx> SelectionContext<'cx, 'gcx, 'tcx> {
1377
1378
Ok ( _) => Ok ( None ) ,
1378
1379
Err ( OverflowError ) => Err ( Overflow ) ,
1379
1380
} )
1380
- . flat_map ( Result :: transpose)
1381
- . collect :: < Result < Vec < _ > , _ > > ( ) ?;
1381
+ . flat_map ( Result :: transpose)
1382
+ . collect :: < Result < Vec < _ > , _ > > ( ) ?;
1382
1383
1383
1384
debug ! (
1384
1385
"winnowed to {} candidates for {:?}: {:?}" ,
@@ -3004,9 +3005,7 @@ impl<'cx, 'gcx, 'tcx> SelectionContext<'cx, 'gcx, 'tcx> {
3004
3005
let self_ty = self . infcx
3005
3006
. shallow_resolve ( * obligation. self_ty ( ) . skip_binder ( ) ) ;
3006
3007
let poly_trait_ref = match self_ty. sty {
3007
- ty:: Dynamic ( ref data, ..) => {
3008
- data. principal ( ) . with_self_ty ( self . tcx ( ) , self_ty)
3009
- }
3008
+ ty:: Dynamic ( ref data, ..) => data. principal ( ) . with_self_ty ( self . tcx ( ) , self_ty) ,
3010
3009
_ => span_bug ! ( obligation. cause. span, "object candidate with non-object" ) ,
3011
3010
} ;
3012
3011
@@ -3672,7 +3671,10 @@ impl<'cx, 'gcx, 'tcx> SelectionContext<'cx, 'gcx, 'tcx> {
3672
3671
) ;
3673
3672
let closure_type = self . infcx . closure_sig ( closure_def_id, substs) ;
3674
3673
3675
- debug ! ( "closure_trait_ref_unnormalized: closure_type = {:?}" , closure_type) ;
3674
+ debug ! (
3675
+ "closure_trait_ref_unnormalized: closure_type = {:?}" ,
3676
+ closure_type
3677
+ ) ;
3676
3678
3677
3679
// (1) Feels icky to skip the binder here, but OTOH we know
3678
3680
// that the self-type is an unboxed closure type and hence is
0 commit comments