@@ -473,33 +473,27 @@ pub fn eq_item_kind(l: &ItemKind, r: &ItemKind) -> bool {
473
473
eq_id ( * li, * ri) && eq_generics ( lg, rg) && over ( lb, rb, eq_generic_bound)
474
474
} ,
475
475
(
476
- Impl ( box ast:: Impl {
477
- safety : lu,
478
- polarity : lp,
479
- defaultness : ld,
480
- constness : lc,
476
+ Impl ( ast:: Impl {
481
477
generics : lg,
482
478
of_trait : lot,
483
479
self_ty : lst,
484
480
items : li,
485
481
} ) ,
486
- Impl ( box ast:: Impl {
487
- safety : ru,
488
- polarity : rp,
489
- defaultness : rd,
490
- constness : rc,
482
+ Impl ( ast:: Impl {
491
483
generics : rg,
492
484
of_trait : rot,
493
485
self_ty : rst,
494
486
items : ri,
495
487
} ) ,
496
488
) => {
497
- matches ! ( lu, Safety :: Default ) == matches ! ( ru, Safety :: Default )
498
- && matches ! ( lp, ImplPolarity :: Positive ) == matches ! ( rp, ImplPolarity :: Positive )
499
- && eq_defaultness ( * ld, * rd)
500
- && matches ! ( lc, ast:: Const :: No ) == matches ! ( rc, ast:: Const :: No )
501
- && eq_generics ( lg, rg)
502
- && both ( lot. as_ref ( ) , rot. as_ref ( ) , |l, r| eq_path ( & l. path , & r. path ) )
489
+ eq_generics ( lg, rg)
490
+ && both ( lot. as_deref ( ) , rot. as_deref ( ) , |l, r| {
491
+ matches ! ( l. safety, Safety :: Default ) == matches ! ( r. safety, Safety :: Default )
492
+ && matches ! ( l. polarity, ImplPolarity :: Positive ) == matches ! ( r. polarity, ImplPolarity :: Positive )
493
+ && eq_defaultness ( l. defaultness , r. defaultness )
494
+ && matches ! ( l. constness, ast:: Const :: No ) == matches ! ( r. constness, ast:: Const :: No )
495
+ && eq_path ( & l. trait_ref . path , & r. trait_ref . path )
496
+ } )
503
497
&& eq_ty ( lst, rst)
504
498
&& over ( li, ri, |l, r| eq_item ( l, r, eq_assoc_item_kind) )
505
499
} ,
0 commit comments