about summary refs log tree commit diff
path: root/src/libsyntax/parse/parser
diff options
context:
space:
mode:
authorMazdak Farrokhzad <twingoow@gmail.com>2019-08-27 10:21:41 +0200
committerMazdak Farrokhzad <twingoow@gmail.com>2019-08-27 10:21:41 +0200
commite49b9581baba9d89519d17ac0d8400b6ae77e754 (patch)
treebb80e7150da3b89be3c98b11a14a3ca3c13f4631 /src/libsyntax/parse/parser
parent5cc1559c600f34f534fa3e0328ca1c2659562229 (diff)
downloadrust-e49b9581baba9d89519d17ac0d8400b6ae77e754.tar.gz
rust-e49b9581baba9d89519d17ac0d8400b6ae77e754.zip
Simplify with Symbol/Token::is_book_lit.
Diffstat (limited to 'src/libsyntax/parse/parser')
-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(