about summary refs log tree commit diff
path: root/src/libstd/rt
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2014-08-30 10:51:26 +0000
committerbors <bors@rust-lang.org>2014-08-30 10:51:26 +0000
commitd398eb76ae5fdb7c08bbb7c0e3d85dc22d42c5ce (patch)
tree29bb3039a1d09a1f953063e9cd83c755e1c1f5ef /src/libstd/rt
parent43c26e6041b811b322f49933e8d0f9455cb7ea2b (diff)
parent32e437161da5e60c660b86da9003b7f73ebb5676 (diff)
downloadrust-d398eb76ae5fdb7c08bbb7c0e3d85dc22d42c5ce.tar.gz
rust-d398eb76ae5fdb7c08bbb7c0e3d85dc22d42c5ce.zip
auto merge of #16419 : huonw/rust/pretty-expanded-hygiene, r=pnkfelix
Different Identifiers and Names can have identical textual representations, but different internal representations, due to the macro hygiene machinery (syntax contexts and gensyms). This provides a way to see these internals by compiling with `--pretty expanded,hygiene`.

This is useful for debugging & hacking on macros (e.g. diagnosing https://github.com/rust-lang/rust/issues/15750/https://github.com/rust-lang/rust/issues/15962 likely would've been faster with this functionality).

E.g. 

```rust
#![feature(macro_rules)]
// minimal junk
#![no_std]

macro_rules! foo {
    ($x: ident) => { y + $x }
}

fn bar() {
    foo!(x)
}
```
```rust
#![feature(macro_rules)]
// minimal junk
#![no_std]


fn bar /* 61#0 */() { y /* 60#2 */ + x /* 58#3 */ }
```
Diffstat (limited to 'src/libstd/rt')
0 files changed, 0 insertions, 0 deletions