Skip to content

Commit a799249

Browse files
author
Gernot Ohner
committed
Add additional branches to hir_utils::eq_expr
1 parent 033c763 commit a799249

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

clippy_utils/src/hir_utils.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -346,6 +346,12 @@ impl HirEqInterExpr<'_, '_, '_> {
346346
(&ExprKind::OffsetOf(l_container, l_fields), &ExprKind::OffsetOf(r_container, r_fields)) => {
347347
self.eq_ty(l_container, r_container) && over(l_fields, r_fields, |l, r| l.name == r.name)
348348
},
349+
(&ExprKind::ConstBlock(_), _)
350+
| (&ExprKind::Closure(_), _)
351+
| (&ExprKind::Become(_), _)
352+
| (&ExprKind::InlineAsm(_), _)
353+
| (&ExprKind::Yield(_, _), _)
354+
| (&ExprKind::Err(_), _) => false,
349355
_ => false,
350356
};
351357
(is_eq && (!self.should_ignore(left) || !self.should_ignore(right)))

0 commit comments

Comments
 (0)