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

@ -481,15 +481,6 @@ impl<'a> MetaItemListParserContext<'a> {
self.inside_delimiters.peek()
{
match &**nt {
// or maybe a full nt meta including the path but we return immediately
token::Nonterminal::NtMeta(item) => {
self.inside_delimiters.next();
return Some(MetaItemOrLitParser::MetaItemParser(MetaItemParser {
path: PathParser::Ast(&item.path),
args: ArgParser::from_attr_args(&item.args, self.dcx),
}));
}
// an already interpolated path from a macro expansion is a path, no need to parse
// one from tokens
token::Nonterminal::NtPath(path) => {