diff --git a/src/librustc_metadata/encoder.rs b/src/librustc_metadata/encoder.rs index c7f57be6426..567b6b1a891 100644 --- a/src/librustc_metadata/encoder.rs +++ b/src/librustc_metadata/encoder.rs @@ -1316,7 +1316,7 @@ impl EncodeContext<'tcx> { let def_id = self.tcx.hir().local_def_id(macro_def.hir_id); Entry { kind: EntryKind::MacroDef(self.lazy(&MacroDef { - body: pprust::tts_to_string(¯o_def.body.trees().collect::>()), + body: pprust::tokens_to_string(macro_def.body.clone()), legacy: macro_def.legacy, })), visibility: self.lazy(&ty::Visibility::Public),