Skip to content

Commit b23bc0b

Browse files
Rollup merge of rust-lang#154193 - JonathanBrouwer:external-static, r=jdonszelmann
Implement EII for statics This PR implements EII for statics. I've tried to mirror the implementation for functions in a few places, this causes some duplicate code but I'm also not really sure whether there's a clean way to merge the implementations. This does not implement defaults for static EIIs yet, I will do that in a followup PR
2 parents fb16ce7 + f148236 commit b23bc0b

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

  • clippy_utils/src/ast_utils

clippy_utils/src/ast_utils/mod.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,7 @@ pub fn eq_item_kind(l: &ItemKind, r: &ItemKind) -> bool {
339339
expr: le,
340340
safety: ls,
341341
define_opaque: _,
342+
eii_impls: _,
342343
}),
343344
Static(box StaticItem {
344345
ident: ri,
@@ -347,6 +348,7 @@ pub fn eq_item_kind(l: &ItemKind, r: &ItemKind) -> bool {
347348
expr: re,
348349
safety: rs,
349350
define_opaque: _,
351+
eii_impls: _,
350352
}),
351353
) => eq_id(*li, *ri) && lm == rm && ls == rs && eq_ty(lt, rt) && eq_expr_opt(le.as_deref(), re.as_deref()),
352354
(
@@ -540,6 +542,7 @@ pub fn eq_foreign_item_kind(l: &ForeignItemKind, r: &ForeignItemKind) -> bool {
540542
expr: le,
541543
safety: ls,
542544
define_opaque: _,
545+
eii_impls: _,
543546
}),
544547
Static(box StaticItem {
545548
ident: ri,
@@ -548,6 +551,7 @@ pub fn eq_foreign_item_kind(l: &ForeignItemKind, r: &ForeignItemKind) -> bool {
548551
expr: re,
549552
safety: rs,
550553
define_opaque: _,
554+
eii_impls: _,
551555
}),
552556
) => eq_id(*li, *ri) && eq_ty(lt, rt) && lm == rm && eq_expr_opt(le.as_deref(), re.as_deref()) && ls == rs,
553557
(

0 commit comments

Comments
 (0)