Skip to content

Commit 5aa3e11

Browse files
Move trait bound modifiers into ast::PolyTraitRef
1 parent 360d86e commit 5aa3e11

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

‎clippy_utils/src/ast_utils.rs‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -783,7 +783,8 @@ pub fn eq_str_lit(l: &StrLit, r: &StrLit) -> bool {
783783
}
784784

785785
pubfneq_poly_ref_trait(l:&PolyTraitRef,r:&PolyTraitRef) -> bool{
786-
eq_path(&l.trait_ref.path,&r.trait_ref.path)
786+
l.modifiers == r.modifiers
787+
&& eq_path(&l.trait_ref.path,&r.trait_ref.path)
787788
&& over(&l.bound_generic_params,&r.bound_generic_params, |l, r| {
788789
eq_generic_param(l, r)
789790
})
@@ -817,7 +818,7 @@ pub fn eq_generic_param(l: &GenericParam, r: &GenericParam) -> bool {
817818
pubfneq_generic_bound(l:&GenericBound,r:&GenericBound) -> bool{
818819
useGenericBound::*;
819820
match(l, r){
820-
(Trait(ptr1, tbm1),Trait(ptr2, tbm2)) => tbm1 == tbm2 &&eq_poly_ref_trait(ptr1, ptr2),
821+
(Trait(ptr1),Trait(ptr2)) => eq_poly_ref_trait(ptr1, ptr2),
821822
(Outlives(l),Outlives(r)) => eq_id(l.ident, r.ident),
822823
_ => false,
823824
}

0 commit comments

Comments
 (0)