Add StaticForeignItem and use it on ForeignItemKind

This commit is contained in:
Santiago Pastorino 2024-04-29 11:27:14 -03:00
parent ec9ddc7b7a
commit 9276ce1cf3

View File

@ -446,7 +446,18 @@ pub fn eq_item_kind(l: &ItemKind, r: &ItemKind) -> bool {
pub fn eq_foreign_item_kind(l: &ForeignItemKind, r: &ForeignItemKind) -> bool { pub fn eq_foreign_item_kind(l: &ForeignItemKind, r: &ForeignItemKind) -> bool {
use ForeignItemKind::*; use ForeignItemKind::*;
match (l, r) { match (l, r) {
(Static(lt, lm, le), Static(rt, rm, re)) => lm == rm && eq_ty(lt, rt) && eq_expr_opt(le, re), (
Static(box StaticForeignItem {
ty: lt,
mutability: lm,
expr: le,
}),
Static(box StaticForeignItem {
ty: rt,
mutability: rm,
expr: re,
}),
) => lm == rm && eq_ty(lt, rt) && eq_expr_opt(le, re),
( (
Fn(box ast::Fn { Fn(box ast::Fn {
defaultness: ld, defaultness: ld,