Rollup merge of #95301 - nnethercote:rm-NtTT, r=petrochenkov
Remove `Nonterminal::NtTT`. It's only needed for macro expansion, not as a general element in the AST. This commit removes it, adds `NtOrTt` for the parser and macro expansion cases, and renames the variants in `NamedMatch` to better match the new type. r? `@petrochenkov`
This commit is contained in:
commit
ae037a86f9
10 changed files with 52 additions and 55 deletions
|
@ -290,7 +290,6 @@ pub fn nt_to_tokenstream(
|
|||
Nonterminal::NtMeta(ref attr) => convert_tokens(attr.tokens.as_ref()),
|
||||
Nonterminal::NtPath(ref path) => convert_tokens(path.tokens.as_ref()),
|
||||
Nonterminal::NtVis(ref vis) => convert_tokens(vis.tokens.as_ref()),
|
||||
Nonterminal::NtTT(ref tt) => Some(tt.clone().into()),
|
||||
Nonterminal::NtExpr(ref expr) | Nonterminal::NtLiteral(ref expr) => {
|
||||
prepend_attrs(&expr.attrs, expr.tokens.as_ref())
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue