Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/mbe/src/benchmark.rs')
| -rw-r--r-- | crates/mbe/src/benchmark.rs | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/crates/mbe/src/benchmark.rs b/crates/mbe/src/benchmark.rs index ac7f071178..cacd5ed81a 100644 --- a/crates/mbe/src/benchmark.rs +++ b/crates/mbe/src/benchmark.rs @@ -51,7 +51,7 @@ fn benchmark_expand_macro_rules() { assert_eq!(hash, 69413); } -fn macro_rules_fixtures() -> FxHashMap<String, DeclarativeMacro<Span>> { +fn macro_rules_fixtures() -> FxHashMap<String, DeclarativeMacro> { macro_rules_fixtures_tt() .into_iter() .map(|(id, tt)| (id, DeclarativeMacro::parse_macro_rules(&tt, true, true))) @@ -80,7 +80,7 @@ fn macro_rules_fixtures_tt() -> FxHashMap<String, tt::Subtree<Span>> { /// Generate random invocation fixtures from rules fn invocation_fixtures( - rules: &FxHashMap<String, DeclarativeMacro<Span>>, + rules: &FxHashMap<String, DeclarativeMacro>, ) -> Vec<(String, tt::Subtree<Span>)> { let mut seed = 123456789; let mut res = Vec::new(); @@ -128,11 +128,7 @@ fn invocation_fixtures( } return res; - fn collect_from_op( - op: &Op<Span>, - token_trees: &mut Vec<tt::TokenTree<Span>>, - seed: &mut usize, - ) { + fn collect_from_op(op: &Op, token_trees: &mut Vec<tt::TokenTree<Span>>, seed: &mut usize) { return match op { Op::Var { kind, .. } => match kind.as_ref() { Some(MetaVarKind::Ident) => token_trees.push(make_ident("foo")), |