Remove defaultness from ImplItem.
This commit is contained in:
parent
686663a49e
commit
710662c8ac
8 changed files with 11 additions and 21 deletions
|
@ -2112,7 +2112,6 @@ pub struct ImplItem<'hir> {
|
|||
pub ident: Ident,
|
||||
pub def_id: LocalDefId,
|
||||
pub vis: Visibility<'hir>,
|
||||
pub defaultness: Defaultness,
|
||||
pub generics: Generics<'hir>,
|
||||
pub kind: ImplItemKind<'hir>,
|
||||
pub span: Span,
|
||||
|
@ -3304,6 +3303,6 @@ mod size_asserts {
|
|||
|
||||
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::ImplItem<'static>, 144);
|
||||
rustc_data_structures::static_assert_size!(super::ForeignItem<'static>, 136);
|
||||
}
|
||||
|
|
|
@ -1020,12 +1020,10 @@ pub fn walk_trait_item_ref<'v, V: Visitor<'v>>(visitor: &mut V, trait_item_ref:
|
|||
|
||||
pub fn walk_impl_item<'v, V: Visitor<'v>>(visitor: &mut V, impl_item: &'v ImplItem<'v>) {
|
||||
// N.B., deliberately force a compilation error if/when new fields are added.
|
||||
let ImplItem { def_id: _, ident, ref vis, ref defaultness, ref generics, ref kind, span: _ } =
|
||||
*impl_item;
|
||||
let ImplItem { def_id: _, ident, ref vis, ref generics, ref kind, span: _ } = *impl_item;
|
||||
|
||||
visitor.visit_ident(ident);
|
||||
visitor.visit_vis(vis);
|
||||
visitor.visit_defaultness(defaultness);
|
||||
visitor.visit_generics(generics);
|
||||
match *kind {
|
||||
ImplItemKind::Const(ref ty, body) => {
|
||||
|
|
|
@ -164,13 +164,11 @@ impl<HirCtx: crate::HashStableContext> HashStable<HirCtx> for TraitItem<'_> {
|
|||
|
||||
impl<HirCtx: crate::HashStableContext> HashStable<HirCtx> for ImplItem<'_> {
|
||||
fn hash_stable(&self, hcx: &mut HirCtx, hasher: &mut StableHasher) {
|
||||
let ImplItem { def_id: _, ident, ref vis, defaultness, ref generics, ref kind, span } =
|
||||
*self;
|
||||
let ImplItem { def_id: _, ident, ref vis, ref generics, ref kind, span } = *self;
|
||||
|
||||
hcx.hash_hir_item_like(|hcx| {
|
||||
ident.name.hash_stable(hcx, hasher);
|
||||
vis.hash_stable(hcx, hasher);
|
||||
defaultness.hash_stable(hcx, hasher);
|
||||
generics.hash_stable(hcx, hasher);
|
||||
kind.hash_stable(hcx, hasher);
|
||||
span.hash_stable(hcx, hasher);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue