1
Fork 0

Remove NtMeta.

Note: there was an existing code path involving `Interpolated` in
`MetaItem::from_tokens` that was dead. This commit transfers that to the
new form, but puts an `unreachable!` call inside it.
This commit is contained in:
Nicholas Nethercote 2024-04-18 16:22:02 +10:00
parent ef1114a964
commit 7ea59e053b
20 changed files with 67 additions and 64 deletions

View file

@ -336,6 +336,14 @@ pub(super) fn transcribe<'a>(
TokenStream::from_ast(ty),
)
}
MatchedSingle(ParseNtResult::Meta(attr_item)) => {
let has_meta_form = attr_item.meta_kind().is_some();
mk_delimited(
attr_item.span(),
MetaVarKind::Meta { has_meta_form },
TokenStream::from_ast(attr_item),
)
}
MatchedSingle(ParseNtResult::Vis(vis)) => {
mk_delimited(vis.span, MetaVarKind::Vis, TokenStream::from_ast(vis))
}