Add safe/unsafe to static inside extern blocks

This commit is contained in:
Santiago Pastorino 2024-05-07 14:43:23 +02:00
parent 537ce5c8c6
commit bd0f908242

View File

@ -308,13 +308,15 @@ pub fn eq_item_kind(l: &ItemKind, r: &ItemKind) -> bool {
ty: lt, ty: lt,
mutability: lm, mutability: lm,
expr: le, expr: le,
safety: ls,
}), }),
Static(box StaticItem { Static(box StaticItem {
ty: rt, ty: rt,
mutability: rm, mutability: rm,
expr: re, expr: re,
safety: rs,
}), }),
) => lm == rm && eq_ty(lt, rt) && eq_expr_opt(le, re), ) => lm == rm && ls == rs && eq_ty(lt, rt) && eq_expr_opt(le, re),
( (
Const(box ConstItem { Const(box ConstItem {
defaultness: ld, defaultness: ld,