From 0bf903411c6bf94a235383b2d60988ceee58ea90 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Wed, 18 Mar 2020 20:51:47 +0100 Subject: Use match_ast --- crates/ra_syntax/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'crates/ra_syntax/src/lib.rs') 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 { (match $node:ident { $($tt:tt)* }) => { match_ast!(match ($node) { $($tt)* }) }; (match ($node:expr) { - $( ast::$ast:ident($it:ident) => $res:block, )* + $( ast::$ast:ident($it:ident) => $res:expr, )* _ => $catch_all:expr $(,)? }) => {{ - $( if let Some($it) = ast::$ast::cast($node.clone()) $res else )* + $( if let Some($it) = ast::$ast::cast($node.clone()) { $res } else )* { $catch_all } }}; } -- cgit v1.2.3