@@ -85,11 +85,11 @@ impl<'tcx> Children {
8585 /// Insert an impl into this set of children without comparing to any existing impls.
8686 fn insert_blindly ( & mut self , tcx : TyCtxt < ' tcx > , impl_def_id : DefId ) {
8787 let trait_ref = tcx. impl_trait_ref ( impl_def_id) . unwrap ( ) ;
88- if let Some ( sty ) = fast_reject:: simplify_type ( tcx, trait_ref. self_ty ( ) , false ) {
89- debug ! ( "insert_blindly: impl_def_id={:?} sty ={:?}" , impl_def_id, sty ) ;
90- self . nonblanket_impls . entry ( sty ) . or_default ( ) . push ( impl_def_id)
88+ if let Some ( st ) = fast_reject:: simplify_type ( tcx, trait_ref. self_ty ( ) , false ) {
89+ debug ! ( "insert_blindly: impl_def_id={:?} st ={:?}" , impl_def_id, st ) ;
90+ self . nonblanket_impls . entry ( st ) . or_default ( ) . push ( impl_def_id)
9191 } else {
92- debug ! ( "insert_blindly: impl_def_id={:?} sty =None" , impl_def_id) ;
92+ debug ! ( "insert_blindly: impl_def_id={:?} st =None" , impl_def_id) ;
9393 self . blanket_impls . push ( impl_def_id)
9494 }
9595 }
@@ -100,11 +100,11 @@ impl<'tcx> Children {
100100 fn remove_existing ( & mut self , tcx : TyCtxt < ' tcx > , impl_def_id : DefId ) {
101101 let trait_ref = tcx. impl_trait_ref ( impl_def_id) . unwrap ( ) ;
102102 let vec: & mut Vec < DefId > ;
103- if let Some ( sty ) = fast_reject:: simplify_type ( tcx, trait_ref. self_ty ( ) , false ) {
104- debug ! ( "remove_existing: impl_def_id={:?} sty ={:?}" , impl_def_id, sty ) ;
105- vec = self . nonblanket_impls . get_mut ( & sty ) . unwrap ( ) ;
103+ if let Some ( st ) = fast_reject:: simplify_type ( tcx, trait_ref. self_ty ( ) , false ) {
104+ debug ! ( "remove_existing: impl_def_id={:?} st ={:?}" , impl_def_id, st ) ;
105+ vec = self . nonblanket_impls . get_mut ( & st ) . unwrap ( ) ;
106106 } else {
107- debug ! ( "remove_existing: impl_def_id={:?} sty =None" , impl_def_id) ;
107+ debug ! ( "remove_existing: impl_def_id={:?} st =None" , impl_def_id) ;
108108 vec = & mut self . blanket_impls ;
109109 }
110110
@@ -130,7 +130,7 @@ impl<'tcx> Children {
130130 ) ;
131131
132132 let possible_siblings = match simplified_self {
133- Some ( sty ) => PotentialSiblings :: Filtered ( self . filtered ( sty ) ) ,
133+ Some ( st ) => PotentialSiblings :: Filtered ( self . filtered ( st ) ) ,
134134 None => PotentialSiblings :: Unfiltered ( self . iter ( ) ) ,
135135 } ;
136136
0 commit comments