mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-11 07:34:18 +00:00
Add additional branches to hir_utils::eq_expr
This commit is contained in:
parent
033c763943
commit
a799249766
1 changed files with 6 additions and 0 deletions
|
@ -346,6 +346,12 @@ impl HirEqInterExpr<'_, '_, '_> {
|
||||||
(&ExprKind::OffsetOf(l_container, l_fields), &ExprKind::OffsetOf(r_container, r_fields)) => {
|
(&ExprKind::OffsetOf(l_container, l_fields), &ExprKind::OffsetOf(r_container, r_fields)) => {
|
||||||
self.eq_ty(l_container, r_container) && over(l_fields, r_fields, |l, r| l.name == r.name)
|
self.eq_ty(l_container, r_container) && over(l_fields, r_fields, |l, r| l.name == r.name)
|
||||||
},
|
},
|
||||||
|
(&ExprKind::ConstBlock(_), _)
|
||||||
|
| (&ExprKind::Closure(_), _)
|
||||||
|
| (&ExprKind::Become(_), _)
|
||||||
|
| (&ExprKind::InlineAsm(_), _)
|
||||||
|
| (&ExprKind::Yield(_, _), _)
|
||||||
|
| (&ExprKind::Err(_), _) => false,
|
||||||
_ => false,
|
_ => false,
|
||||||
};
|
};
|
||||||
(is_eq && (!self.should_ignore(left) || !self.should_ignore(right)))
|
(is_eq && (!self.should_ignore(left) || !self.should_ignore(right)))
|
||||||
|
|
Loading…
Reference in a new issue