aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_mbe/src/mbe_expander.rs
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2019-05-28 15:39:01 +0100
committerAleksey Kladov <[email protected]>2019-05-28 15:39:01 +0100
commit2e3f5af9d49db5732405050e6c5442cb6eeef965 (patch)
tree0bc4e93dc16a53311a9ef98d263251ce168835b3 /crates/ra_mbe/src/mbe_expander.rs
parent0efbcdf43544af471a935c790ae99e2a9b5516c3 (diff)
move mbe to the new API
Diffstat (limited to 'crates/ra_mbe/src/mbe_expander.rs')
-rw-r--r--crates/ra_mbe/src/mbe_expander.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_mbe/src/mbe_expander.rs b/crates/ra_mbe/src/mbe_expander.rs
index 7fff8deff..a0bd0c5f8 100644
--- a/crates/ra_mbe/src/mbe_expander.rs
+++ b/crates/ra_mbe/src/mbe_expander.rs
@@ -597,7 +597,7 @@ mod tests {
597 } 597 }
598 598
599 fn create_rules(macro_definition: &str) -> crate::MacroRules { 599 fn create_rules(macro_definition: &str) -> crate::MacroRules {
600 let source_file = ast::SourceFile::parse(macro_definition); 600 let source_file = ast::SourceFile::parse(macro_definition).ok().unwrap();
601 let macro_definition = 601 let macro_definition =
602 source_file.syntax().descendants().find_map(ast::MacroCall::cast).unwrap(); 602 source_file.syntax().descendants().find_map(ast::MacroCall::cast).unwrap();
603 603
@@ -609,7 +609,7 @@ mod tests {
609 rules: &crate::MacroRules, 609 rules: &crate::MacroRules,
610 invocation: &str, 610 invocation: &str,
611 ) -> Result<tt::Subtree, ExpandError> { 611 ) -> Result<tt::Subtree, ExpandError> {
612 let source_file = ast::SourceFile::parse(invocation); 612 let source_file = ast::SourceFile::parse(invocation).ok().unwrap();
613 let macro_invocation = 613 let macro_invocation =
614 source_file.syntax().descendants().find_map(ast::MacroCall::cast).unwrap(); 614 source_file.syntax().descendants().find_map(ast::MacroCall::cast).unwrap();
615 615