diff options
Diffstat (limited to 'src/librustc_back/svh.rs')
| -rw-r--r-- | src/librustc_back/svh.rs | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/librustc_back/svh.rs b/src/librustc_back/svh.rs index 116cff49153..98fa659ba55 100644 --- a/src/librustc_back/svh.rs +++ b/src/librustc_back/svh.rs @@ -340,14 +340,17 @@ mod svh_visitor { // expensive; a direct content-based hash on token // trees might be faster. Implementing this is far // easier in short term. - let macro_defn_as_string = - pprust::to_string(|pp_state| pp_state.print_mac(macro)); + let macro_defn_as_string = pprust::to_string(|pp_state| { + pp_state.print_mac(macro, token::Paren) + }); macro_defn_as_string.hash(self.st); } else { // It is not possible to observe any kind of macro // invocation at this stage except `macro_rules!`. panic!("reached macro somehow: {}", - pprust::to_string(|pp_state| pp_state.print_mac(macro))); + pprust::to_string(|pp_state| { + pp_state.print_mac(macro, token::Paren) + })); } visit::walk_mac(self, macro); |
