From: bors Date: Sat, 17 Mar 2018 23:22:57 +0000 (+0000) Subject: Auto merge of #48842 - petrochenkov:under, r=nikomatsakis X-Git-Url: https://git.lizzy.rs/?a=commitdiff_plain;h=ca6a98426192f838cc90a18709f92d425b86029e;p=rust.git 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 ``` --- ca6a98426192f838cc90a18709f92d425b86029e