@@ -159,10 +159,9 @@ where
159159 }
160160 }
161161
162- // FIXME: consider taking `ty::Binder` directly, without the reference.
163162 fn create_scope (
164163 & mut self ,
165- value : & ty:: Binder < impl TypeFoldable < ' tcx > > ,
164+ value : ty:: Binder < impl Relate < ' tcx > > ,
166165 universally_quantified : UniversallyQuantified ,
167166 ) -> BoundRegionScope < ' tcx > {
168167 let mut scope = BoundRegionScope :: default ( ) ;
@@ -654,8 +653,8 @@ where
654653 // instantiation of B (i.e., B instantiated with
655654 // universals).
656655
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 ) ) ;
659658
660659 debug ! ( "binders: a_scope = {:?} (existential)" , a_scope) ;
661660 debug ! ( "binders: b_scope = {:?} (universal)" , b_scope) ;
@@ -683,7 +682,7 @@ where
683682 // subtyping (i.e., `&'b u32 <: &{P} u32`).
684683 let variance = :: std:: mem:: replace ( & mut self . ambient_variance , ty:: Variance :: Covariant ) ;
685684
686- self . relate ( * a. skip_binder ( ) , * b. skip_binder ( ) ) ?;
685+ self . relate ( a. skip_binder ( ) , b. skip_binder ( ) ) ?;
687686
688687 self . ambient_variance = variance;
689688
@@ -698,8 +697,8 @@ where
698697 // instantiation of B (i.e., B instantiated with
699698 // existentials). Opposite of above.
700699
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 ) ) ;
703702
704703 debug ! ( "binders: a_scope = {:?} (universal)" , a_scope) ;
705704 debug ! ( "binders: b_scope = {:?} (existential)" , b_scope) ;
@@ -712,7 +711,7 @@ where
712711 let variance =
713712 :: std:: mem:: replace ( & mut self . ambient_variance , ty:: Variance :: Contravariant ) ;
714713
715- self . relate ( * a. skip_binder ( ) , * b. skip_binder ( ) ) ?;
714+ self . relate ( a. skip_binder ( ) , b. skip_binder ( ) ) ?;
716715
717716 self . ambient_variance = variance;
718717
@@ -1010,7 +1009,7 @@ where
10101009 debug ! ( "TypeGeneralizer::binders(a={:?})" , a) ;
10111010
10121011 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 ( ) ) ?;
10141013 self . first_free_index . shift_out ( 1 ) ;
10151014 Ok ( ty:: Binder :: bind ( result) )
10161015 }
0 commit comments