aboutsummaryrefslogtreecommitdiff
path: root/crates/mbe/src/tests
diff options
context:
space:
mode:
authorJonas Schievink <[email protected]>2021-04-04 00:46:45 +0100
committerJonas Schievink <[email protected]>2021-04-04 00:46:45 +0100
commit3abcdc03ba335fb3487c62547f61746e4a199fe6 (patch)
tree8386a83d383563308a83f4491d313be043dc94d3 /crates/mbe/src/tests
parentbcf600fc881026ab018d0a8ae09eff7e54af538b (diff)
Make `ast_to_token_tree` infallible
It could never return `None`, so reflect that in the return type
Diffstat (limited to 'crates/mbe/src/tests')
-rw-r--r--crates/mbe/src/tests/rule.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/mbe/src/tests/rule.rs b/crates/mbe/src/tests/rule.rs
index bf48112b3..5c61a98fd 100644
--- a/crates/mbe/src/tests/rule.rs
+++ b/crates/mbe/src/tests/rule.rs
@@ -44,6 +44,6 @@ fn parse_macro_arm(arm_definition: &str) -> Result<crate::MacroRules, ParseError
44 let macro_definition = 44 let macro_definition =
45 source_file.syntax().descendants().find_map(ast::MacroRules::cast).unwrap(); 45 source_file.syntax().descendants().find_map(ast::MacroRules::cast).unwrap();
46 46
47 let (definition_tt, _) = ast_to_token_tree(&macro_definition.token_tree().unwrap()).unwrap(); 47 let (definition_tt, _) = ast_to_token_tree(&macro_definition.token_tree().unwrap());
48 crate::MacroRules::parse(&definition_tt) 48 crate::MacroRules::parse(&definition_tt)
49} 49}