@@ -5,8 +5,8 @@ use chalk_ir::{
55 fold:: { shift:: Shift , Fold , Folder , SuperFold } ,
66 interner:: Interner ,
77 AliasTy , Binders , BoundVar , DebruijnIndex , EqGoal , Fallible , Goal , GoalData , Goals ,
8- ProgramClause , ProgramClauseData , ProgramClauseImplication , QuantifierKind , Ty , TyData , TyKind ,
9- VariableKind , VariableKinds ,
8+ ProgramClause , ProgramClauseData , ProgramClauseImplication , QuantifierKind , Ty , TyKind ,
9+ TyVariableKind , VariableKind , VariableKinds ,
1010} ;
1111
1212/// Converts a set of clauses to require only syntactic equality.
@@ -48,10 +48,11 @@ impl<'i, I: Interner> Folder<'i, I> for SynEqFolder<'i, I> {
4848 let interner = self . interner ;
4949 let bound_var = BoundVar :: new ( DebruijnIndex :: INNERMOST , self . binders_len ) ;
5050
51- let new_ty = TyData :: BoundVar ( bound_var) . intern ( interner) ;
52- match ty. data ( interner) {
53- TyData :: Alias ( AliasTy :: Projection ( _) ) | TyData :: Function ( _) => {
54- self . new_params . push ( VariableKind :: Ty ( TyKind :: General ) ) ;
51+ let new_ty = TyKind :: BoundVar ( bound_var) . intern ( interner) ;
52+ match ty. kind ( interner) {
53+ TyKind :: Alias ( AliasTy :: Projection ( _) ) | TyKind :: Function ( _) => {
54+ self . new_params
55+ . push ( VariableKind :: Ty ( TyVariableKind :: General ) ) ;
5556 self . new_goals . push (
5657 EqGoal {
5758 a : new_ty. clone ( ) . cast ( interner) ,
0 commit comments