Skip to content

Commit d739731

Browse files
committed
Allow attributes on expressions
rust-lang/rust#69201
1 parent 52a220c commit d739731

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

crates/ra_parser/src/grammar/expressions.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,8 @@ fn expr_no_struct(p: &mut Parser) {
5050
}
5151

5252
fn is_expr_stmt_attr_allowed(kind: SyntaxKind) -> bool {
53-
match kind {
54-
BIN_EXPR | RANGE_EXPR | IF_EXPR => false,
55-
_ => true,
56-
}
53+
let forbid = matches!(kind, BIN_EXPR | RANGE_EXPR);
54+
!forbid
5755
}
5856

5957
pub(super) fn stmt(p: &mut Parser, with_semi: StmtWithSemi) {

0 commit comments

Comments
 (0)