diff options
| author | bors <bors@rust-lang.org> | 2014-08-30 10:51:26 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2014-08-30 10:51:26 +0000 |
| commit | d398eb76ae5fdb7c08bbb7c0e3d85dc22d42c5ce (patch) | |
| tree | 29bb3039a1d09a1f953063e9cd83c755e1c1f5ef /src/libstd | |
| parent | 43c26e6041b811b322f49933e8d0f9455cb7ea2b (diff) | |
| parent | 32e437161da5e60c660b86da9003b7f73ebb5676 (diff) | |
| download | rust-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')
0 files changed, 0 insertions, 0 deletions
