diff options
| author | bors <bors@rust-lang.org> | 2020-11-15 13:19:05 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2020-11-15 13:19:05 +0000 |
| commit | 5fab31e5ddf5f2613bf57a0a7286dc6f5887e1cb (patch) | |
| tree | bf2540f955bf3e3adb49330b1fd06ee628d9fc35 /compiler/rustc_parse/src/parser | |
| parent | 04688459242356c0f6b9fdad3ba76c9ec4dcc354 (diff) | |
| parent | 568354f01f22148709e51fe1130826addb455e18 (diff) | |
| download | rust-5fab31e5ddf5f2613bf57a0a7286dc6f5887e1cb.tar.gz rust-5fab31e5ddf5f2613bf57a0a7286dc6f5887e1cb.zip | |
Auto merge of #79070 - jonas-schievink:rollup-wacn2b8, r=jonas-schievink
Rollup of 13 pull requests
Successful merges:
- #77802 (Allow making `RUSTC_BOOTSTRAP` conditional on the crate name)
- #79004 (Add `--color` support to bootstrap)
- #79005 (cleanup: Remove `ParseSess::injected_crate_name`)
- #79016 (Make `_` an expression, to discard values in destructuring assignments)
- #79019 (astconv: extract closures into a separate trait)
- #79026 (Implement BTreeMap::retain and BTreeSet::retain)
- #79031 (Validate that locals have a corresponding `LocalDecl`)
- #79034 (rustc_resolve: Make `macro_rules` scope chain compression lazy)
- #79036 (Move Steal to rustc_data_structures.)
- #79041 (Rename clean::{ItemEnum -> ItemKind}, clean::Item::{inner -> kind})
- #79058 (Move likely/unlikely argument outside of invisible unsafe block)
- #79059 (Print 'checking cranelift artifacts' to easily separate it from other artifacts)
- #79063 (Update rustfmt to v1.4.26)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_parse/src/parser')
| -rw-r--r-- | compiler/rustc_parse/src/parser/expr.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/compiler/rustc_parse/src/parser/expr.rs b/compiler/rustc_parse/src/parser/expr.rs index 188bf227c42..ffbf786491d 100644 --- a/compiler/rustc_parse/src/parser/expr.rs +++ b/compiler/rustc_parse/src/parser/expr.rs @@ -1089,6 +1089,9 @@ impl<'a> Parser<'a> { self.parse_yield_expr(attrs) } else if self.eat_keyword(kw::Let) { self.parse_let_expr(attrs) + } else if self.eat_keyword(kw::Underscore) { + self.sess.gated_spans.gate(sym::destructuring_assignment, self.prev_token.span); + Ok(self.mk_expr(self.prev_token.span, ExprKind::Underscore, attrs)) } else if !self.unclosed_delims.is_empty() && self.check(&token::Semi) { // Don't complain about bare semicolons after unclosed braces // recovery in order to keep the error count down. Fixing the |
