@@ -500,7 +500,7 @@ struct Generalizer<'cx, 'tcx> {
500500
501501 param_env : ty:: ParamEnv < ' tcx > ,
502502
503- cache : MiniMap < ( Ty < ' tcx > , Ty < ' tcx > ) , RelateResult < ' tcx , Ty < ' tcx > > > ,
503+ cache : MiniMap < Ty < ' tcx > , RelateResult < ' tcx , Ty < ' tcx > > > ,
504504}
505505
506506/// Result from a generalization operation. This includes
@@ -598,8 +598,7 @@ impl TypeRelation<'tcx> for Generalizer<'_, 'tcx> {
598598 fn tys ( & mut self , t : Ty < ' tcx > , t2 : Ty < ' tcx > ) -> RelateResult < ' tcx , Ty < ' tcx > > {
599599 assert_eq ! ( t, t2) ; // we are abusing TypeRelation here; both LHS and RHS ought to be ==
600600
601- let cache_key = ( t, t2) ;
602- if let Some ( result) = self . cache . get ( & cache_key) {
601+ if let Some ( result) = self . cache . get ( & t) {
603602 return result. clone ( ) ;
604603 }
605604 debug ! ( "generalize: t={:?}" , t) ;
@@ -667,7 +666,7 @@ impl TypeRelation<'tcx> for Generalizer<'_, 'tcx> {
667666 _ => relate:: super_relate_tys ( self , t, t) ,
668667 } ;
669668
670- self . cache . insert ( cache_key , result. clone ( ) ) ;
669+ self . cache . insert ( t , result. clone ( ) ) ;
671670 return result;
672671 }
673672
0 commit comments