diff options
| author | bors <bors@rust-lang.org> | 2018-03-16 00:09:14 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2018-03-16 00:09:14 +0000 |
| commit | 36b66873187e37a9d79adad89563088a9cb86028 (patch) | |
| tree | b643fb972ed8073cd61582737c9757e6b2fa461c /src/libsyntax/parse | |
| parent | 39264539448e7ec5e98067859db71685393a4464 (diff) | |
| parent | db2f0ae1f437812bfb5d465d31b293068fa45beb (diff) | |
| download | rust-36b66873187e37a9d79adad89563088a9cb86028.tar.gz rust-36b66873187e37a9d79adad89563088a9cb86028.zip | |
Auto merge of #49051 - kennytm:rollup, r=kennytm
Rollup of 17 pull requests - Successful merges: #48706, #48875, #48892, #48922, #48957, #48959, #48961, #48965, #49007, #49024, #49042, #49050, #48853, #48990, #49037, #49049, #48972 - Failed merges:
Diffstat (limited to 'src/libsyntax/parse')
| -rw-r--r-- | src/libsyntax/parse/parser.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index e3812ce159a..a3a6489fe8b 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -7065,7 +7065,11 @@ impl<'a> Parser<'a> { fn parse_rename(&mut self) -> PResult<'a, Option<Ident>> { if self.eat_keyword(keywords::As) { - self.parse_ident().map(Some) + if self.eat(&token::Underscore) { + Ok(Some(Ident::with_empty_ctxt(Symbol::gensym("_")))) + } else { + self.parse_ident().map(Some) + } } else { Ok(None) } |
