Remove hir::ForeignItem::attrs.

This commit is contained in:
Camille GILLOT 2020-11-27 00:35:22 +01:00
parent c298744da7
commit 4bab93a039
6 changed files with 11 additions and 11 deletions

View file

@ -2916,7 +2916,6 @@ pub struct ForeignItemRef<'hir> {
#[derive(Debug)]
pub struct ForeignItem<'hir> {
pub ident: Ident,
pub attrs: &'hir [Attribute],
pub kind: ForeignItemKind<'hir>,
pub def_id: LocalDefId,
pub span: Span,
@ -3083,5 +3082,5 @@ mod size_asserts {
rustc_data_structures::static_assert_size!(super::Item<'static>, 200);
rustc_data_structures::static_assert_size!(super::TraitItem<'static>, 144);
rustc_data_structures::static_assert_size!(super::ImplItem<'static>, 168);
rustc_data_structures::static_assert_size!(super::ForeignItem<'static>, 152);
rustc_data_structures::static_assert_size!(super::ForeignItem<'static>, 136);
}

View file

@ -178,11 +178,10 @@ impl<HirCtx: crate::HashStableContext> HashStable<HirCtx> for ImplItem<'_> {
impl<HirCtx: crate::HashStableContext> HashStable<HirCtx> for ForeignItem<'_> {
fn hash_stable(&self, hcx: &mut HirCtx, hasher: &mut StableHasher) {
let ForeignItem { def_id: _, ident, ref attrs, ref kind, span, ref vis } = *self;
let ForeignItem { def_id: _, ident, ref kind, span, ref vis } = *self;
hcx.hash_hir_item_like(|hcx| {
ident.name.hash_stable(hcx, hasher);
attrs.hash_stable(hcx, hasher);
kind.hash_stable(hcx, hasher);
span.hash_stable(hcx, hasher);
vis.hash_stable(hcx, hasher);