Skip to content

Commit

Permalink
Auto merge of rust-lang#124482 - spastorino:unsafe-extern-blocks, r=o…
Browse files Browse the repository at this point in the history
…li-obk

Unsafe extern blocks

This implements RFC 3484.

Tracking issue rust-lang#123743 and RFC rust-lang/rfcs#3484

This is better reviewed commit by commit.
  • Loading branch information
bors committed Jun 6, 2024
2 parents 38de6e1 + bd0f908 commit ea13653
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions 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 Expand Up @@ -451,13 +453,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,
Expand Down

0 comments on commit ea13653

Please sign in to comment.