diff options
| author | Esteban Küber <esteban@kuber.com.ar> | 2017-04-24 16:27:07 -0700 |
|---|---|---|
| committer | Esteban Küber <esteban@kuber.com.ar> | 2017-05-05 15:51:48 -0700 |
| commit | 56411443f2421e6726413c212a697a45d45ddfa1 (patch) | |
| tree | a640e20d31181af77f9f7f3a5ba6fa70475ce84b /src/libsyntax/ext/tt | |
| parent | 96e2c34286099eea4f51daaadbb82a8fbe99e0f6 (diff) | |
| download | rust-56411443f2421e6726413c212a697a45d45ddfa1.tar.gz rust-56411443f2421e6726413c212a697a45d45ddfa1.zip | |
Use diagnostics for trace_macro instead of println
Diffstat (limited to 'src/libsyntax/ext/tt')
| -rw-r--r-- | src/libsyntax/ext/tt/macro_rules.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/libsyntax/ext/tt/macro_rules.rs b/src/libsyntax/ext/tt/macro_rules.rs index be979960725..46c49ffb24c 100644 --- a/src/libsyntax/ext/tt/macro_rules.rs +++ b/src/libsyntax/ext/tt/macro_rules.rs @@ -93,7 +93,9 @@ fn generic_extension<'cx>(cx: &'cx ExtCtxt, rhses: &[quoted::TokenTree]) -> Box<MacResult+'cx> { if cx.trace_macros() { - println!("{}! {{ {} }}", name, arg); + cx.span_label_without_error(sp, + &"trace_macro", + &format!("expands to `{}! {{ {} }}`", name, arg)); } // Which arm's failure should we report? (the one furthest along) |
