Auto merge of #60910 - nnethercote:avoid-some-unnecessary-interning, r=petrochenkov

Avoid some unnecessary interning

r? @petrochenkov
This commit is contained in:
bors 2019-05-18 02:10:21 +00:00
commit 548add7f61
16 changed files with 67 additions and 49 deletions

View file

@ -352,7 +352,7 @@ impl TokenCursor {
let body = TokenTree::Delimited(
delim_span,
token::Bracket,
[TokenTree::Token(sp, token::Ident(ast::Ident::from_str("doc"), false)),
[TokenTree::Token(sp, token::Ident(ast::Ident::with_empty_ctxt(sym::doc), false)),
TokenTree::Token(sp, token::Eq),
TokenTree::Token(sp, token::Literal(
token::StrRaw(Symbol::intern(&stripped), num_of_hashes), None))
@ -7011,7 +7011,8 @@ impl<'a> Parser<'a> {
let attr = Attribute {
id: attr::mk_attr_id(),
style: ast::AttrStyle::Outer,
path: ast::Path::from_ident(Ident::from_str("warn_directory_ownership")),
path: ast::Path::from_ident(
Ident::with_empty_ctxt(sym::warn_directory_ownership)),
tokens: TokenStream::empty(),
is_sugared_doc: false,
span: syntax_pos::DUMMY_SP,