diff options
author | Jonas Schievink <[email protected]> | 2020-12-15 14:37:37 +0000 |
---|---|---|
committer | Jonas Schievink <[email protected]> | 2020-12-15 14:37:37 +0000 |
commit | c1cb5953820f26d4d0a614650bc8c50cbc5a3ce6 (patch) | |
tree | 01ba67d97ce6f261154df59b268fe924af9add2a /crates/mbe/src/tests.rs | |
parent | 39aae835fd70d06092c1be1add6eef3984439529 (diff) |
Move to upstream `macro_rules!` model
Diffstat (limited to 'crates/mbe/src/tests.rs')
-rw-r--r-- | crates/mbe/src/tests.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/mbe/src/tests.rs b/crates/mbe/src/tests.rs index 843054fe8..dff6e98c2 100644 --- a/crates/mbe/src/tests.rs +++ b/crates/mbe/src/tests.rs | |||
@@ -48,7 +48,7 @@ mod rule_parsing { | |||
48 | let macro_definition = format!(" macro_rules! m {{ {} }} ", arm_definition); | 48 | let macro_definition = format!(" macro_rules! m {{ {} }} ", arm_definition); |
49 | let source_file = ast::SourceFile::parse(¯o_definition).ok().unwrap(); | 49 | let source_file = ast::SourceFile::parse(¯o_definition).ok().unwrap(); |
50 | let macro_definition = | 50 | let macro_definition = |
51 | source_file.syntax().descendants().find_map(ast::MacroCall::cast).unwrap(); | 51 | source_file.syntax().descendants().find_map(ast::MacroRules::cast).unwrap(); |
52 | 52 | ||
53 | let (definition_tt, _) = | 53 | let (definition_tt, _) = |
54 | ast_to_token_tree(¯o_definition.token_tree().unwrap()).unwrap(); | 54 | ast_to_token_tree(¯o_definition.token_tree().unwrap()).unwrap(); |
@@ -1668,7 +1668,7 @@ impl MacroFixture { | |||
1668 | fn parse_macro_to_tt(ra_fixture: &str) -> tt::Subtree { | 1668 | fn parse_macro_to_tt(ra_fixture: &str) -> tt::Subtree { |
1669 | let source_file = ast::SourceFile::parse(ra_fixture).ok().unwrap(); | 1669 | let source_file = ast::SourceFile::parse(ra_fixture).ok().unwrap(); |
1670 | let macro_definition = | 1670 | let macro_definition = |
1671 | source_file.syntax().descendants().find_map(ast::MacroCall::cast).unwrap(); | 1671 | source_file.syntax().descendants().find_map(ast::MacroRules::cast).unwrap(); |
1672 | 1672 | ||
1673 | let (definition_tt, _) = ast_to_token_tree(¯o_definition.token_tree().unwrap()).unwrap(); | 1673 | let (definition_tt, _) = ast_to_token_tree(¯o_definition.token_tree().unwrap()).unwrap(); |
1674 | 1674 | ||