@@ -473,33 +473,27 @@ pub fn eq_item_kind(l: &ItemKind, r: &ItemKind) -> bool {
473473 eq_id ( * li, * ri) && eq_generics ( lg, rg) && over ( lb, rb, eq_generic_bound)
474474 } ,
475475 (
476- Impl ( box ast:: Impl {
477- safety : lu,
478- polarity : lp,
479- defaultness : ld,
480- constness : lc,
476+ Impl ( ast:: Impl {
481477 generics : lg,
482478 of_trait : lot,
483479 self_ty : lst,
484480 items : li,
485481 } ) ,
486- Impl ( box ast:: Impl {
487- safety : ru,
488- polarity : rp,
489- defaultness : rd,
490- constness : rc,
482+ Impl ( ast:: Impl {
491483 generics : rg,
492484 of_trait : rot,
493485 self_ty : rst,
494486 items : ri,
495487 } ) ,
496488 ) => {
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+ } )
503497 && eq_ty ( lst, rst)
504498 && over ( li, ri, |l, r| eq_item ( l, r, eq_assoc_item_kind) )
505499 } ,
0 commit comments