mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-26 16:54:01 +00:00
Avoid an unnecessary clone in macro_parser::parse
.
This avoids ~800,000 allocations in html5ever.
This commit is contained in:
parent
0c429872a3
commit
a935481ae9
@ -425,8 +425,8 @@ pub fn parse(sess: &ParseSess,
|
||||
cur_eis.push(ei);
|
||||
}
|
||||
TokenTree::Token(_, ref t) => {
|
||||
let mut ei_t = ei.clone();
|
||||
if token_name_eq(t,&tok) {
|
||||
let mut ei_t = ei.clone();
|
||||
ei_t.idx += 1;
|
||||
next_eis.push(ei_t);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user