1
Fork 0

Only store a LocalDefId in hir::MacroDef.

This commit is contained in:
Camille GILLOT 2021-01-31 18:20:18 +01:00
parent ff14cac621
commit c4e7427081
16 changed files with 47 additions and 29 deletions

View file

@ -1494,7 +1494,7 @@ impl EncodeContext<'a, 'tcx> {
/// Serialize the text of exported macros
fn encode_info_for_macro_def(&mut self, macro_def: &hir::MacroDef<'_>) {
let def_id = self.tcx.hir().local_def_id(macro_def.hir_id).to_def_id();
let def_id = macro_def.def_id.to_def_id();
record!(self.tables.kind[def_id] <- EntryKind::MacroDef(self.lazy(macro_def.ast.clone())));
self.encode_ident_span(def_id, macro_def.ident);
}