@@ -231,15 +231,15 @@ pub fn eq_item_kind(l: &ItemKind, r: &ItemKind) -> bool {
231
231
( Use ( l) , Use ( r) ) => eq_use_tree ( l, r) ,
232
232
( Static ( lt, lm, le) , Static ( rt, rm, re) ) => lm == rm && eq_ty ( lt, rt) && eq_expr_opt ( le, re) ,
233
233
( 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) ) ) => {
235
235
eq_defaultness ( * ld, * rd) && eq_fn_sig ( lf, rf) && eq_generics ( lg, rg) && both ( lb, rb, |l, r| eq_block ( l, r) )
236
236
} ,
237
237
( Mod ( l) , Mod ( r) ) => l. inline == r. inline && over ( & l. items , & r. items , |l, r| eq_item ( l, r, eq_item_kind) ) ,
238
238
( ForeignMod ( l) , ForeignMod ( r) ) => {
239
239
both ( & l. abi , & r. abi , |l, r| eq_str_lit ( l, r) )
240
240
&& over ( & l. items , & r. items , |l, r| eq_item ( l, r, eq_foreign_item_kind) )
241
241
} ,
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) ) ) => {
243
243
eq_defaultness ( * ld, * rd)
244
244
&& eq_generics ( lg, rg)
245
245
&& over ( lb, rb, |l, r| eq_generic_bound ( l, r) )
@@ -251,7 +251,7 @@ pub fn eq_item_kind(l: &ItemKind, r: &ItemKind) -> bool {
251
251
( Struct ( lv, lg) , Struct ( rv, rg) ) | ( Union ( lv, lg) , Union ( rv, rg) ) => {
252
252
eq_variant_data ( lv, rv) && eq_generics ( lg, rg)
253
253
} ,
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) ) ) => {
255
255
la == ra
256
256
&& matches ! ( lu, Unsafe :: No ) == matches ! ( ru, Unsafe :: No )
257
257
&& eq_generics ( lg, rg)
@@ -260,7 +260,7 @@ pub fn eq_item_kind(l: &ItemKind, r: &ItemKind) -> bool {
260
260
} ,
261
261
( TraitAlias ( lg, lb) , TraitAlias ( rg, rb) ) => eq_generics ( lg, rg) && over ( lb, rb, |l, r| eq_generic_bound ( l, r) ) ,
262
262
(
263
- Impl {
263
+ Impl ( box ImplKind {
264
264
unsafety : lu,
265
265
polarity : lp,
266
266
defaultness : ld,
@@ -269,8 +269,8 @@ pub fn eq_item_kind(l: &ItemKind, r: &ItemKind) -> bool {
269
269
of_trait : lot,
270
270
self_ty : lst,
271
271
items : li,
272
- } ,
273
- Impl {
272
+ } ) ,
273
+ Impl ( box ImplKind {
274
274
unsafety : ru,
275
275
polarity : rp,
276
276
defaultness : rd,
@@ -279,7 +279,7 @@ pub fn eq_item_kind(l: &ItemKind, r: &ItemKind) -> bool {
279
279
of_trait : rot,
280
280
self_ty : rst,
281
281
items : ri,
282
- } ,
282
+ } ) ,
283
283
) => {
284
284
matches ! ( lu, Unsafe :: No ) == matches ! ( ru, Unsafe :: No )
285
285
&& matches ! ( lp, ImplPolarity :: Positive ) == matches ! ( rp, ImplPolarity :: Positive )
@@ -300,10 +300,10 @@ pub fn eq_foreign_item_kind(l: &ForeignItemKind, r: &ForeignItemKind) -> bool {
300
300
use ForeignItemKind :: * ;
301
301
match ( l, r) {
302
302
( 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) ) ) => {
304
304
eq_defaultness ( * ld, * rd) && eq_fn_sig ( lf, rf) && eq_generics ( lg, rg) && both ( lb, rb, |l, r| eq_block ( l, r) )
305
305
} ,
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) ) ) => {
307
307
eq_defaultness ( * ld, * rd)
308
308
&& eq_generics ( lg, rg)
309
309
&& 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 {
318
318
use AssocItemKind :: * ;
319
319
match ( l, r) {
320
320
( 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) ) ) => {
322
322
eq_defaultness ( * ld, * rd) && eq_fn_sig ( lf, rf) && eq_generics ( lg, rg) && both ( lb, rb, |l, r| eq_block ( l, r) )
323
323
} ,
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) ) ) => {
325
325
eq_defaultness ( * ld, * rd)
326
326
&& eq_generics ( lg, rg)
327
327
&& over ( lb, rb, |l, r| eq_generic_bound ( l, r) )
0 commit comments