1
Fork 0

Rollup merge of #126928 - nnethercote:124141-pre, r=oli-obk

Some `Nonterminal` removal precursors

Small things to prepare for #124141, more or less.

r? ```@oli-obk```
This commit is contained in:
Jacob Pratt 2024-06-27 02:06:19 -04:00 committed by GitHub
commit b1f43974c4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 134 additions and 3 deletions

View file

@ -214,6 +214,12 @@ impl<'a> StripUnconfigured<'a> {
) => {
panic!("Nonterminal should have been flattened: {:?}", tree);
}
AttrTokenTree::Token(
Token { kind: TokenKind::OpenDelim(_) | TokenKind::CloseDelim(_), .. },
_,
) => {
panic!("Should be `AttrTokenTree::Delimited`, not delim tokens: {:?}", tree);
}
AttrTokenTree::Token(token, spacing) => {
Some(AttrTokenTree::Token(token, spacing)).into_iter()
}