diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-06-15 10:02:53 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2020-06-15 10:02:53 +0100 |
commit | db6100dbaa4f09543c7e6f2ab9986daa55919ad5 (patch) | |
tree | 165cdcd914e8f201fb44e4ab7e5c04cf72994195 /crates/ra_parser/src/grammar | |
parent | 672d160b013df82b1729fd3db130ff7b6f9b5b31 (diff) | |
parent | b5c4f2faa2a39bad9af35e7d90e9ed6151a6a0d5 (diff) |
Merge #4889
4889: Deprecate hir::Path::from_ast r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_parser/src/grammar')
-rw-r--r-- | crates/ra_parser/src/grammar/expressions.rs | 6 |
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 | ||
52 | fn is_expr_stmt_attr_allowed(kind: SyntaxKind) -> bool { | 52 | fn 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 | ||
59 | pub(super) fn stmt(p: &mut Parser, with_semi: StmtWithSemi) { | 57 | pub(super) fn stmt(p: &mut Parser, with_semi: StmtWithSemi) { |