Uh oh!
There was an error while loading. Please reload this page.
Preserve span when lowering ExprKind::Paren - #33683
Conversation
rust-highfive
commented
May 17, 2016
(rust_highfive has picked a reviewer for you, use r? to override) |
nikomatsakis
commented
May 17, 2016
@bors r+ rollup |
bors
commented
May 17, 2016
📌 Commit 0f257df has been approved by |
@bors r- , fails travis |
sanxiyn
commented
May 18, 2016
This is trickier than I thought. The problem is illustrated by the following code: macro_rules! paren {($e:expr) => (($e))}mod m {pubstructS{x:i32}pubfnmake() -> S{S{x:0}}}fnmain(){let s = m::make();paren!(s.x);}Before: After: |
sanxiyn
commented
May 18, 2016
Since Rust macro is not text substitution, there is never a need to parenthesize like |
nikomatsakis
commented
May 18, 2016
Why wouldn't we?
Hmm. So... it seems like your highlighting code was doing the right thing, but perhaps |
sanxiyn
commented
May 18, 2016
Modified |
sanxiyn
commented
May 18, 2016
Now suboptimal highlighting is avoided. |
nikomatsakis
commented
May 19, 2016
@bors r+ rollup I'm not sure which is better, but this seems good too. |
bors
commented
May 19, 2016
📌 Commit edf1773 has been approved by |
Preserve span when lowering ExprKind::Paren Fixrust-lang#33681.
Fix#33681.