@@ -358,7 +358,8 @@ impl<'a, 'tcx> AutoTraitFinder<'a, 'tcx> {
358
358
& Err ( SelectionError :: Unimplemented ) => {
359
359
if self . is_of_param ( pred. skip_binder ( ) . trait_ref . substs ) {
360
360
already_visited. remove ( & pred) ;
361
- self . add_user_pred ( & mut user_computed_preds, ty:: Predicate :: Trait ( pred. clone ( ) ) ) ;
361
+ self . add_user_pred ( & mut user_computed_preds,
362
+ ty:: Predicate :: Trait ( pred. clone ( ) ) ) ;
362
363
predicates. push_back ( pred) ;
363
364
} else {
364
365
debug ! (
@@ -416,7 +417,8 @@ impl<'a, 'tcx> AutoTraitFinder<'a, 'tcx> {
416
417
// under which a type implements an auto trait. A trait predicate involving
417
418
// a HRTB means that the type needs to work with any choice of lifetime,
418
419
// not just one specific lifetime (e.g. 'static).
419
- fn add_user_pred < ' c > ( & self , user_computed_preds : & mut FxHashSet < ty:: Predicate < ' c > > , new_pred : ty:: Predicate < ' c > ) {
420
+ fn add_user_pred < ' c > ( & self , user_computed_preds : & mut FxHashSet < ty:: Predicate < ' c > > ,
421
+ new_pred : ty:: Predicate < ' c > ) {
420
422
let mut should_add_new = true ;
421
423
user_computed_preds. retain ( |& old_pred| {
422
424
match ( & new_pred, old_pred) {
@@ -430,11 +432,17 @@ impl<'a, 'tcx> AutoTraitFinder<'a, 'tcx> {
430
432
return true
431
433
}
432
434
433
- for ( new_region, old_region) in new_substs. regions ( ) . zip ( old_substs. regions ( ) ) {
435
+ for ( new_region, old_region) in new_substs
436
+ . regions ( )
437
+ . zip ( old_substs. regions ( ) ) {
438
+
434
439
match ( new_region, old_region) {
435
440
// If both predicates have an 'ReLateBound' (a HRTB) in the
436
441
// same spot, we do nothing
437
- ( ty:: RegionKind :: ReLateBound ( _, _) , ty:: RegionKind :: ReLateBound ( _, _) ) => { } ,
442
+ (
443
+ ty:: RegionKind :: ReLateBound ( _, _) ,
444
+ ty:: RegionKind :: ReLateBound ( _, _)
445
+ ) => { } ,
438
446
439
447
( ty:: RegionKind :: ReLateBound ( _, _) , _) => {
440
448
// The new predicate has a HRTB in a spot where the old
0 commit comments