mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-08-31 15:47:31 +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
|
@ -1,3 +1,4 @@
|
|||
fn main() {
|
||||
0..=;
|
||||
..=;
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
SOURCE_FILE@[0; 24)
|
||||
FN_DEF@[0; 23)
|
||||
SOURCE_FILE@[0; 33)
|
||||
FN_DEF@[0; 32)
|
||||
FN_KW@[0; 2) "fn"
|
||||
WHITESPACE@[2; 3) " "
|
||||
NAME@[3; 7)
|
||||
|
@ -8,8 +8,8 @@ SOURCE_FILE@[0; 24)
|
|||
L_PAREN@[7; 8) "("
|
||||
R_PAREN@[8; 9) ")"
|
||||
WHITESPACE@[9; 10) " "
|
||||
BLOCK_EXPR@[10; 23)
|
||||
BLOCK@[10; 23)
|
||||
BLOCK_EXPR@[10; 32)
|
||||
BLOCK@[10; 32)
|
||||
L_CURLY@[10; 11) "{"
|
||||
WHITESPACE@[11; 16) "\n "
|
||||
EXPR_STMT@[16; 21)
|
||||
|
@ -18,7 +18,13 @@ SOURCE_FILE@[0; 24)
|
|||
INT_NUMBER@[16; 17) "0"
|
||||
DOTDOTEQ@[17; 20) "..="
|
||||
SEMI@[20; 21) ";"
|
||||
WHITESPACE@[21; 22) "\n"
|
||||
R_CURLY@[22; 23) "}"
|
||||
WHITESPACE@[23; 24) "\n"
|
||||
error 20: expected expression to end inclusive range
|
||||
WHITESPACE@[21; 26) "\n "
|
||||
EXPR_STMT@[26; 30)
|
||||
RANGE_EXPR@[26; 29)
|
||||
DOTDOTEQ@[26; 29) "..="
|
||||
SEMI@[29; 30) ";"
|
||||
WHITESPACE@[30; 31) "\n"
|
||||
R_CURLY@[31; 32) "}"
|
||||
WHITESPACE@[32; 33) "\n"
|
||||
error [17; 20): An inclusive range must have an end expression
|
||||
error [26; 29): An inclusive range must have an end expression
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue