1
Fork 0

Rollup merge of #93746 - cjgillot:nodefii, r=nikomatsakis

Remove defaultness from ImplItem.

This information is not really used anywhere, except HIR pretty-printing. This makes ImplItem and TraitItem more similar.
This commit is contained in:
Yuki Okushi 2022-02-09 14:12:22 +09:00 committed by GitHub
commit e5ac08779b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 11 additions and 21 deletions

View file

@ -894,9 +894,6 @@ impl<'hir> LoweringContext<'_, 'hir> {
AssocItemKind::MacCall(..) => panic!("`TyMac` should have been expanded by now"),
};
// Since `default impl` is not yet implemented, this is always true in impls.
let has_value = true;
let (defaultness, _) = self.lower_defaultness(i.kind.defaultness(), has_value);
let hir_id = self.lower_node_id(i.id);
self.lower_attrs(hir_id, &i.attrs);
let item = hir::ImplItem {
@ -904,7 +901,6 @@ impl<'hir> LoweringContext<'_, 'hir> {
ident: self.lower_ident(i.ident),
generics,
vis: self.lower_visibility(&i.vis),
defaultness,
kind,
span: self.lower_span(i.span),
};