diff options
| author | Nicholas Nethercote <nnethercote@mozilla.com> | 2019-05-22 12:42:23 +1000 |
|---|---|---|
| committer | Nicholas Nethercote <nnethercote@mozilla.com> | 2019-05-27 13:58:38 +1000 |
| commit | 26451ef7b5e00887dc8f27717ff34262df23d655 (patch) | |
| tree | 7e369732e649c3404dd2e7fb030c3a032fa0b790 /src/libsyntax/parse | |
| parent | 6c0ff3dd979ccaf974312d72a4fba8392eb1a4f7 (diff) | |
| download | rust-26451ef7b5e00887dc8f27717ff34262df23d655.tar.gz rust-26451ef7b5e00887dc8f27717ff34262df23d655.zip | |
Avoid unnecessary internings.
Most involving `Symbol::intern` on string literals.
Diffstat (limited to 'src/libsyntax/parse')
| -rw-r--r-- | src/libsyntax/parse/parser.rs | 2 |
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 { |
