Skip to content

Commit ae5ed9b

Browse files
Don't re-collect tokenstream twice to pretty print
1 parent 11d5216 commit ae5ed9b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/librustc_metadata/encoder.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1316,7 +1316,7 @@ impl EncodeContext<'tcx> {
13161316
let def_id = self.tcx.hir().local_def_id(macro_def.hir_id);
13171317
Entry {
13181318
kind: EntryKind::MacroDef(self.lazy(&MacroDef {
1319-
body: pprust::tts_to_string(&macro_def.body.trees().collect::<Vec<_>>()),
1319+
body: pprust::tokens_to_string(macro_def.body.clone()),
13201320
legacy: macro_def.legacy,
13211321
})),
13221322
visibility: self.lazy(&ty::Visibility::Public),

0 commit comments

Comments
 (0)