aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_parser/src/grammar
diff options
context:
space:
mode:
authorGeoffry Song <[email protected]>2019-11-15 09:04:37 +0000
committerGeoffry Song <[email protected]>2019-11-15 09:04:45 +0000
commita68aefdc463af054e7e98293c06b751c135911d5 (patch)
tree8084aff27bc7dab711524a0878e0d3026499a4a8 /crates/ra_parser/src/grammar
parent989cebc99c02acd427f01724c4fa77d81691e886 (diff)
Move inclusive range check to validation
Diffstat (limited to 'crates/ra_parser/src/grammar')
-rw-r--r--crates/ra_parser/src/grammar/expressions.rs3
1 files changed, 0 insertions, 3 deletions
diff --git a/crates/ra_parser/src/grammar/expressions.rs b/crates/ra_parser/src/grammar/expressions.rs
index cf69da25a..81d4f75f9 100644
--- a/crates/ra_parser/src/grammar/expressions.rs
+++ b/crates/ra_parser/src/grammar/expressions.rs
@@ -300,9 +300,6 @@ fn expr_bp(p: &mut Parser, r: Restrictions, bp: u8) -> (Option<CompletedMarker>,
300 let has_trailing_expression = 300 let has_trailing_expression =
301 p.at_ts(EXPR_FIRST) && !(r.forbid_structs && p.at(T!['{'])); 301 p.at_ts(EXPR_FIRST) && !(r.forbid_structs && p.at(T!['{']));
302 if !has_trailing_expression { 302 if !has_trailing_expression {
303 if op == T![..=] {
304 p.error("expected expression to end inclusive range");
305 }
306 // no RHS 303 // no RHS
307 lhs = m.complete(p, RANGE_EXPR); 304 lhs = m.complete(p, RANGE_EXPR);
308 break; 305 break;