Avoid unnecessary internings.
Most involving `Symbol::intern` on string literals.
This commit is contained in:
parent
6c0ff3dd97
commit
26451ef7b5
31 changed files with 84 additions and 106 deletions
|
@ -20,9 +20,7 @@ fn ignored_span(sp: Span, edition: Edition) -> Span {
|
|||
call_site: DUMMY_SP,
|
||||
def_site: None,
|
||||
format: MacroAttribute(Symbol::intern("std_inject")),
|
||||
allow_internal_unstable: Some(vec![
|
||||
Symbol::intern("prelude_import"),
|
||||
].into()),
|
||||
allow_internal_unstable: Some(vec![sym::prelude_import].into()),
|
||||
allow_internal_unsafe: false,
|
||||
local_inner_macros: false,
|
||||
edition,
|
||||
|
@ -98,7 +96,7 @@ pub fn maybe_inject_crates_ref(
|
|||
krate.module.items.insert(0, P(ast::Item {
|
||||
attrs: vec![ast::Attribute {
|
||||
style: ast::AttrStyle::Outer,
|
||||
path: ast::Path::from_ident(ast::Ident::new(Symbol::intern("prelude_import"), span)),
|
||||
path: ast::Path::from_ident(ast::Ident::new(sym::prelude_import, span)),
|
||||
tokens: TokenStream::empty(),
|
||||
id: attr::mk_attr_id(),
|
||||
is_sugared_doc: false,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue