about summary refs log tree commit diff
path: root/src/libstd/sys/unix/process/process_unix.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2018-03-17 23:22:57 +0000
committerbors <bors@rust-lang.org>2018-03-17 23:22:57 +0000
commitca6a98426192f838cc90a18709f92d425b86029e (patch)
treeaad9717ff8dca9636794c782148b0729b46090e0 /src/libstd/sys/unix/process/process_unix.rs
parentadf2135adc4a65a78ba053f04c29d7fe0468eb87 (diff)
parented5ea5c705ccea7d2eef1558530e87d2dbb88be7 (diff)
downloadrust-ca6a98426192f838cc90a18709f92d425b86029e.tar.gz
rust-ca6a98426192f838cc90a18709f92d425b86029e.zip
Auto merge of #48842 - petrochenkov:under, r=nikomatsakis
syntax: Make `_` a reserved identifier

Why:
- Lexically `_` is an identifier.
- Internally it makes implementation of `use Trait as _;` (https://github.com/rust-lang/rust/issues/48216) and some other things cleaner.
- We prevent the externally observable effect of `_` being accepted by macros expecting `ident` by treating `_` specially in the `ident` matcher:
```rust
macro_rules! m {
    ($i: ident) => { let $i = 10; }
}

m!(_); // Still an error
```
Diffstat (limited to 'src/libstd/sys/unix/process/process_unix.rs')
0 files changed, 0 insertions, 0 deletions