mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-08 01:28:18 +03:00
Don't re-collect tokenstream twice to pretty print
This commit is contained in:
@@ -1316,7 +1316,7 @@ fn encode_info_for_macro_def(&mut self, macro_def: &hir::MacroDef) -> Entry<'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::<Vec<_>>()),
|
||||
body: pprust::tokens_to_string(macro_def.body.clone()),
|
||||
legacy: macro_def.legacy,
|
||||
})),
|
||||
visibility: self.lazy(&ty::Visibility::Public),
|
||||
|
||||
Reference in New Issue
Block a user