@@ -231,15 +231,15 @@ pub fn eq_item_kind(l: &ItemKind, r: &ItemKind) -> bool {
231231 ( Use ( l) , Use ( r) ) => eq_use_tree ( l, r) ,
232232 ( Static ( lt, lm, le) , Static ( rt, rm, re) ) => lm == rm && eq_ty ( lt, rt) && eq_expr_opt ( le, re) ,
233233 ( Const ( ld, lt, le) , Const ( rd, rt, re) ) => eq_defaultness ( * ld, * rd) && eq_ty ( lt, rt) && eq_expr_opt ( le, re) ,
234- ( Fn ( ld, lf, lg, lb) , Fn ( rd, rf, rg, rb) ) => {
234+ ( Fn ( box FnKind ( ld, lf, lg, lb) ) , Fn ( box FnKind ( rd, rf, rg, rb) ) ) => {
235235 eq_defaultness ( * ld, * rd) && eq_fn_sig ( lf, rf) && eq_generics ( lg, rg) && both ( lb, rb, |l, r| eq_block ( l, r) )
236236 } ,
237237 ( Mod ( l) , Mod ( r) ) => l. inline == r. inline && over ( & l. items , & r. items , |l, r| eq_item ( l, r, eq_item_kind) ) ,
238238 ( ForeignMod ( l) , ForeignMod ( r) ) => {
239239 both ( & l. abi , & r. abi , |l, r| eq_str_lit ( l, r) )
240240 && over ( & l. items , & r. items , |l, r| eq_item ( l, r, eq_foreign_item_kind) )
241241 } ,
242- ( TyAlias ( ld, lg, lb, lt) , TyAlias ( rd, rg, rb, rt) ) => {
242+ ( TyAlias ( box TyAliasKind ( ld, lg, lb, lt) ) , TyAlias ( box TyAliasKind ( rd, rg, rb, rt) ) ) => {
243243 eq_defaultness ( * ld, * rd)
244244 && eq_generics ( lg, rg)
245245 && over ( lb, rb, |l, r| eq_generic_bound ( l, r) )
@@ -251,7 +251,7 @@ pub fn eq_item_kind(l: &ItemKind, r: &ItemKind) -> bool {
251251 ( Struct ( lv, lg) , Struct ( rv, rg) ) | ( Union ( lv, lg) , Union ( rv, rg) ) => {
252252 eq_variant_data ( lv, rv) && eq_generics ( lg, rg)
253253 } ,
254- ( Trait ( la, lu, lg, lb, li) , Trait ( ra, ru, rg, rb, ri) ) => {
254+ ( Trait ( box TraitKind ( la, lu, lg, lb, li) ) , Trait ( box TraitKind ( ra, ru, rg, rb, ri) ) ) => {
255255 la == ra
256256 && matches ! ( lu, Unsafe :: No ) == matches ! ( ru, Unsafe :: No )
257257 && eq_generics ( lg, rg)
@@ -260,7 +260,7 @@ pub fn eq_item_kind(l: &ItemKind, r: &ItemKind) -> bool {
260260 } ,
261261 ( TraitAlias ( lg, lb) , TraitAlias ( rg, rb) ) => eq_generics ( lg, rg) && over ( lb, rb, |l, r| eq_generic_bound ( l, r) ) ,
262262 (
263- Impl {
263+ Impl ( box ImplKind {
264264 unsafety : lu,
265265 polarity : lp,
266266 defaultness : ld,
@@ -269,8 +269,8 @@ pub fn eq_item_kind(l: &ItemKind, r: &ItemKind) -> bool {
269269 of_trait : lot,
270270 self_ty : lst,
271271 items : li,
272- } ,
273- Impl {
272+ } ) ,
273+ Impl ( box ImplKind {
274274 unsafety : ru,
275275 polarity : rp,
276276 defaultness : rd,
@@ -279,7 +279,7 @@ pub fn eq_item_kind(l: &ItemKind, r: &ItemKind) -> bool {
279279 of_trait : rot,
280280 self_ty : rst,
281281 items : ri,
282- } ,
282+ } ) ,
283283 ) => {
284284 matches ! ( lu, Unsafe :: No ) == matches ! ( ru, Unsafe :: No )
285285 && matches ! ( lp, ImplPolarity :: Positive ) == matches ! ( rp, ImplPolarity :: Positive )
@@ -300,10 +300,10 @@ pub fn eq_foreign_item_kind(l: &ForeignItemKind, r: &ForeignItemKind) -> bool {
300300 use ForeignItemKind :: * ;
301301 match ( l, r) {
302302 ( Static ( lt, lm, le) , Static ( rt, rm, re) ) => lm == rm && eq_ty ( lt, rt) && eq_expr_opt ( le, re) ,
303- ( Fn ( ld, lf, lg, lb) , Fn ( rd, rf, rg, rb) ) => {
303+ ( Fn ( box FnKind ( ld, lf, lg, lb) ) , Fn ( box FnKind ( rd, rf, rg, rb) ) ) => {
304304 eq_defaultness ( * ld, * rd) && eq_fn_sig ( lf, rf) && eq_generics ( lg, rg) && both ( lb, rb, |l, r| eq_block ( l, r) )
305305 } ,
306- ( TyAlias ( ld, lg, lb, lt) , TyAlias ( rd, rg, rb, rt) ) => {
306+ ( TyAlias ( box TyAliasKind ( ld, lg, lb, lt) ) , TyAlias ( box TyAliasKind ( rd, rg, rb, rt) ) ) => {
307307 eq_defaultness ( * ld, * rd)
308308 && eq_generics ( lg, rg)
309309 && over ( lb, rb, |l, r| eq_generic_bound ( l, r) )
@@ -318,10 +318,10 @@ pub fn eq_assoc_item_kind(l: &AssocItemKind, r: &AssocItemKind) -> bool {
318318 use AssocItemKind :: * ;
319319 match ( l, r) {
320320 ( Const ( ld, lt, le) , Const ( rd, rt, re) ) => eq_defaultness ( * ld, * rd) && eq_ty ( lt, rt) && eq_expr_opt ( le, re) ,
321- ( Fn ( ld, lf, lg, lb) , Fn ( rd, rf, rg, rb) ) => {
321+ ( Fn ( box FnKind ( ld, lf, lg, lb) ) , Fn ( box FnKind ( rd, rf, rg, rb) ) ) => {
322322 eq_defaultness ( * ld, * rd) && eq_fn_sig ( lf, rf) && eq_generics ( lg, rg) && both ( lb, rb, |l, r| eq_block ( l, r) )
323323 } ,
324- ( TyAlias ( ld, lg, lb, lt) , TyAlias ( rd, rg, rb, rt) ) => {
324+ ( TyAlias ( box TyAliasKind ( ld, lg, lb, lt) ) , TyAlias ( box TyAliasKind ( rd, rg, rb, rt) ) ) => {
325325 eq_defaultness ( * ld, * rd)
326326 && eq_generics ( lg, rg)
327327 && over ( lb, rb, |l, r| eq_generic_bound ( l, r) )
0 commit comments