Shrink Nonterminal
.
By heap allocating the argument within `NtPath`, `NtVis`, and `NtStmt`. This slightly reduces cumulative and peak allocation amounts, most notably on `deep-vector`.
This commit is contained in:
parent
c2afaba465
commit
d9592c2d9f
10 changed files with 18 additions and 16 deletions
|
@ -439,7 +439,7 @@ impl MetaItem {
|
|||
}
|
||||
Some(TokenTree::Token(Token { kind: token::Interpolated(nt), .. })) => match *nt {
|
||||
token::Nonterminal::NtMeta(ref item) => return item.meta(item.path.span),
|
||||
token::Nonterminal::NtPath(ref path) => path.clone(),
|
||||
token::Nonterminal::NtPath(ref path) => (**path).clone(),
|
||||
_ => return None,
|
||||
},
|
||||
_ => return None,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue