1
Fork 0

ast: Remove some indirection layers from values in key-value attributes

This commit is contained in:
Vadim Petrochenkov 2020-12-19 23:38:22 +03:00
parent ef589490a7
commit 71cd6f42a6
12 changed files with 72 additions and 50 deletions

View file

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