1
Fork 0

add test to reproduce #137662 (using ty decl macro fragment in an attr) and fix it

This commit is contained in:
Jana Dönszelmann 2025-02-26 14:29:19 +01:00
parent 96cfc75584
commit 41dd80aeaa
No known key found for this signature in database
2 changed files with 29 additions and 0 deletions

View file

@ -473,6 +473,15 @@ impl<'a> MetaItemListParserContext<'a> {
{
self.inside_delimiters.next();
return Some(MetaItemOrLitParser::Lit(lit));
} else if let Some(TokenTree::Delimited(.., Delimiter::Invisible(_), inner_tokens)) =
self.inside_delimiters.peek()
{
self.inside_delimiters.next();
return MetaItemListParserContext {
inside_delimiters: inner_tokens.iter().peekable(),
dcx: self.dcx,
}
.next();
}
// or a path.