Handle safety keyword for extern block inner items

This commit is contained in:
Santiago Pastorino 2024-05-23 10:01:05 -03:00
parent 9f4a2dd147
commit 537ce5c8c6

View File

@ -451,13 +451,15 @@ pub fn eq_foreign_item_kind(l: &ForeignItemKind, r: &ForeignItemKind) -> bool {
ty: lt,
mutability: lm,
expr: le,
safety: ls,
}),
Static(box StaticForeignItem {
ty: rt,
mutability: rm,
expr: re,
safety: rs,
}),
) => lm == rm && eq_ty(lt, rt) && eq_expr_opt(le, re),
) => lm == rm && eq_ty(lt, rt) && eq_expr_opt(le, re) && ls == rs,
(
Fn(box ast::Fn {
defaultness: ld,