Uh oh!
There was an error while loading. Please reload this page.
Use diagnostics for trace_macro instead of println - #41520
Conversation
rust-highfive
commented
Apr 24, 2017
(rust_highfive has picked a reviewer for you, use r? to override) |
estebank
commented
Apr 24, 2017
nikomatsakis
commented
Apr 25, 2017
Do we have any tests of this feature? Maybe make a |
708d494 to
929240dComparedurka
commented
Apr 25, 2017
That's... a ton of extra noise, compared to: especially if a macro has multiple expansion steps. What's the concrete benefit to users of the feature, here? Can you at least get rid of the "macro in external crate" bit? |
nikomatsakis
commented
Apr 25, 2017
@durka line numbers seem like a win, but if they're just repeated N times, perhaps less useful that way. We could presumably make these attached |
Maybe it's possible to attach all the expansion steps to one span? Like this: That would in fact be better than the current output, where you have to wade through all of it to find a particular macro's expansion. The rightward drift still bugs me a bit. |
@durka yes that was roughly what I had in mind, but probably more like |
@estebank - just a friendly ping to keep this on your radar |
c49cc0e to
0fabc21Compareestebank
commented
May 6, 2017
Updated. |
nikomatsakis
commented
May 8, 2017
@bors r+ |
bors
commented
May 8, 2017
📌 Commit 8c9ad8d has been approved by |
Use diagnostics for trace_macro instead of println
When using `trace_macro`, use `span_label`s instead of `println`:
```rust
note: trace_macro
--> $DIR/trace-macro.rs:14:5
|
14 | println!("Hello, World!");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: expands to `println! { "Hello, World!" }`
= note: expands to `print! { concat ! ( "Hello, World!" , "\n" ) }`
```
Fixrust-lang#22597.bors
commented
May 9, 2017
bors
commented
May 9, 2017
☔ The latest upstream changes (presumably #41846) made this pull request unmergeable. Please resolve the merge conflicts. |
When using
trace_macro, usespan_labels instead ofprintln:Fix#22597.