about summary refs log tree commit diff
path: root/src/libsyntax/parse/parser.rs
diff options
context:
space:
mode:
authorNicholas Nethercote <nnethercote@mozilla.com>2019-05-23 15:31:43 +1000
committerNicholas Nethercote <nnethercote@mozilla.com>2019-05-27 14:05:05 +1000
commit8ae01a90088fd62987030ff382733ed67791d4f8 (patch)
treed6f6c82e6947ad24823f60df40b2d5d89f6c72ac /src/libsyntax/parse/parser.rs
parent303bf1509bdf5ffd150539acf44f1c500c7079bd (diff)
downloadrust-8ae01a90088fd62987030ff382733ed67791d4f8.tar.gz
rust-8ae01a90088fd62987030ff382733ed67791d4f8.zip
Use `Symbol` equality in `is_ident_named`.
Diffstat (limited to 'src/libsyntax/parse/parser.rs')
-rw-r--r--src/libsyntax/parse/parser.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index e0430ac5563..07efeaa4cf2 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -2759,7 +2759,7 @@ impl<'a> Parser<'a> {
                 let (span, e) = self.interpolated_or_expr_span(e)?;
                 (lo.to(span), ExprKind::Box(e))
             }
-            token::Ident(..) if self.token.is_ident_named("not") => {
+            token::Ident(..) if self.token.is_ident_named(sym::not) => {
                 // `not` is just an ordinary identifier in Rust-the-language,
                 // but as `rustc`-the-compiler, we can issue clever diagnostics
                 // for confused users who really want to say `!`
@@ -4592,7 +4592,7 @@ impl<'a> Parser<'a> {
             let do_not_suggest_help =
                 self.token.is_keyword(kw::In) || self.token == token::Colon;
 
-            if self.token.is_ident_named("and") {
+            if self.token.is_ident_named(sym::and) {
                 e.span_suggestion_short(
                     self.span,
                     "use `&&` instead of `and` for the boolean operator",
@@ -4600,7 +4600,7 @@ impl<'a> Parser<'a> {
                     Applicability::MaybeIncorrect,
                 );
             }
-            if self.token.is_ident_named("or") {
+            if self.token.is_ident_named(sym::or) {
                 e.span_suggestion_short(
                     self.span,
                     "use `||` instead of `or` for the boolean operator",