diff options
| author | bors <bors@rust-lang.org> | 2020-12-18 16:17:23 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2020-12-18 16:17:23 +0000 |
| commit | e4297ba39ce07a0b0000841b50154ea53783a024 (patch) | |
| tree | f4dcb5224492beb60c03024ce6e1e95b2be5278e /compiler/rustc_parse/src | |
| parent | 6340607acaab10eed3cf11ef7ad3564db58ec981 (diff) | |
| parent | 441a33e81bf0351c5f91fb06232514c077cccffc (diff) | |
| download | rust-e4297ba39ce07a0b0000841b50154ea53783a024.tar.gz rust-e4297ba39ce07a0b0000841b50154ea53783a024.zip | |
Auto merge of #80156 - RalfJung:rollup-m3poz8z, r=RalfJung
Rollup of 6 pull requests Successful merges: - #80121 (Change the message for `if_let_guard` feature gate) - #80130 (docs: Edit rustc_span::symbol::Symbol method) - #80135 (Don't allow `const` to begin a nonterminal) - #80145 (Fix typo in rustc_typeck docs) - #80146 (Edit formatting in Rust Prelude docs) - #80147 (Add missing punctuation to std::alloc docs) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_parse/src')
| -rw-r--r-- | compiler/rustc_parse/src/parser/nonterminal.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/rustc_parse/src/parser/nonterminal.rs b/compiler/rustc_parse/src/parser/nonterminal.rs index c007f96a798..76ad5acd530 100644 --- a/compiler/rustc_parse/src/parser/nonterminal.rs +++ b/compiler/rustc_parse/src/parser/nonterminal.rs @@ -27,6 +27,8 @@ impl<'a> Parser<'a> { token.can_begin_expr() // This exception is here for backwards compatibility. && !token.is_keyword(kw::Let) + // This exception is here for backwards compatibility. + && !token.is_keyword(kw::Const) } NonterminalKind::Ty => token.can_begin_type(), NonterminalKind::Ident => get_macro_ident(token).is_some(), |
