about summary refs log tree commit diff
path: root/src/libsyntax/parse/parser/path.rs
diff options
context:
space:
mode:
authorMazdak Farrokhzad <twingoow@gmail.com>2019-08-29 05:32:48 +0200
committerGitHub <noreply@github.com>2019-08-29 05:32:48 +0200
commit52c3846d51b8efabebb02bd2587a87905e068290 (patch)
treed34b77611677dd3f0e9081a4417262ff3abd1307 /src/libsyntax/parse/parser/path.rs
parenteb4ac32c5944e5c690f8731a8b25eaae8cbad0a7 (diff)
parent42e895d4d99ec7724f3efd632f52170f3f99a5aa (diff)
downloadrust-52c3846d51b8efabebb02bd2587a87905e068290.tar.gz
rust-52c3846d51b8efabebb02bd2587a87905e068290.zip
Rollup merge of #63945 - Centril:recover-mut-pat, r=estebank
Recover `mut $pat` and other improvements

- Recover on e.g. `mut Foo(x, y)` and suggest `Foo(mut x, mut y)`. Fixes https://github.com/rust-lang/rust/issues/63764.
- Recover on e.g. `let mut mut x;`
- Recover on e.g. `let keyword` and `let keyword(...)`.
- Cleanups in `token.rs` with `fn is_non_raw_ident_where` and friends.
Diffstat (limited to 'src/libsyntax/parse/parser/path.rs')
-rw-r--r--src/libsyntax/parse/parser/path.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libsyntax/parse/parser/path.rs b/src/libsyntax/parse/parser/path.rs
index 3eb4d45045a..d4b13cc2e01 100644
--- a/src/libsyntax/parse/parser/path.rs
+++ b/src/libsyntax/parse/parser/path.rs
@@ -423,7 +423,7 @@ impl<'a> Parser<'a> {
                     // FIXME(const_generics): to distinguish between idents for types and consts,
                     // we should introduce a GenericArg::Ident in the AST and distinguish when
                     // lowering to the HIR. For now, idents for const args are not permitted.
-                    if self.token.is_keyword(kw::True) || self.token.is_keyword(kw::False) {
+                    if self.token.is_bool_lit() {
                         self.parse_literal_maybe_minus()?
                     } else {
                         return Err(