about summary refs log tree commit diff
path: root/compiler/rustc_parse/src/parser
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2021-01-09 22:19:46 +0000
committerbors <bors@rust-lang.org>2021-01-09 22:19:46 +0000
commitf30733adb9150a9b965a6af1650d5213bec8ddf6 (patch)
tree7ff8471b927c4d88cf79fc239cd11dd65c1b2dc4 /compiler/rustc_parse/src/parser
parent6184f23950fb4aa14884ce310d948dc6fca269a3 (diff)
parent71cd6f42a6214510692afc662147919d53239ff4 (diff)
downloadrust-f30733adb9150a9b965a6af1650d5213bec8ddf6.tar.gz
rust-f30733adb9150a9b965a6af1650d5213bec8ddf6.zip
Auto merge of #80441 - petrochenkov:kwtok, r=Aaron1011
ast: Remove some indirection layers from values in key-value attributes

Trying to address some perf regressions from https://github.com/rust-lang/rust/pull/78837#issuecomment-745380762.
Diffstat (limited to 'compiler/rustc_parse/src/parser')
-rw-r--r--compiler/rustc_parse/src/parser/mod.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_parse/src/parser/mod.rs b/compiler/rustc_parse/src/parser/mod.rs
index cecf0130cf7..45964b1c988 100644
--- a/compiler/rustc_parse/src/parser/mod.rs
+++ b/compiler/rustc_parse/src/parser/mod.rs
@@ -983,8 +983,8 @@ impl<'a> Parser<'a> {
                         _ => self.sess.gated_spans.gate(sym::extended_key_value_attributes, span),
                     }
 
-                    let token = token::Interpolated(Lrc::new(token::NtExpr(expr)));
-                    MacArgs::Eq(eq_span, TokenTree::token(token, span).into())
+                    let token_kind = token::Interpolated(Lrc::new(token::NtExpr(expr)));
+                    MacArgs::Eq(eq_span, Token::new(token_kind, span))
                 } else {
                     MacArgs::Empty
                 }