Avoid unnecessary internings.

Most involving `Symbol::intern` on string literals.
This commit is contained in:
Nicholas Nethercote 2019-05-22 12:42:23 +10:00
parent 6c0ff3dd97
commit 26451ef7b5
31 changed files with 84 additions and 106 deletions

View file

@ -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 {