aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_mbe/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_mbe/src/lib.rs')
-rw-r--r--crates/ra_mbe/src/lib.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/crates/ra_mbe/src/lib.rs b/crates/ra_mbe/src/lib.rs
index b9f555ef6..ec2fd1eb5 100644
--- a/crates/ra_mbe/src/lib.rs
+++ b/crates/ra_mbe/src/lib.rs
@@ -144,8 +144,8 @@ impl_froms!(TokenTree: Leaf, Subtree);
144 let macro_invocation = 144 let macro_invocation =
145 source_file.syntax().descendants().find_map(ast::MacroCall::cast).unwrap(); 145 source_file.syntax().descendants().find_map(ast::MacroCall::cast).unwrap();
146 146
147 let definition_tt = ast_to_token_tree(macro_definition.token_tree().unwrap()).unwrap(); 147 let (definition_tt, _) = ast_to_token_tree(macro_definition.token_tree().unwrap()).unwrap();
148 let invocation_tt = ast_to_token_tree(macro_invocation.token_tree().unwrap()).unwrap(); 148 let (invocation_tt, _) = ast_to_token_tree(macro_invocation.token_tree().unwrap()).unwrap();
149 let rules = crate::MacroRules::parse(&definition_tt).unwrap(); 149 let rules = crate::MacroRules::parse(&definition_tt).unwrap();
150 let expansion = rules.expand(&invocation_tt).unwrap(); 150 let expansion = rules.expand(&invocation_tt).unwrap();
151 assert_eq!( 151 assert_eq!(
@@ -160,7 +160,7 @@ impl_froms!(TokenTree: Leaf, Subtree);
160 let macro_definition = 160 let macro_definition =
161 source_file.syntax().descendants().find_map(ast::MacroCall::cast).unwrap(); 161 source_file.syntax().descendants().find_map(ast::MacroCall::cast).unwrap();
162 162
163 let definition_tt = ast_to_token_tree(macro_definition.token_tree().unwrap()).unwrap(); 163 let (definition_tt, _) = ast_to_token_tree(macro_definition.token_tree().unwrap()).unwrap();
164 crate::MacroRules::parse(&definition_tt).unwrap() 164 crate::MacroRules::parse(&definition_tt).unwrap()
165 } 165 }
166 166
@@ -169,7 +169,7 @@ impl_froms!(TokenTree: Leaf, Subtree);
169 let macro_invocation = 169 let macro_invocation =
170 source_file.syntax().descendants().find_map(ast::MacroCall::cast).unwrap(); 170 source_file.syntax().descendants().find_map(ast::MacroCall::cast).unwrap();
171 171
172 let invocation_tt = ast_to_token_tree(macro_invocation.token_tree().unwrap()).unwrap(); 172 let (invocation_tt, _) = ast_to_token_tree(macro_invocation.token_tree().unwrap()).unwrap();
173 173
174 let expaned = rules.expand(&invocation_tt).unwrap(); 174 let expaned = rules.expand(&invocation_tt).unwrap();
175 assert_eq!(expaned.to_string(), expansion); 175 assert_eq!(expaned.to_string(), expansion);