diff options
Diffstat (limited to 'crates/ra_mbe/src/mbe_expander.rs')
-rw-r--r-- | crates/ra_mbe/src/mbe_expander.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/crates/ra_mbe/src/mbe_expander.rs b/crates/ra_mbe/src/mbe_expander.rs index c7c06c7fd..f185aecb7 100644 --- a/crates/ra_mbe/src/mbe_expander.rs +++ b/crates/ra_mbe/src/mbe_expander.rs | |||
@@ -599,7 +599,8 @@ mod tests { | |||
599 | let macro_definition = | 599 | let macro_definition = |
600 | source_file.syntax().descendants().find_map(ast::MacroCall::cast).unwrap(); | 600 | source_file.syntax().descendants().find_map(ast::MacroCall::cast).unwrap(); |
601 | 601 | ||
602 | let (definition_tt, _) = ast_to_token_tree(macro_definition.token_tree().unwrap()).unwrap(); | 602 | let (definition_tt, _) = |
603 | ast_to_token_tree(¯o_definition.token_tree().unwrap()).unwrap(); | ||
603 | crate::MacroRules::parse(&definition_tt).unwrap() | 604 | crate::MacroRules::parse(&definition_tt).unwrap() |
604 | } | 605 | } |
605 | 606 | ||
@@ -611,7 +612,8 @@ mod tests { | |||
611 | let macro_invocation = | 612 | let macro_invocation = |
612 | source_file.syntax().descendants().find_map(ast::MacroCall::cast).unwrap(); | 613 | source_file.syntax().descendants().find_map(ast::MacroCall::cast).unwrap(); |
613 | 614 | ||
614 | let (invocation_tt, _) = ast_to_token_tree(macro_invocation.token_tree().unwrap()).unwrap(); | 615 | let (invocation_tt, _) = |
616 | ast_to_token_tree(¯o_invocation.token_tree().unwrap()).unwrap(); | ||
615 | 617 | ||
616 | expand_rule(&rules.rules[0], &invocation_tt) | 618 | expand_rule(&rules.rules[0], &invocation_tt) |
617 | } | 619 | } |