aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_parser
diff options
context:
space:
mode:
authorCaio <[email protected]>2019-03-10 17:35:25 +0000
committerCaio <[email protected]>2019-03-10 17:35:25 +0000
commitcc9721996c4680e257db76aafea12a9565196d92 (patch)
treeabc90b6e4be002cc4595f5338804bf4753e3edb7 /crates/ra_parser
parentad72699553c39f159f25a6dc7ecd5df953817407 (diff)
Add test for async block
Diffstat (limited to 'crates/ra_parser')
-rw-r--r--crates/ra_parser/src/grammar/items.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/crates/ra_parser/src/grammar/items.rs b/crates/ra_parser/src/grammar/items.rs
index 91f9bfe8a..a057c8167 100644
--- a/crates/ra_parser/src/grammar/items.rs
+++ b/crates/ra_parser/src/grammar/items.rs
@@ -88,7 +88,8 @@ pub(super) fn maybe_item(p: &mut Parser, flavor: ItemFlavor) -> MaybeItem {
88 let mut has_mods = false; 88 let mut has_mods = false;
89 89
90 // modifiers 90 // modifiers
91 91 // test_err async_without_semicolon
92 // fn foo() { let _ = async {} }
92 has_mods |= p.eat(CONST_KW); 93 has_mods |= p.eat(CONST_KW);
93 if p.at(ASYNC_KW) && p.nth(1) != L_CURLY { 94 if p.at(ASYNC_KW) && p.nth(1) != L_CURLY {
94 p.eat(ASYNC_KW); 95 p.eat(ASYNC_KW);