aboutsummaryrefslogtreecommitdiff
path: root/crates/mbe/src/expander.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/mbe/src/expander.rs')
-rw-r--r--crates/mbe/src/expander.rs6
1 files changed, 2 insertions, 4 deletions
diff --git a/crates/mbe/src/expander.rs b/crates/mbe/src/expander.rs
index 3197c834c..bfef7f73d 100644
--- a/crates/mbe/src/expander.rs
+++ b/crates/mbe/src/expander.rs
@@ -159,8 +159,7 @@ mod tests {
159 let macro_definition = 159 let macro_definition =
160 source_file.syntax().descendants().find_map(ast::MacroRules::cast).unwrap(); 160 source_file.syntax().descendants().find_map(ast::MacroRules::cast).unwrap();
161 161
162 let (definition_tt, _) = 162 let (definition_tt, _) = ast_to_token_tree(&macro_definition.token_tree().unwrap());
163 ast_to_token_tree(&macro_definition.token_tree().unwrap()).unwrap();
164 crate::MacroRules::parse(&definition_tt).unwrap() 163 crate::MacroRules::parse(&definition_tt).unwrap()
165 } 164 }
166 165
@@ -169,8 +168,7 @@ mod tests {
169 let macro_invocation = 168 let macro_invocation =
170 source_file.syntax().descendants().find_map(ast::MacroCall::cast).unwrap(); 169 source_file.syntax().descendants().find_map(ast::MacroCall::cast).unwrap();
171 170
172 let (invocation_tt, _) = 171 let (invocation_tt, _) = ast_to_token_tree(&macro_invocation.token_tree().unwrap());
173 ast_to_token_tree(&macro_invocation.token_tree().unwrap()).unwrap();
174 172
175 expand_rules(&rules.rules, &invocation_tt) 173 expand_rules(&rules.rules, &invocation_tt)
176 } 174 }