Skip to content

Commit 7383a61

Browse files
committed
add eq constraints on associated constants
1 parent 55fa2ea commit 7383a61

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

clippy_utils/src/ast_utils.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -645,12 +645,13 @@ pub fn eq_generic_bound(l: &GenericBound, r: &GenericBound) -> bool {
645645
}
646646
}
647647

648-
pub fn eq_assoc_constraint(l: &AssocTyConstraint, r: &AssocTyConstraint) -> bool {
649-
use AssocTyConstraintKind::*;
648+
pub fn eq_assoc_constraint(l: &AssocConstraint, r: &AssocConstraint) -> bool {
649+
use AssocConstraintKind::*;
650650
eq_id(l.ident, r.ident)
651651
&& match (&l.kind, &r.kind) {
652652
(Equality { ty: l }, Equality { ty: r }) => eq_ty(l, r),
653653
(Bound { bounds: l }, Bound { bounds: r }) => over(l, r, eq_generic_bound),
654+
(ConstEquality { c: l }, ConstEquality { c: r }) => eq_anon_const(l, r),
654655
_ => false,
655656
}
656657
}

0 commit comments

Comments
 (0)