aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2020-03-18 19:52:10 +0000
committerGitHub <[email protected]>2020-03-18 19:52:10 +0000
commitb376cabe5e1358191cc708bf650fcd0a2884d9b6 (patch)
tree26fa8907363441be33736e891dded863a433f898 /crates/ra_syntax
parentb28d41186698a6e2aa3d679ee63dd48304ca4262 (diff)
parent0bf903411c6bf94a235383b2d60988ceee58ea90 (diff)
Merge #3643
3643: Use match_ast r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_syntax')
-rw-r--r--crates/ra_syntax/src/lib.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_syntax/src/lib.rs b/crates/ra_syntax/src/lib.rs
index e3f74da6d..cef926ed3 100644
--- a/crates/ra_syntax/src/lib.rs
+++ b/crates/ra_syntax/src/lib.rs
@@ -179,10 +179,10 @@ macro_rules! match_ast {
179 (match $node:ident { $($tt:tt)* }) => { match_ast!(match ($node) { $($tt)* }) }; 179 (match $node:ident { $($tt:tt)* }) => { match_ast!(match ($node) { $($tt)* }) };
180 180
181 (match ($node:expr) { 181 (match ($node:expr) {
182 $( ast::$ast:ident($it:ident) => $res:block, )* 182 $( ast::$ast:ident($it:ident) => $res:expr, )*
183 _ => $catch_all:expr $(,)? 183 _ => $catch_all:expr $(,)?
184 }) => {{ 184 }) => {{
185 $( if let Some($it) = ast::$ast::cast($node.clone()) $res else )* 185 $( if let Some($it) = ast::$ast::cast($node.clone()) { $res } else )*
186 { $catch_all } 186 { $catch_all }
187 }}; 187 }};
188} 188}