aboutsummaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2020-06-15 09:59:05 +0100
committerAleksey Kladov <[email protected]>2020-06-15 09:59:05 +0100
commitd739731830d5ad289f1bb779ed58cc1ea3cb5734 (patch)
tree65c7c0d39e2e21f1166390a6034227f8d0dae9cd /crates
parent52a220cece729acb2f6c6fd40bda3964846eb7d2 (diff)
Allow attributes on expressions
https://github.com/rust-lang/rust/pull/69201/
Diffstat (limited to 'crates')
-rw-r--r--crates/ra_parser/src/grammar/expressions.rs6
1 files changed, 2 insertions, 4 deletions
diff --git a/crates/ra_parser/src/grammar/expressions.rs b/crates/ra_parser/src/grammar/expressions.rs
index d6e8df32a..6e72eea66 100644
--- a/crates/ra_parser/src/grammar/expressions.rs
+++ b/crates/ra_parser/src/grammar/expressions.rs
@@ -50,10 +50,8 @@ fn expr_no_struct(p: &mut Parser) {
50} 50}
51 51
52fn is_expr_stmt_attr_allowed(kind: SyntaxKind) -> bool { 52fn is_expr_stmt_attr_allowed(kind: SyntaxKind) -> bool {
53 match kind { 53 let forbid = matches!(kind, BIN_EXPR | RANGE_EXPR);
54 BIN_EXPR | RANGE_EXPR | IF_EXPR => false, 54 !forbid
55 _ => true,
56 }
57} 55}
58 56
59pub(super) fn stmt(p: &mut Parser, with_semi: StmtWithSemi) { 57pub(super) fn stmt(p: &mut Parser, with_semi: StmtWithSemi) {