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-22 12:42:23 +1000
committerNicholas Nethercote <nnethercote@mozilla.com>2019-05-27 13:58:38 +1000
commit26451ef7b5e00887dc8f27717ff34262df23d655 (patch)
tree7e369732e649c3404dd2e7fb030c3a032fa0b790 /src/libsyntax/parse/parser.rs
parent6c0ff3dd979ccaf974312d72a4fba8392eb1a4f7 (diff)
downloadrust-26451ef7b5e00887dc8f27717ff34262df23d655.tar.gz
rust-26451ef7b5e00887dc8f27717ff34262df23d655.zip
Avoid unnecessary internings.
Most involving `Symbol::intern` on string literals.
Diffstat (limited to 'src/libsyntax/parse/parser.rs')
-rw-r--r--src/libsyntax/parse/parser.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index 6c29437362c..e0430ac5563 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -5787,7 +5787,7 @@ impl<'a> Parser<'a> {
             VisibilityKind::Inherited => {}
             _ => {
                 let is_macro_rules: bool = match self.token {
-                    token::Ident(sid, _) => sid.name == Symbol::intern("macro_rules"),
+                    token::Ident(sid, _) => sid.name == sym::macro_rules,
                     _ => false,
                 };
                 let mut err = if is_macro_rules {