Skip to content

Commit

Permalink
Allow attributes on expressions
Browse files Browse the repository at this point in the history
  • Loading branch information
matklad committed Jun 15, 2020
1 parent 52a220c commit d739731
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions crates/ra_parser/src/grammar/expressions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,8 @@ fn expr_no_struct(p: &mut Parser) {
}

fn is_expr_stmt_attr_allowed(kind: SyntaxKind) -> bool {
match kind {
BIN_EXPR | RANGE_EXPR | IF_EXPR => false,
_ => true,
}
let forbid = matches!(kind, BIN_EXPR | RANGE_EXPR);
!forbid
}

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

0 comments on commit d739731

Please sign in to comment.