From d43dff43b4bb89306c418222df3b262a715c0fda Mon Sep 17 00:00:00 2001 From: robojumper Date: Sun, 31 Mar 2019 16:35:22 +0200 Subject: Async closure syntax --- crates/ra_parser/src/grammar/items.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crates/ra_parser/src/grammar/items.rs') diff --git a/crates/ra_parser/src/grammar/items.rs b/crates/ra_parser/src/grammar/items.rs index 8d8828652..c4b8ef3c7 100644 --- a/crates/ra_parser/src/grammar/items.rs +++ b/crates/ra_parser/src/grammar/items.rs @@ -82,7 +82,7 @@ pub(super) fn maybe_item(p: &mut Parser, m: Marker, flavor: ItemFlavor) -> Resul // test_err async_without_semicolon // fn foo() { let _ = async {} } has_mods |= p.eat(CONST_KW); - if p.at(ASYNC_KW) && p.nth(1) != L_CURLY && p.nth(1) != MOVE_KW { + if p.at(ASYNC_KW) && p.nth(1) != L_CURLY && p.nth(1) != MOVE_KW && p.nth(1) != PIPE { p.eat(ASYNC_KW); has_mods = true; } -- cgit v1.2.3