E.g. in
|
let tokens = vec!["`=>`", "`,`", "`=`", "`|`", "`if`", "`in`"]; |
a vec is created, only to be thrown away if the macro actually works out. I think we can just turn most places into an early return in the happy path and then only allocate in the error path.
Do not work on this issue before #61541 is merged.
Also,
|
fn is_in_follow(tok: "ed::TokenTree, frag: &str) -> IsInFollow { |
hasn't had its docs updated to reflect the source changes.
E.g. in
rust/src/libsyntax/ext/tt/macro_rules.rs
Line 1045 in ab7cf71
Do not work on this issue before #61541 is merged.
Also,
rust/src/libsyntax/ext/tt/macro_rules.rs
Line 1015 in ab7cf71