Skip to content

Commit bd0f908

Browse files
committed
Add safe/unsafe to static inside extern blocks
1 parent 537ce5c commit bd0f908

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

clippy_utils/src/ast_utils.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,13 +308,15 @@ pub fn eq_item_kind(l: &ItemKind, r: &ItemKind) -> bool {
308308
ty: lt,
309309
mutability: lm,
310310
expr: le,
311+
safety: ls,
311312
}),
312313
Static(box StaticItem {
313314
ty: rt,
314315
mutability: rm,
315316
expr: re,
317+
safety: rs,
316318
}),
317-
) => lm == rm && eq_ty(lt, rt) && eq_expr_opt(le, re),
319+
) => lm == rm && ls == rs && eq_ty(lt, rt) && eq_expr_opt(le, re),
318320
(
319321
Const(box ConstItem {
320322
defaultness: ld,

0 commit comments

Comments
 (0)