diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2019-08-15 06:49:13 +0100 |
---|---|---|
committer | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2019-08-15 06:49:13 +0100 |
commit | 5ed6a13a2c81f24bd12cc74332f7e94301c73980 (patch) | |
tree | 87a7c456d17459f7c903ac34d3a1f60371762ac3 /crates/ra_syntax/test_data/parser/inline/ok | |
parent | 19e0d7d596015599fd705eecfe6f695aabc8632d (diff) | |
parent | 4f31fed362e1bb08f748b188eedc0bdc5a070bee (diff) |
Merge #1685
1685: fix error of RangeFrom in for-loop r=DJMcNab a=bravomikekilo
fix [issue-1542](https://github.com/rust-analyzer/rust-analyzer/issues/1542) @matklad
Co-authored-by: bravomikekilo <[email protected]>
Diffstat (limited to 'crates/ra_syntax/test_data/parser/inline/ok')
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0142_for_range_from.rs | 5 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0142_for_range_from.txt | 40 |
2 files changed, 45 insertions, 0 deletions
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0142_for_range_from.rs b/crates/ra_syntax/test_data/parser/inline/ok/0142_for_range_from.rs new file mode 100644 index 000000000..af0d40a7a --- /dev/null +++ b/crates/ra_syntax/test_data/parser/inline/ok/0142_for_range_from.rs | |||
@@ -0,0 +1,5 @@ | |||
1 | fn foo() { | ||
2 | for x in 0 .. { | ||
3 | break; | ||
4 | } | ||
5 | } | ||
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0142_for_range_from.txt b/crates/ra_syntax/test_data/parser/inline/ok/0142_for_range_from.txt new file mode 100644 index 000000000..9e5836233 --- /dev/null +++ b/crates/ra_syntax/test_data/parser/inline/ok/0142_for_range_from.txt | |||
@@ -0,0 +1,40 @@ | |||
1 | SOURCE_FILE@[0; 51) | ||
2 | FN_DEF@[0; 50) | ||
3 | FN_KW@[0; 2) "fn" | ||
4 | WHITESPACE@[2; 3) " " | ||
5 | NAME@[3; 6) | ||
6 | IDENT@[3; 6) "foo" | ||
7 | PARAM_LIST@[6; 8) | ||
8 | L_PAREN@[6; 7) "(" | ||
9 | R_PAREN@[7; 8) ")" | ||
10 | WHITESPACE@[8; 9) " " | ||
11 | BLOCK@[9; 50) | ||
12 | L_CURLY@[9; 10) "{" | ||
13 | WHITESPACE@[10; 14) "\n " | ||
14 | FOR_EXPR@[14; 48) | ||
15 | FOR_KW@[14; 17) "for" | ||
16 | WHITESPACE@[17; 18) " " | ||
17 | BIND_PAT@[18; 19) | ||
18 | NAME@[18; 19) | ||
19 | IDENT@[18; 19) "x" | ||
20 | WHITESPACE@[19; 20) " " | ||
21 | IN_KW@[20; 22) "in" | ||
22 | WHITESPACE@[22; 23) " " | ||
23 | RANGE_EXPR@[23; 27) | ||
24 | LITERAL@[23; 24) | ||
25 | INT_NUMBER@[23; 24) "0" | ||
26 | WHITESPACE@[24; 25) " " | ||
27 | DOTDOT@[25; 27) ".." | ||
28 | WHITESPACE@[27; 28) " " | ||
29 | BLOCK@[28; 48) | ||
30 | L_CURLY@[28; 29) "{" | ||
31 | WHITESPACE@[29; 37) "\n " | ||
32 | EXPR_STMT@[37; 43) | ||
33 | BREAK_EXPR@[37; 42) | ||
34 | BREAK_KW@[37; 42) "break" | ||
35 | SEMI@[42; 43) ";" | ||
36 | WHITESPACE@[43; 47) "\n " | ||
37 | R_CURLY@[47; 48) "}" | ||
38 | WHITESPACE@[48; 49) "\n" | ||
39 | R_CURLY@[49; 50) "}" | ||
40 | WHITESPACE@[50; 51) "\n" | ||