Remove hir::Item::attrs.
This commit is contained in:
parent
5474f17011
commit
c701872a6c
32 changed files with 104 additions and 76 deletions
|
@ -2697,7 +2697,6 @@ impl ItemId {
|
|||
pub struct Item<'hir> {
|
||||
pub ident: Ident,
|
||||
pub def_id: LocalDefId,
|
||||
pub attrs: &'hir [Attribute],
|
||||
pub kind: ItemKind<'hir>,
|
||||
pub vis: Visibility<'hir>,
|
||||
pub span: Span,
|
||||
|
@ -3077,7 +3076,7 @@ mod size_asserts {
|
|||
rustc_data_structures::static_assert_size!(super::QPath<'static>, 24);
|
||||
rustc_data_structures::static_assert_size!(super::Ty<'static>, 72);
|
||||
|
||||
rustc_data_structures::static_assert_size!(super::Item<'static>, 200);
|
||||
rustc_data_structures::static_assert_size!(super::Item<'static>, 184);
|
||||
rustc_data_structures::static_assert_size!(super::TraitItem<'static>, 128);
|
||||
rustc_data_structures::static_assert_size!(super::ImplItem<'static>, 152);
|
||||
rustc_data_structures::static_assert_size!(super::ForeignItem<'static>, 136);
|
||||
|
|
|
@ -181,11 +181,10 @@ impl<HirCtx: crate::HashStableContext> HashStable<HirCtx> for ForeignItem<'_> {
|
|||
|
||||
impl<HirCtx: crate::HashStableContext> HashStable<HirCtx> for Item<'_> {
|
||||
fn hash_stable(&self, hcx: &mut HirCtx, hasher: &mut StableHasher) {
|
||||
let Item { ident, ref attrs, def_id: _, ref kind, ref vis, span } = *self;
|
||||
let Item { ident, def_id: _, ref kind, ref vis, span } = *self;
|
||||
|
||||
hcx.hash_hir_item_like(|hcx| {
|
||||
ident.name.hash_stable(hcx, hasher);
|
||||
attrs.hash_stable(hcx, hasher);
|
||||
kind.hash_stable(hcx, hasher);
|
||||
vis.hash_stable(hcx, hasher);
|
||||
span.hash_stable(hcx, hasher);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue