Skip to content

Commit

Permalink
Add safe/unsafe to static inside extern blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
spastorino committed Jun 4, 2024
1 parent 537ce5c commit bd0f908
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion clippy_utils/src/ast_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -308,13 +308,15 @@ pub fn eq_item_kind(l: &ItemKind, r: &ItemKind) -> bool {
ty: lt,
mutability: lm,
expr: le,
safety: ls,
}),
Static(box StaticItem {
ty: rt,
mutability: rm,
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 {
defaultness: ld,
Expand Down

0 comments on commit bd0f908

Please sign in to comment.