@@ -159,10 +159,9 @@ where
159
159
}
160
160
}
161
161
162
- // FIXME: consider taking `ty::Binder` directly, without the reference.
163
162
fn create_scope (
164
163
& mut self ,
165
- value : & ty:: Binder < impl TypeFoldable < ' tcx > > ,
164
+ value : ty:: Binder < impl Relate < ' tcx > > ,
166
165
universally_quantified : UniversallyQuantified ,
167
166
) -> BoundRegionScope < ' tcx > {
168
167
let mut scope = BoundRegionScope :: default ( ) ;
@@ -654,8 +653,8 @@ where
654
653
// instantiation of B (i.e., B instantiated with
655
654
// universals).
656
655
657
- let b_scope = self . create_scope ( & b, UniversallyQuantified ( true ) ) ;
658
- let a_scope = self . create_scope ( & a, UniversallyQuantified ( false ) ) ;
656
+ let b_scope = self . create_scope ( b, UniversallyQuantified ( true ) ) ;
657
+ let a_scope = self . create_scope ( a, UniversallyQuantified ( false ) ) ;
659
658
660
659
debug ! ( "binders: a_scope = {:?} (existential)" , a_scope) ;
661
660
debug ! ( "binders: b_scope = {:?} (universal)" , b_scope) ;
@@ -683,7 +682,7 @@ where
683
682
// subtyping (i.e., `&'b u32 <: &{P} u32`).
684
683
let variance = :: std:: mem:: replace ( & mut self . ambient_variance , ty:: Variance :: Covariant ) ;
685
684
686
- self . relate ( * a. skip_binder ( ) , * b. skip_binder ( ) ) ?;
685
+ self . relate ( a. skip_binder ( ) , b. skip_binder ( ) ) ?;
687
686
688
687
self . ambient_variance = variance;
689
688
@@ -698,8 +697,8 @@ where
698
697
// instantiation of B (i.e., B instantiated with
699
698
// existentials). Opposite of above.
700
699
701
- let a_scope = self . create_scope ( & a, UniversallyQuantified ( true ) ) ;
702
- let b_scope = self . create_scope ( & b, UniversallyQuantified ( false ) ) ;
700
+ let a_scope = self . create_scope ( a, UniversallyQuantified ( true ) ) ;
701
+ let b_scope = self . create_scope ( b, UniversallyQuantified ( false ) ) ;
703
702
704
703
debug ! ( "binders: a_scope = {:?} (universal)" , a_scope) ;
705
704
debug ! ( "binders: b_scope = {:?} (existential)" , b_scope) ;
@@ -712,7 +711,7 @@ where
712
711
let variance =
713
712
:: std:: mem:: replace ( & mut self . ambient_variance , ty:: Variance :: Contravariant ) ;
714
713
715
- self . relate ( * a. skip_binder ( ) , * b. skip_binder ( ) ) ?;
714
+ self . relate ( a. skip_binder ( ) , b. skip_binder ( ) ) ?;
716
715
717
716
self . ambient_variance = variance;
718
717
@@ -1010,7 +1009,7 @@ where
1010
1009
debug ! ( "TypeGeneralizer::binders(a={:?})" , a) ;
1011
1010
1012
1011
self . first_free_index . shift_in ( 1 ) ;
1013
- let result = self . relate ( * a. skip_binder ( ) , * a. skip_binder ( ) ) ?;
1012
+ let result = self . relate ( a. skip_binder ( ) , a. skip_binder ( ) ) ?;
1014
1013
self . first_free_index . shift_out ( 1 ) ;
1015
1014
Ok ( ty:: Binder :: bind ( result) )
1016
1015
}
0 commit comments