aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_parser/src
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_parser/src')
-rw-r--r--crates/ra_parser/src/grammar.rs6
-rw-r--r--crates/ra_parser/src/grammar/expressions.rs1
2 files changed, 3 insertions, 4 deletions
diff --git a/crates/ra_parser/src/grammar.rs b/crates/ra_parser/src/grammar.rs
index cf603eba1..5997636d6 100644
--- a/crates/ra_parser/src/grammar.rs
+++ b/crates/ra_parser/src/grammar.rs
@@ -87,10 +87,8 @@ pub(crate) fn pattern(p: &mut Parser) {
87} 87}
88 88
89pub(crate) fn stmt(p: &mut Parser, with_semi: bool) { 89pub(crate) fn stmt(p: &mut Parser, with_semi: bool) {
90 let with_semi = match with_semi { 90 let with_semi =
91 true => expressions::StmtWithSemi::Yes, 91 if with_semi { expressions::StmtWithSemi::Yes } else { expressions::StmtWithSemi::No };
92 false => expressions::StmtWithSemi::No,
93 };
94 92
95 expressions::stmt(p, with_semi) 93 expressions::stmt(p, with_semi)
96} 94}
diff --git a/crates/ra_parser/src/grammar/expressions.rs b/crates/ra_parser/src/grammar/expressions.rs
index bb6c78b5f..99e32c4e8 100644
--- a/crates/ra_parser/src/grammar/expressions.rs
+++ b/crates/ra_parser/src/grammar/expressions.rs
@@ -454,6 +454,7 @@ fn method_call_expr(p: &mut Parser, lhs: CompletedMarker) -> CompletedMarker {
454// x.1i32; 454// x.1i32;
455// x.0x01; 455// x.0x01;
456// } 456// }
457#[allow(clippy::if_same_then_else)]
457fn field_expr(p: &mut Parser, lhs: CompletedMarker) -> CompletedMarker { 458fn field_expr(p: &mut Parser, lhs: CompletedMarker) -> CompletedMarker {
458 assert!(p.at(T![.])); 459 assert!(p.at(T![.]));
459 let m = lhs.precede(p); 460 let m = lhs.precede(p);