mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 22:01:37 +00:00
Move inclusive range check to validation
This commit is contained in:
parent
989cebc99c
commit
a68aefdc46
5 changed files with 33 additions and 11 deletions
|
@ -300,9 +300,6 @@ fn expr_bp(p: &mut Parser, r: Restrictions, bp: u8) -> (Option<CompletedMarker>,
|
|||
let has_trailing_expression =
|
||||
p.at_ts(EXPR_FIRST) && !(r.forbid_structs && p.at(T!['{']));
|
||||
if !has_trailing_expression {
|
||||
if op == T![..=] {
|
||||
p.error("expected expression to end inclusive range");
|
||||
}
|
||||
// no RHS
|
||||
lhs = m.complete(p, RANGE_EXPR);
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue