about summary refs log tree commit diff
path: root/src/libsyntax_expand
diff options
context:
space:
mode:
authorMazdak Farrokhzad <twingoow@gmail.com>2019-12-07 03:07:35 +0100
committerMazdak Farrokhzad <twingoow@gmail.com>2019-12-23 13:55:04 +0100
commit8456c403e1e79220d898b29074ce41dfeb752b08 (patch)
tree20f95a28e7691e6d3c99ee4b3b1ba22468ac3b40 /src/libsyntax_expand
parentefdea63c432fb1c88000bd1e12566641705fdb13 (diff)
downloadrust-8456c403e1e79220d898b29074ce41dfeb752b08.tar.gz
rust-8456c403e1e79220d898b29074ce41dfeb752b08.zip
extract parse_not_expr
Diffstat (limited to 'src/libsyntax_expand')
-rw-r--r--src/libsyntax_expand/expand.rs6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/libsyntax_expand/expand.rs b/src/libsyntax_expand/expand.rs
index b9b449d1779..4df51ff41f3 100644
--- a/src/libsyntax_expand/expand.rs
+++ b/src/libsyntax_expand/expand.rs
@@ -904,10 +904,8 @@ pub fn ensure_complete_parse<'a>(
     span: Span,
 ) {
     if this.token != token::Eof {
-        let msg = format!(
-            "macro expansion ignores token `{}` and any following",
-            this.this_token_to_string()
-        );
+        let token = pprust::token_to_string(&this.token);
+        let msg = format!("macro expansion ignores token `{}` and any following", token);
         // Avoid emitting backtrace info twice.
         let def_site_span = this.token.span.with_ctxt(SyntaxContext::root());
         let mut err = this.struct_span_err(def_site_span, &msg);