mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-27 18:57:42 +03:00
Rollup merge of #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
This commit is contained in:
@@ -339,6 +339,7 @@ pub fn eq_item_kind(l: &ItemKind, r: &ItemKind) -> bool {
|
||||
expr: le,
|
||||
safety: ls,
|
||||
define_opaque: _,
|
||||
eii_impls: _,
|
||||
}),
|
||||
Static(box StaticItem {
|
||||
ident: ri,
|
||||
@@ -347,6 +348,7 @@ pub fn eq_item_kind(l: &ItemKind, r: &ItemKind) -> bool {
|
||||
expr: re,
|
||||
safety: rs,
|
||||
define_opaque: _,
|
||||
eii_impls: _,
|
||||
}),
|
||||
) => eq_id(*li, *ri) && lm == rm && ls == rs && eq_ty(lt, rt) && eq_expr_opt(le.as_deref(), re.as_deref()),
|
||||
(
|
||||
@@ -540,6 +542,7 @@ pub fn eq_foreign_item_kind(l: &ForeignItemKind, r: &ForeignItemKind) -> bool {
|
||||
expr: le,
|
||||
safety: ls,
|
||||
define_opaque: _,
|
||||
eii_impls: _,
|
||||
}),
|
||||
Static(box StaticItem {
|
||||
ident: ri,
|
||||
@@ -548,6 +551,7 @@ pub fn eq_foreign_item_kind(l: &ForeignItemKind, r: &ForeignItemKind) -> bool {
|
||||
expr: re,
|
||||
safety: rs,
|
||||
define_opaque: _,
|
||||
eii_impls: _,
|
||||
}),
|
||||
) => eq_id(*li, *ri) && eq_ty(lt, rt) && lm == rm && eq_expr_opt(le.as_deref(), re.as_deref()) && ls == rs,
|
||||
(
|
||||
|
||||
Reference in New Issue
Block a user