diff options
Diffstat (limited to 'crates/ra_parser/src')
-rw-r--r-- | crates/ra_parser/src/grammar/expressions/atom.rs | 4 | ||||
-rw-r--r-- | crates/ra_parser/src/grammar/items.rs | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/crates/ra_parser/src/grammar/expressions/atom.rs b/crates/ra_parser/src/grammar/expressions/atom.rs index a23977bfb..8653d4055 100644 --- a/crates/ra_parser/src/grammar/expressions/atom.rs +++ b/crates/ra_parser/src/grammar/expressions/atom.rs | |||
@@ -92,10 +92,10 @@ pub(super) fn atom_expr(p: &mut Parser, r: Restrictions) -> Option<(CompletedMar | |||
92 | } | 92 | } |
93 | } | 93 | } |
94 | } | 94 | } |
95 | 95 | ASYNC_KW if la == L_CURLY || la == MOVE_KW => { | |
96 | ASYNC_KW if la == L_CURLY => { | ||
97 | let m = p.start(); | 96 | let m = p.start(); |
98 | p.bump(); | 97 | p.bump(); |
98 | p.eat(MOVE_KW); | ||
99 | block_expr(p, Some(m)) | 99 | block_expr(p, Some(m)) |
100 | } | 100 | } |
101 | MATCH_KW => match_expr(p), | 101 | MATCH_KW => match_expr(p), |
diff --git a/crates/ra_parser/src/grammar/items.rs b/crates/ra_parser/src/grammar/items.rs index c24e6d1e0..8d8828652 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 | |||
82 | // test_err async_without_semicolon | 82 | // test_err async_without_semicolon |
83 | // fn foo() { let _ = async {} } | 83 | // fn foo() { let _ = async {} } |
84 | has_mods |= p.eat(CONST_KW); | 84 | has_mods |= p.eat(CONST_KW); |
85 | if p.at(ASYNC_KW) && p.nth(1) != L_CURLY { | 85 | if p.at(ASYNC_KW) && p.nth(1) != L_CURLY && p.nth(1) != MOVE_KW { |
86 | p.eat(ASYNC_KW); | 86 | p.eat(ASYNC_KW); |
87 | has_mods = true; | 87 | has_mods = true; |
88 | } | 88 | } |