Uh oh!
There was an error while loading. Please reload this page.
trace_macro: Show both the macro call and its expansion. #42072. - #42103
Conversation
rust-highfive
commented
May 19, 2017
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @pnkfelix (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
shepmaster
commented
May 19, 2017
Thanks! We'll get @pnkfelix on the case soon! |
Thanks for the PR! For some time now notes accepts multiline strings. Given that there's some duplication, I'm wondering wether it'd be nice to have output along the lines of: |
jorendorff
commented
May 21, 2017
In the particular test in this patch, the TokenStreams mostly fit on one line each, but I suspect that's rare in practice. Here's a noisier example: note: trace_macro --> main.rs:5:5 |5 | assert_eq!(vec![1, 2, 3,].len(), 3); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: expanding `assert_eq! { vec ! [ 1 , 2 , 3 , ] . len ( ) , 3 }` = note: to `{ match ( & vec!(1 , 2 , 3 ,).len() , & 3 ) { ( left_val , right_val ) => { if ! ( * left_val == * right_val ) { panic ! ( "assertion failed: `(left == right)` \ (left: `{:?}`, right: `{:?}`)" , left_val , right_val ) } } } }` = note: expanding `panic! { "assertion failed: `(left == right)` \ (left: `{:?}`, right: `{:?}`)" , left_val , right_val }` = note: to `{ $crate :: rt :: begin_panic_fmt ( & format_args ! ( "assertion failed: `(left == right)` (left: `{:?}`, right: `{:?}`)" , left_val , right_val ) , { static _FILE_LINE : ( & 'static str , u32 ) = ( file ! ( ) , line ! ( ) ) ; & _FILE_LINE } ) }`Note also that the second |
estebank
commented
May 22, 2017
@bors r+ @jorendorff can you file a ticket to handle that case? |
bors
commented
May 22, 2017
📌 Commit f8b66a0 has been approved by |
trace_macro: Show both the macro call and its expansion. rust-lang#42072. See rust-lang#42072 for the initial motivation behind this. The change is not the minimal fix, but I want this behavior almost every time I use `trace_macros`.
trace_macro: Show both the macro call and its expansion. rust-lang#42072. See rust-lang#42072 for the initial motivation behind this. The change is not the minimal fix, but I want this behavior almost every time I use `trace_macros`.
trace_macro: Show both the macro call and its expansion. rust-lang#42072. See rust-lang#42072 for the initial motivation behind this. The change is not the minimal fix, but I want this behavior almost every time I use `trace_macros`.
bors
commented
May 27, 2017
⌛ Testing commit f8b66a0 with merge 5469410... |
bors
commented
May 27, 2017
💔 Test failed - status-appveyor |
Mark-Simulacrum
commented
May 27, 2017
@bors retry
|
trace_macro: Show both the macro call and its expansion. rust-lang#42072. See rust-lang#42072 for the initial motivation behind this. The change is not the minimal fix, but I want this behavior almost every time I use `trace_macros`.
trace_macro: Show both the macro call and its expansion. rust-lang#42072. See rust-lang#42072 for the initial motivation behind this. The change is not the minimal fix, but I want this behavior almost every time I use `trace_macros`.
bors
commented
May 27, 2017
bors
commented
May 27, 2017
☀️ Test successful - status-appveyor, status-travis |
See #42072 for the initial motivation behind this.
The change is not the minimal fix, but I want this behavior almost every time I use
trace_macros.