mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 12:29:21 +00:00
Add test for async block
This commit is contained in:
parent
ad72699553
commit
cc9721996c
3 changed files with 34 additions and 1 deletions
|
@ -88,7 +88,8 @@ pub(super) fn maybe_item(p: &mut Parser, flavor: ItemFlavor) -> MaybeItem {
|
|||
let mut has_mods = false;
|
||||
|
||||
// modifiers
|
||||
|
||||
// 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.eat(ASYNC_KW);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue