Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 06452cd

Browse files
committed
Fix style
1 parent dc68b89 commit 06452cd

File tree

2 files changed

+5
-9
lines changed

2 files changed

+5
-9
lines changed

crates/parser/src/grammar/expressions/atom.rs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -72,14 +72,10 @@ pub(super) fn atom_expr(p: &mut Parser, r: Restrictions) -> Option<(CompletedMar
7272
T!['('] => tuple_expr(p),
7373
T!['['] => array_expr(p),
7474
T![|] => closure_expr(p),
75-
T![move] if la == T![|] => closure_expr(p),
76-
T![async] if la == T![|] || (la == T![move] && p.nth(2) == T![|]) => closure_expr(p),
77-
T![static]
78-
if la == T![|]
79-
|| (la == T![move] && p.nth(2) == T![|])
80-
|| (la == T![async] && p.nth(2) == T![|])
81-
|| (la == T![async] && p.nth(2) == T![move] && p.nth(3) == T![|]) =>
82-
{
75+
T![static] | T![async] | T![move] if la == T![|] => closure_expr(p),
76+
T![static] | T![async] if la == T![move] && p.nth(2) == T![|] => closure_expr(p),
77+
T![static] if la == T![async] && p.nth(2) == T![|] => closure_expr(p),
78+
T![static] if la == T![async] && p.nth(2) == T![move] && p.nth(3) == T![|] => {
8379
closure_expr(p)
8480
}
8581
T![if] => if_expr(p),

crates/parser/src/grammar/items.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ fn opt_item_without_modifiers(p: &mut Parser, m: Marker) -> Result<(), Marker> {
230230
IDENT if p.at_contextual_kw(T![macro_rules]) && p.nth(1) == BANG => macro_rules(p, m),
231231

232232
T![const] if (la == IDENT || la == T![_] || la == T![mut]) => consts::konst(p, m),
233-
T![static] if (la != PIPE && la != T![move] && la != T![async]) => consts::static_(p, m),
233+
T![static] if (la == IDENT || la == T![_] || la == T![mut]) => consts::static_(p, m),
234234

235235
_ => return Err(m),
236236
};

0 commit comments

Comments
 (0)