diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-02-18 12:57:26 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2020-02-18 12:57:26 +0000 |
commit | c447fe9bc06006a7080da782cf67d739c91b534c (patch) | |
tree | 45cbc9578b24437da3eedc6a234784be22b1f38c /crates/ra_syntax/test_data/parser/err | |
parent | 742459c8fe08e359ae380e3e1dc0d059c0b4f871 (diff) | |
parent | 053ccf4121797e4e559e3225d46d3f23cb1ad70b (diff) |
Merge #3026
3026: ra_syntax: reshape SyntaxError for the sake of removing redundancy r=matklad a=Veetaha
Followup of #2911, also puts some crosses to the todo list of #223.
**AHTUNG!** A big part of the diff of this PR are test data files changes.
Simplified `SyntaxError` that was `SyntaxError { kind: { /* big enum */ }, location: Location }` to `SyntaxError(String, TextRange)`. I am not sure whether the tuple struct here is best fit, I am inclined to add names to the fields, because I already provide getters `SyntaxError::message()`, `SyntaxError::range()`.
I also removed `Location` altogether ...
This is currently WIP, because the following is not done:
- [ ] ~~Add tests to `test_data` dir for unescape errors *// I don't know where to put these errors in particular, because they are out of the scope of the lexer and parser. However, I have an idea in mind that we move all validators we have right now to parsing stage, but this is up to discussion...*~~ **[UPD]** I came to a conclusion that tree validation logic, which unescape errors are a part of, should be rethought of, we currently have no tests and no place to put tests for tree validations. So I'd like to extract potential redesign (maybe move of tree validation to ra_parser) and adding tests for this into a separate task.
Co-authored-by: Veetaha <[email protected]>
Co-authored-by: Veetaha <[email protected]>
Diffstat (limited to 'crates/ra_syntax/test_data/parser/err')
35 files changed, 211 insertions, 211 deletions
diff --git a/crates/ra_syntax/test_data/parser/err/0000_struct_field_missing_comma.txt b/crates/ra_syntax/test_data/parser/err/0000_struct_field_missing_comma.txt index dc143945a..edcd936b0 100644 --- a/crates/ra_syntax/test_data/parser/err/0000_struct_field_missing_comma.txt +++ b/crates/ra_syntax/test_data/parser/err/0000_struct_field_missing_comma.txt | |||
@@ -31,4 +31,4 @@ SOURCE_FILE@[0; 34) | |||
31 | IDENT@[29; 32) "u32" | 31 | IDENT@[29; 32) "u32" |
32 | WHITESPACE@[32; 33) "\n" | 32 | WHITESPACE@[32; 33) "\n" |
33 | R_CURLY@[33; 34) "}" | 33 | R_CURLY@[33; 34) "}" |
34 | error 21: expected COMMA | 34 | error [21; 21): expected COMMA |
diff --git a/crates/ra_syntax/test_data/parser/err/0001_item_recovery_in_file.txt b/crates/ra_syntax/test_data/parser/err/0001_item_recovery_in_file.txt index 181bcdb9e..2d653715e 100644 --- a/crates/ra_syntax/test_data/parser/err/0001_item_recovery_in_file.txt +++ b/crates/ra_syntax/test_data/parser/err/0001_item_recovery_in_file.txt | |||
@@ -14,5 +14,5 @@ SOURCE_FILE@[0; 21) | |||
14 | RECORD_FIELD_DEF_LIST@[19; 21) | 14 | RECORD_FIELD_DEF_LIST@[19; 21) |
15 | L_CURLY@[19; 20) "{" | 15 | L_CURLY@[19; 20) "{" |
16 | R_CURLY@[20; 21) "}" | 16 | R_CURLY@[20; 21) "}" |
17 | error 0: expected an item | 17 | error [0; 0): expected an item |
18 | error 3: expected an item | 18 | error [3; 3): expected an item |
diff --git a/crates/ra_syntax/test_data/parser/err/0002_duplicate_shebang.txt b/crates/ra_syntax/test_data/parser/err/0002_duplicate_shebang.txt index bdb5fa6c5..002680583 100644 --- a/crates/ra_syntax/test_data/parser/err/0002_duplicate_shebang.txt +++ b/crates/ra_syntax/test_data/parser/err/0002_duplicate_shebang.txt | |||
@@ -26,14 +26,14 @@ SOURCE_FILE@[0; 42) | |||
26 | NAME@[36; 41) | 26 | NAME@[36; 41) |
27 | IDENT@[36; 41) "rusti" | 27 | IDENT@[36; 41) "rusti" |
28 | WHITESPACE@[41; 42) "\n" | 28 | WHITESPACE@[41; 42) "\n" |
29 | error 23: expected `[` | 29 | error [23; 23): expected `[` |
30 | error 23: expected an item | 30 | error [23; 23): expected an item |
31 | error 27: expected one of `*`, `::`, `{`, `self`, `super` or an identifier | 31 | error [27; 27): expected one of `*`, `::`, `{`, `self`, `super` or an identifier |
32 | error 28: expected SEMI | 32 | error [28; 28): expected SEMI |
33 | error 31: expected EXCL | 33 | error [31; 31): expected EXCL |
34 | error 31: expected `{`, `[`, `(` | 34 | error [31; 31): expected `{`, `[`, `(` |
35 | error 31: expected SEMI | 35 | error [31; 31): expected SEMI |
36 | error 31: expected an item | 36 | error [31; 31): expected an item |
37 | error 35: expected EXCL | 37 | error [35; 35): expected EXCL |
38 | error 41: expected `{`, `[`, `(` | 38 | error [41; 41): expected `{`, `[`, `(` |
39 | error 41: expected SEMI | 39 | error [41; 41): expected SEMI |
diff --git a/crates/ra_syntax/test_data/parser/err/0003_C++_semicolon.txt b/crates/ra_syntax/test_data/parser/err/0003_C++_semicolon.txt index 58d005902..8039a8913 100644 --- a/crates/ra_syntax/test_data/parser/err/0003_C++_semicolon.txt +++ b/crates/ra_syntax/test_data/parser/err/0003_C++_semicolon.txt | |||
@@ -35,5 +35,5 @@ SOURCE_FILE@[0; 40) | |||
35 | R_CURLY@[38; 39) "}" | 35 | R_CURLY@[38; 39) "}" |
36 | ERROR@[39; 40) | 36 | ERROR@[39; 40) |
37 | SEMI@[39; 40) ";" | 37 | SEMI@[39; 40) ";" |
38 | error 39: expected item, found `;` | 38 | error [39; 39): expected item, found `;` |
39 | consider removing this semicolon | 39 | consider removing this semicolon |
diff --git a/crates/ra_syntax/test_data/parser/err/0004_use_path_bad_segment.txt b/crates/ra_syntax/test_data/parser/err/0004_use_path_bad_segment.txt index 5210a884d..5f6e10986 100644 --- a/crates/ra_syntax/test_data/parser/err/0004_use_path_bad_segment.txt +++ b/crates/ra_syntax/test_data/parser/err/0004_use_path_bad_segment.txt | |||
@@ -13,4 +13,4 @@ SOURCE_FILE@[0; 12) | |||
13 | ERROR@[9; 11) | 13 | ERROR@[9; 11) |
14 | INT_NUMBER@[9; 11) "92" | 14 | INT_NUMBER@[9; 11) "92" |
15 | SEMI@[11; 12) ";" | 15 | SEMI@[11; 12) ";" |
16 | error 9: expected identifier | 16 | error [9; 9): expected identifier |
diff --git a/crates/ra_syntax/test_data/parser/err/0005_attribute_recover.txt b/crates/ra_syntax/test_data/parser/err/0005_attribute_recover.txt index 7c1a23170..cc11421a9 100644 --- a/crates/ra_syntax/test_data/parser/err/0005_attribute_recover.txt +++ b/crates/ra_syntax/test_data/parser/err/0005_attribute_recover.txt | |||
@@ -55,6 +55,6 @@ SOURCE_FILE@[0; 54) | |||
55 | WHITESPACE@[51; 52) "\n" | 55 | WHITESPACE@[51; 52) "\n" |
56 | R_CURLY@[52; 53) "}" | 56 | R_CURLY@[52; 53) "}" |
57 | WHITESPACE@[53; 54) "\n" | 57 | WHITESPACE@[53; 54) "\n" |
58 | error 53: expected R_PAREN | 58 | error [53; 53): expected R_PAREN |
59 | error 53: expected `]` | 59 | error [53; 53): expected `]` |
60 | error 53: expected an item | 60 | error [53; 53): expected an item |
diff --git a/crates/ra_syntax/test_data/parser/err/0006_named_field_recovery.txt b/crates/ra_syntax/test_data/parser/err/0006_named_field_recovery.txt index 5f5198b31..84fd92862 100644 --- a/crates/ra_syntax/test_data/parser/err/0006_named_field_recovery.txt +++ b/crates/ra_syntax/test_data/parser/err/0006_named_field_recovery.txt | |||
@@ -64,11 +64,11 @@ SOURCE_FILE@[0; 74) | |||
64 | WHITESPACE@[71; 72) "\n" | 64 | WHITESPACE@[71; 72) "\n" |
65 | R_CURLY@[72; 73) "}" | 65 | R_CURLY@[72; 73) "}" |
66 | WHITESPACE@[73; 74) "\n" | 66 | WHITESPACE@[73; 74) "\n" |
67 | error 31: expected field declaration | 67 | error [31; 31): expected field declaration |
68 | error 33: expected COMMA | 68 | error [33; 33): expected COMMA |
69 | error 38: expected field declaration | 69 | error [38; 38): expected field declaration |
70 | error 39: expected COMMA | 70 | error [39; 39): expected COMMA |
71 | error 40: expected field declaration | 71 | error [40; 40): expected field declaration |
72 | error 41: expected COMMA | 72 | error [41; 41): expected COMMA |
73 | error 42: expected field declaration | 73 | error [42; 42): expected field declaration |
74 | error 43: expected COMMA | 74 | error [43; 43): expected COMMA |
diff --git a/crates/ra_syntax/test_data/parser/err/0007_stray_curly_in_file.txt b/crates/ra_syntax/test_data/parser/err/0007_stray_curly_in_file.txt index 7ae417441..1978f30fa 100644 --- a/crates/ra_syntax/test_data/parser/err/0007_stray_curly_in_file.txt +++ b/crates/ra_syntax/test_data/parser/err/0007_stray_curly_in_file.txt | |||
@@ -28,6 +28,6 @@ SOURCE_FILE@[0; 31) | |||
28 | ERROR@[29; 30) | 28 | ERROR@[29; 30) |
29 | R_CURLY@[29; 30) "}" | 29 | R_CURLY@[29; 30) "}" |
30 | WHITESPACE@[30; 31) "\n" | 30 | WHITESPACE@[30; 31) "\n" |
31 | error 0: unmatched `}` | 31 | error [0; 0): unmatched `}` |
32 | error 14: unmatched `}` | 32 | error [14; 14): unmatched `}` |
33 | error 29: unmatched `}` | 33 | error [29; 29): unmatched `}` |
diff --git a/crates/ra_syntax/test_data/parser/err/0008_item_block_recovery.txt b/crates/ra_syntax/test_data/parser/err/0008_item_block_recovery.txt index 1a4b40a2b..98248227d 100644 --- a/crates/ra_syntax/test_data/parser/err/0008_item_block_recovery.txt +++ b/crates/ra_syntax/test_data/parser/err/0008_item_block_recovery.txt | |||
@@ -76,6 +76,6 @@ SOURCE_FILE@[0; 95) | |||
76 | WHITESPACE@[92; 93) "\n" | 76 | WHITESPACE@[92; 93) "\n" |
77 | R_CURLY@[93; 94) "}" | 77 | R_CURLY@[93; 94) "}" |
78 | WHITESPACE@[94; 95) "\n" | 78 | WHITESPACE@[94; 95) "\n" |
79 | error 17: expected EXCL | 79 | error [17; 17): expected EXCL |
80 | error 19: expected SEMI | 80 | error [19; 19): expected SEMI |
81 | error 20: expected an item | 81 | error [20; 20): expected an item |
diff --git a/crates/ra_syntax/test_data/parser/err/0009_broken_struct_type_parameter.txt b/crates/ra_syntax/test_data/parser/err/0009_broken_struct_type_parameter.txt index e147d6424..ca508ac7c 100644 --- a/crates/ra_syntax/test_data/parser/err/0009_broken_struct_type_parameter.txt +++ b/crates/ra_syntax/test_data/parser/err/0009_broken_struct_type_parameter.txt | |||
@@ -45,14 +45,14 @@ SOURCE_FILE@[0; 43) | |||
45 | IDENT@[40; 41) "T" | 45 | IDENT@[40; 41) "T" |
46 | SEMI@[41; 42) ";" | 46 | SEMI@[41; 42) ";" |
47 | WHITESPACE@[42; 43) "\n" | 47 | WHITESPACE@[42; 43) "\n" |
48 | error 9: expected type parameter | 48 | error [9; 9): expected type parameter |
49 | error 11: expected COMMA | 49 | error [11; 11): expected COMMA |
50 | error 11: expected R_ANGLE | 50 | error [11; 11): expected R_ANGLE |
51 | error 11: expected `;`, `{`, or `(` | 51 | error [11; 11): expected `;`, `{`, or `(` |
52 | error 12: expected an item | 52 | error [12; 12): expected an item |
53 | error 14: expected an item | 53 | error [14; 14): expected an item |
54 | error 15: expected an item | 54 | error [15; 15): expected an item |
55 | error 17: expected an item | 55 | error [17; 17): expected an item |
56 | error 24: expected SEMI | 56 | error [24; 24): expected SEMI |
57 | error 24: expected expression | 57 | error [24; 24): expected expression |
58 | error 25: expected SEMI | 58 | error [25; 25): expected SEMI |
diff --git a/crates/ra_syntax/test_data/parser/err/0010_unsafe_lambda_block.txt b/crates/ra_syntax/test_data/parser/err/0010_unsafe_lambda_block.txt index b73dda5ad..e0edf6a2d 100644 --- a/crates/ra_syntax/test_data/parser/err/0010_unsafe_lambda_block.txt +++ b/crates/ra_syntax/test_data/parser/err/0010_unsafe_lambda_block.txt | |||
@@ -40,4 +40,4 @@ SOURCE_FILE@[0; 42) | |||
40 | WHITESPACE@[39; 40) "\n" | 40 | WHITESPACE@[39; 40) "\n" |
41 | R_CURLY@[40; 41) "}" | 41 | R_CURLY@[40; 41) "}" |
42 | WHITESPACE@[41; 42) "\n" | 42 | WHITESPACE@[41; 42) "\n" |
43 | error 24: expected `{` | 43 | error [24; 24): expected `{` |
diff --git a/crates/ra_syntax/test_data/parser/err/0011_extern_struct.txt b/crates/ra_syntax/test_data/parser/err/0011_extern_struct.txt index 381147dc0..900894dcf 100644 --- a/crates/ra_syntax/test_data/parser/err/0011_extern_struct.txt +++ b/crates/ra_syntax/test_data/parser/err/0011_extern_struct.txt | |||
@@ -10,4 +10,4 @@ SOURCE_FILE@[0; 19) | |||
10 | IDENT@[14; 17) "Foo" | 10 | IDENT@[14; 17) "Foo" |
11 | SEMI@[17; 18) ";" | 11 | SEMI@[17; 18) ";" |
12 | WHITESPACE@[18; 19) "\n" | 12 | WHITESPACE@[18; 19) "\n" |
13 | error 6: expected existential, fn, trait or impl | 13 | error [6; 6): expected existential, fn, trait or impl |
diff --git a/crates/ra_syntax/test_data/parser/err/0013_invalid_type.txt b/crates/ra_syntax/test_data/parser/err/0013_invalid_type.txt index 4907bac6d..7a934cf66 100644 --- a/crates/ra_syntax/test_data/parser/err/0013_invalid_type.txt +++ b/crates/ra_syntax/test_data/parser/err/0013_invalid_type.txt | |||
@@ -69,21 +69,21 @@ SOURCE_FILE@[0; 86) | |||
69 | ERROR@[83; 84) | 69 | ERROR@[83; 84) |
70 | SEMI@[83; 84) ";" | 70 | SEMI@[83; 84) ";" |
71 | WHITESPACE@[84; 86) "\n\n" | 71 | WHITESPACE@[84; 86) "\n\n" |
72 | error 67: expected type | 72 | error [67; 67): expected type |
73 | error 68: expected COMMA | 73 | error [68; 68): expected COMMA |
74 | error 68: expected R_ANGLE | 74 | error [68; 68): expected R_ANGLE |
75 | error 68: expected COMMA | 75 | error [68; 68): expected COMMA |
76 | error 68: expected R_ANGLE | 76 | error [68; 68): expected R_ANGLE |
77 | error 68: expected COMMA | 77 | error [68; 68): expected COMMA |
78 | error 68: expected R_ANGLE | 78 | error [68; 68): expected R_ANGLE |
79 | error 68: expected COMMA | 79 | error [68; 68): expected COMMA |
80 | error 72: expected COMMA | 80 | error [72; 72): expected COMMA |
81 | error 72: expected a type | 81 | error [72; 72): expected a type |
82 | error 72: expected R_PAREN | 82 | error [72; 72): expected R_PAREN |
83 | error 72: expected SEMI | 83 | error [72; 72): expected SEMI |
84 | error 72: expected an item | 84 | error [72; 72): expected an item |
85 | error 73: expected an item | 85 | error [73; 73): expected an item |
86 | error 79: expected an item | 86 | error [79; 79): expected an item |
87 | error 80: expected an item | 87 | error [80; 80): expected an item |
88 | error 82: expected an item | 88 | error [82; 82): expected an item |
89 | error 83: expected an item | 89 | error [83; 83): expected an item |
diff --git a/crates/ra_syntax/test_data/parser/err/0014_where_no_bounds.txt b/crates/ra_syntax/test_data/parser/err/0014_where_no_bounds.txt index 0ba17cf8d..a25d641b8 100644 --- a/crates/ra_syntax/test_data/parser/err/0014_where_no_bounds.txt +++ b/crates/ra_syntax/test_data/parser/err/0014_where_no_bounds.txt | |||
@@ -29,4 +29,4 @@ SOURCE_FILE@[0; 23) | |||
29 | L_CURLY@[20; 21) "{" | 29 | L_CURLY@[20; 21) "{" |
30 | R_CURLY@[21; 22) "}" | 30 | R_CURLY@[21; 22) "}" |
31 | WHITESPACE@[22; 23) "\n" | 31 | WHITESPACE@[22; 23) "\n" |
32 | error 19: expected colon | 32 | error [19; 19): expected colon |
diff --git a/crates/ra_syntax/test_data/parser/err/0015_curly_in_params.txt b/crates/ra_syntax/test_data/parser/err/0015_curly_in_params.txt index 23ca0c446..36b848be3 100644 --- a/crates/ra_syntax/test_data/parser/err/0015_curly_in_params.txt +++ b/crates/ra_syntax/test_data/parser/err/0015_curly_in_params.txt | |||
@@ -16,9 +16,9 @@ SOURCE_FILE@[0; 14) | |||
16 | WHITESPACE@[11; 12) "\n" | 16 | WHITESPACE@[11; 12) "\n" |
17 | R_CURLY@[12; 13) "}" | 17 | R_CURLY@[12; 13) "}" |
18 | WHITESPACE@[13; 14) "\n" | 18 | WHITESPACE@[13; 14) "\n" |
19 | error 7: expected value parameter | 19 | error [7; 7): expected value parameter |
20 | error 7: expected R_PAREN | 20 | error [7; 7): expected R_PAREN |
21 | error 7: expected a block | 21 | error [7; 7): expected a block |
22 | error 7: unmatched `}` | 22 | error [7; 7): unmatched `}` |
23 | error 8: expected an item | 23 | error [8; 8): expected an item |
24 | error 10: expected an item | 24 | error [10; 10): expected an item |
diff --git a/crates/ra_syntax/test_data/parser/err/0016_missing_semi.txt b/crates/ra_syntax/test_data/parser/err/0016_missing_semi.txt index bc5be6a66..6343580e0 100644 --- a/crates/ra_syntax/test_data/parser/err/0016_missing_semi.txt +++ b/crates/ra_syntax/test_data/parser/err/0016_missing_semi.txt | |||
@@ -41,4 +41,4 @@ SOURCE_FILE@[0; 56) | |||
41 | WHITESPACE@[53; 54) "\n" | 41 | WHITESPACE@[53; 54) "\n" |
42 | R_CURLY@[54; 55) "}" | 42 | R_CURLY@[54; 55) "}" |
43 | WHITESPACE@[55; 56) "\n" | 43 | WHITESPACE@[55; 56) "\n" |
44 | error 38: expected SEMI | 44 | error [38; 38): expected SEMI |
diff --git a/crates/ra_syntax/test_data/parser/err/0017_incomplete_binexpr.txt b/crates/ra_syntax/test_data/parser/err/0017_incomplete_binexpr.txt index 9033a5b38..59480e999 100644 --- a/crates/ra_syntax/test_data/parser/err/0017_incomplete_binexpr.txt +++ b/crates/ra_syntax/test_data/parser/err/0017_incomplete_binexpr.txt | |||
@@ -44,4 +44,4 @@ SOURCE_FILE@[0; 47) | |||
44 | WHITESPACE@[44; 45) "\n" | 44 | WHITESPACE@[44; 45) "\n" |
45 | R_CURLY@[45; 46) "}" | 45 | R_CURLY@[45; 46) "}" |
46 | WHITESPACE@[46; 47) "\n" | 46 | WHITESPACE@[46; 47) "\n" |
47 | error 44: expected expression | 47 | error [44; 44): expected expression |
diff --git a/crates/ra_syntax/test_data/parser/err/0018_incomplete_fn.txt b/crates/ra_syntax/test_data/parser/err/0018_incomplete_fn.txt index d12f4c99b..b9e60f6c1 100644 --- a/crates/ra_syntax/test_data/parser/err/0018_incomplete_fn.txt +++ b/crates/ra_syntax/test_data/parser/err/0018_incomplete_fn.txt | |||
@@ -125,8 +125,8 @@ SOURCE_FILE@[0; 183) | |||
125 | WHITESPACE@[180; 181) "\n" | 125 | WHITESPACE@[180; 181) "\n" |
126 | R_CURLY@[181; 182) "}" | 126 | R_CURLY@[181; 182) "}" |
127 | WHITESPACE@[182; 183) "\n" | 127 | WHITESPACE@[182; 183) "\n" |
128 | error 34: expected pattern | 128 | error [34; 34): expected pattern |
129 | error 34: expected COLON | 129 | error [34; 34): expected COLON |
130 | error 34: expected type | 130 | error [34; 34): expected type |
131 | error 180: expected function arguments | 131 | error [180; 180): expected function arguments |
132 | error 180: expected a block | 132 | error [180; 180): expected a block |
diff --git a/crates/ra_syntax/test_data/parser/err/0019_let_recover.txt b/crates/ra_syntax/test_data/parser/err/0019_let_recover.txt index cc3578e54..97e91a94f 100644 --- a/crates/ra_syntax/test_data/parser/err/0019_let_recover.txt +++ b/crates/ra_syntax/test_data/parser/err/0019_let_recover.txt | |||
@@ -95,13 +95,13 @@ SOURCE_FILE@[0; 139) | |||
95 | WHITESPACE@[136; 137) "\n" | 95 | WHITESPACE@[136; 137) "\n" |
96 | R_CURLY@[137; 138) "}" | 96 | R_CURLY@[137; 138) "}" |
97 | WHITESPACE@[138; 139) "\n" | 97 | WHITESPACE@[138; 139) "\n" |
98 | error 24: expected expression | 98 | error [24; 24): expected expression |
99 | error 24: expected SEMI | 99 | error [24; 24): expected SEMI |
100 | error 49: expected pattern | 100 | error [49; 49): expected pattern |
101 | error 49: expected SEMI | 101 | error [49; 49): expected SEMI |
102 | error 75: expected pattern | 102 | error [75; 75): expected pattern |
103 | error 75: expected SEMI | 103 | error [75; 75): expected SEMI |
104 | error 98: expected pattern | 104 | error [98; 98): expected pattern |
105 | error 98: expected SEMI | 105 | error [98; 98): expected SEMI |
106 | error 124: expected pattern | 106 | error [124; 124): expected pattern |
107 | error 124: expected SEMI | 107 | error [124; 124): expected SEMI |
diff --git a/crates/ra_syntax/test_data/parser/err/0020_fn_recover.txt b/crates/ra_syntax/test_data/parser/err/0020_fn_recover.txt index 70727d059..c11dc23f5 100644 --- a/crates/ra_syntax/test_data/parser/err/0020_fn_recover.txt +++ b/crates/ra_syntax/test_data/parser/err/0020_fn_recover.txt | |||
@@ -16,6 +16,6 @@ SOURCE_FILE@[0; 16) | |||
16 | L_CURLY@[13; 14) "{" | 16 | L_CURLY@[13; 14) "{" |
17 | R_CURLY@[14; 15) "}" | 17 | R_CURLY@[14; 15) "}" |
18 | WHITESPACE@[15; 16) "\n" | 18 | WHITESPACE@[15; 16) "\n" |
19 | error 2: expected a name | 19 | error [2; 2): expected a name |
20 | error 2: expected function arguments | 20 | error [2; 2): expected function arguments |
21 | error 2: expected a block | 21 | error [2; 2): expected a block |
diff --git a/crates/ra_syntax/test_data/parser/err/0021_incomplete_param.txt b/crates/ra_syntax/test_data/parser/err/0021_incomplete_param.txt index 333782480..ae04122d8 100644 --- a/crates/ra_syntax/test_data/parser/err/0021_incomplete_param.txt +++ b/crates/ra_syntax/test_data/parser/err/0021_incomplete_param.txt | |||
@@ -31,5 +31,5 @@ SOURCE_FILE@[0; 22) | |||
31 | WHITESPACE@[19; 20) "\n" | 31 | WHITESPACE@[19; 20) "\n" |
32 | R_CURLY@[20; 21) "}" | 32 | R_CURLY@[20; 21) "}" |
33 | WHITESPACE@[21; 22) "\n" | 33 | WHITESPACE@[21; 22) "\n" |
34 | error 16: expected COLON | 34 | error [16; 16): expected COLON |
35 | error 16: expected type | 35 | error [16; 16): expected type |
diff --git a/crates/ra_syntax/test_data/parser/err/0022_bad_exprs.txt b/crates/ra_syntax/test_data/parser/err/0022_bad_exprs.txt index cb45eb2fc..bb87022b0 100644 --- a/crates/ra_syntax/test_data/parser/err/0022_bad_exprs.txt +++ b/crates/ra_syntax/test_data/parser/err/0022_bad_exprs.txt | |||
@@ -148,36 +148,36 @@ SOURCE_FILE@[0; 112) | |||
148 | WHITESPACE@[109; 110) " " | 148 | WHITESPACE@[109; 110) " " |
149 | R_CURLY@[110; 111) "}" | 149 | R_CURLY@[110; 111) "}" |
150 | WHITESPACE@[111; 112) "\n" | 150 | WHITESPACE@[111; 112) "\n" |
151 | error 16: expected expression | 151 | error [16; 16): expected expression |
152 | error 17: expected R_BRACK | 152 | error [17; 17): expected R_BRACK |
153 | error 17: expected SEMI | 153 | error [17; 17): expected SEMI |
154 | error 17: expected expression | 154 | error [17; 17): expected expression |
155 | error 18: expected SEMI | 155 | error [18; 18): expected SEMI |
156 | error 25: expected a name | 156 | error [25; 25): expected a name |
157 | error 26: expected `;`, `{`, or `(` | 157 | error [26; 26): expected `;`, `{`, or `(` |
158 | error 30: expected pattern | 158 | error [30; 30): expected pattern |
159 | error 31: expected SEMI | 159 | error [31; 31): expected SEMI |
160 | error 53: expected expression | 160 | error [53; 53): expected expression |
161 | error 54: expected SEMI | 161 | error [54; 54): expected SEMI |
162 | error 54: expected expression | 162 | error [54; 54): expected expression |
163 | error 55: expected SEMI | 163 | error [55; 55): expected SEMI |
164 | error 60: expected type | 164 | error [60; 60): expected type |
165 | error 60: expected `{` | 165 | error [60; 60): expected `{` |
166 | error 60: expected expression | 166 | error [60; 60): expected expression |
167 | error 61: expected SEMI | 167 | error [61; 61): expected SEMI |
168 | error 65: expected pattern | 168 | error [65; 65): expected pattern |
169 | error 65: expected SEMI | 169 | error [65; 65): expected SEMI |
170 | error 65: expected expression | 170 | error [65; 65): expected expression |
171 | error 92: expected expression | 171 | error [92; 92): expected expression |
172 | error 93: expected SEMI | 172 | error [93; 93): expected SEMI |
173 | error 93: expected expression | 173 | error [93; 93): expected expression |
174 | error 94: expected SEMI | 174 | error [94; 94): expected SEMI |
175 | error 95: expected expression | 175 | error [95; 95): expected expression |
176 | error 96: expected SEMI | 176 | error [96; 96): expected SEMI |
177 | error 96: expected expression | 177 | error [96; 96): expected expression |
178 | error 97: expected SEMI | 178 | error [97; 97): expected SEMI |
179 | error 103: expected a name | 179 | error [103; 103): expected a name |
180 | error 104: expected `{` | 180 | error [104; 104): expected `{` |
181 | error 108: expected pattern | 181 | error [108; 108): expected pattern |
182 | error 108: expected SEMI | 182 | error [108; 108): expected SEMI |
183 | error 108: expected expression | 183 | error [108; 108): expected expression |
diff --git a/crates/ra_syntax/test_data/parser/err/0023_mismatched_paren.txt b/crates/ra_syntax/test_data/parser/err/0023_mismatched_paren.txt index 6dd04f80e..775e4b0da 100644 --- a/crates/ra_syntax/test_data/parser/err/0023_mismatched_paren.txt +++ b/crates/ra_syntax/test_data/parser/err/0023_mismatched_paren.txt | |||
@@ -40,5 +40,5 @@ SOURCE_FILE@[0; 94) | |||
40 | ERROR@[92; 93) | 40 | ERROR@[92; 93) |
41 | R_CURLY@[92; 93) "}" | 41 | R_CURLY@[92; 93) "}" |
42 | WHITESPACE@[93; 94) "\n" | 42 | WHITESPACE@[93; 94) "\n" |
43 | error 49: unmatched `}` | 43 | error [49; 49): unmatched `}` |
44 | error 92: unmatched `}` | 44 | error [92; 92): unmatched `}` |
diff --git a/crates/ra_syntax/test_data/parser/err/0024_many_type_parens.txt b/crates/ra_syntax/test_data/parser/err/0024_many_type_parens.txt index 0a93e11a5..c5c8a29ba 100644 --- a/crates/ra_syntax/test_data/parser/err/0024_many_type_parens.txt +++ b/crates/ra_syntax/test_data/parser/err/0024_many_type_parens.txt | |||
@@ -290,32 +290,32 @@ SOURCE_FILE@[0; 240) | |||
290 | WHITESPACE@[237; 238) "\n" | 290 | WHITESPACE@[237; 238) "\n" |
291 | R_CURLY@[238; 239) "}" | 291 | R_CURLY@[238; 239) "}" |
292 | WHITESPACE@[239; 240) "\n" | 292 | WHITESPACE@[239; 240) "\n" |
293 | error 88: expected COMMA | 293 | error [88; 88): expected COMMA |
294 | error 88: expected R_ANGLE | 294 | error [88; 88): expected R_ANGLE |
295 | error 121: expected SEMI | 295 | error [121; 121): expected SEMI |
296 | error 121: expected expression | 296 | error [121; 121): expected expression |
297 | error 140: expected type | 297 | error [140; 140): expected type |
298 | error 141: expected R_PAREN | 298 | error [141; 141): expected R_PAREN |
299 | error 141: expected COMMA | 299 | error [141; 141): expected COMMA |
300 | error 141: expected R_ANGLE | 300 | error [141; 141): expected R_ANGLE |
301 | error 141: expected SEMI | 301 | error [141; 141): expected SEMI |
302 | error 146: expected SEMI | 302 | error [146; 146): expected SEMI |
303 | error 146: expected expression | 303 | error [146; 146): expected expression |
304 | error 147: expected SEMI | 304 | error [147; 147): expected SEMI |
305 | error 148: expected expression | 305 | error [148; 148): expected expression |
306 | error 149: expected SEMI | 306 | error [149; 149): expected SEMI |
307 | error 154: expected pattern | 307 | error [154; 154): expected pattern |
308 | error 155: expected IN_KW | 308 | error [155; 155): expected IN_KW |
309 | error 155: expected expression | 309 | error [155; 155): expected expression |
310 | error 157: expected a block | 310 | error [157; 157): expected a block |
311 | error 165: expected expression | 311 | error [165; 165): expected expression |
312 | error 168: expected expression | 312 | error [168; 168): expected expression |
313 | error 179: expected expression | 313 | error [179; 179): expected expression |
314 | error 180: expected COMMA | 314 | error [180; 180): expected COMMA |
315 | error 180: expected expression | 315 | error [180; 180): expected expression |
316 | error 180: expected R_PAREN | 316 | error [180; 180): expected R_PAREN |
317 | error 180: expected SEMI | 317 | error [180; 180): expected SEMI |
318 | error 215: expected COMMA | 318 | error [215; 215): expected COMMA |
319 | error 215: expected R_ANGLE | 319 | error [215; 215): expected R_ANGLE |
320 | error 235: expected SEMI | 320 | error [235; 235): expected SEMI |
321 | error 235: expected expression | 321 | error [235; 235): expected expression |
diff --git a/crates/ra_syntax/test_data/parser/err/0025_nope.txt b/crates/ra_syntax/test_data/parser/err/0025_nope.txt index 8369f4bda..ca7f2d255 100644 --- a/crates/ra_syntax/test_data/parser/err/0025_nope.txt +++ b/crates/ra_syntax/test_data/parser/err/0025_nope.txt | |||
@@ -191,14 +191,14 @@ SOURCE_FILE@[0; 575) | |||
191 | WHITESPACE@[572; 573) "\n" | 191 | WHITESPACE@[572; 573) "\n" |
192 | R_CURLY@[573; 574) "}" | 192 | R_CURLY@[573; 574) "}" |
193 | WHITESPACE@[574; 575) "\n" | 193 | WHITESPACE@[574; 575) "\n" |
194 | error 95: expected type | 194 | error [95; 95): expected type |
195 | error 95: expected COMMA | 195 | error [95; 95): expected COMMA |
196 | error 96: expected field | 196 | error [96; 96): expected field |
197 | error 98: expected field declaration | 197 | error [98; 98): expected field declaration |
198 | error 371: expected COMMA | 198 | error [371; 371): expected COMMA |
199 | error 372: expected a type | 199 | error [372; 372): expected a type |
200 | error 372: expected R_PAREN | 200 | error [372; 372): expected R_PAREN |
201 | error 372: expected COMMA | 201 | error [372; 372): expected COMMA |
202 | error 372: expected enum variant | 202 | error [372; 372): expected enum variant |
203 | error 374: expected enum variant | 203 | error [374; 374): expected enum variant |
204 | error 508: expected expression | 204 | error [508; 508): expected expression |
diff --git a/crates/ra_syntax/test_data/parser/err/0026_imp_recovery.txt b/crates/ra_syntax/test_data/parser/err/0026_imp_recovery.txt index d3da2f54f..3942e0904 100644 --- a/crates/ra_syntax/test_data/parser/err/0026_imp_recovery.txt +++ b/crates/ra_syntax/test_data/parser/err/0026_imp_recovery.txt | |||
@@ -45,5 +45,5 @@ SOURCE_FILE@[0; 38) | |||
45 | L_CURLY@[35; 36) "{" | 45 | L_CURLY@[35; 36) "{" |
46 | R_CURLY@[36; 37) "}" | 46 | R_CURLY@[36; 37) "}" |
47 | WHITESPACE@[37; 38) "\n" | 47 | WHITESPACE@[37; 38) "\n" |
48 | error 14: expected trait or type | 48 | error [14; 14): expected trait or type |
49 | error 14: expected `{` | 49 | error [14; 14): expected `{` |
diff --git a/crates/ra_syntax/test_data/parser/err/0027_incomplere_where_for.txt b/crates/ra_syntax/test_data/parser/err/0027_incomplere_where_for.txt index 9298b45a4..4a28bcabf 100644 --- a/crates/ra_syntax/test_data/parser/err/0027_incomplere_where_for.txt +++ b/crates/ra_syntax/test_data/parser/err/0027_incomplere_where_for.txt | |||
@@ -25,5 +25,5 @@ SOURCE_FILE@[0; 30) | |||
25 | L_CURLY@[27; 28) "{" | 25 | L_CURLY@[27; 28) "{" |
26 | R_CURLY@[28; 29) "}" | 26 | R_CURLY@[28; 29) "}" |
27 | WHITESPACE@[29; 30) "\n" | 27 | WHITESPACE@[29; 30) "\n" |
28 | error 26: expected a path | 28 | error [26; 26): expected a path |
29 | error 26: expected colon | 29 | error [26; 26): expected colon |
diff --git a/crates/ra_syntax/test_data/parser/err/0029_field_completion.txt b/crates/ra_syntax/test_data/parser/err/0029_field_completion.txt index e3e1282ec..177849476 100644 --- a/crates/ra_syntax/test_data/parser/err/0029_field_completion.txt +++ b/crates/ra_syntax/test_data/parser/err/0029_field_completion.txt | |||
@@ -33,4 +33,4 @@ SOURCE_FILE@[0; 24) | |||
33 | WHITESPACE@[21; 22) "\n" | 33 | WHITESPACE@[21; 22) "\n" |
34 | R_CURLY@[22; 23) "}" | 34 | R_CURLY@[22; 23) "}" |
35 | WHITESPACE@[23; 24) "\n" | 35 | WHITESPACE@[23; 24) "\n" |
36 | error 21: expected field name or number | 36 | error [21; 21): expected field name or number |
diff --git a/crates/ra_syntax/test_data/parser/err/0032_match_arms_inner_attrs.txt b/crates/ra_syntax/test_data/parser/err/0032_match_arms_inner_attrs.txt index dbc0081ac..c36e2f770 100644 --- a/crates/ra_syntax/test_data/parser/err/0032_match_arms_inner_attrs.txt +++ b/crates/ra_syntax/test_data/parser/err/0032_match_arms_inner_attrs.txt | |||
@@ -191,14 +191,14 @@ SOURCE_FILE@[0; 293) | |||
191 | WHITESPACE@[290; 291) "\n" | 191 | WHITESPACE@[290; 291) "\n" |
192 | R_CURLY@[291; 292) "}" | 192 | R_CURLY@[291; 292) "}" |
193 | WHITESPACE@[292; 293) "\n" | 193 | WHITESPACE@[292; 293) "\n" |
194 | error 52: expected `[` | 194 | error [52; 52): expected `[` |
195 | error 52: expected pattern | 195 | error [52; 52): expected pattern |
196 | error 53: expected FAT_ARROW | 196 | error [53; 53): expected FAT_ARROW |
197 | error 78: expected COMMA | 197 | error [78; 78): expected COMMA |
198 | error 161: expected `[` | 198 | error [161; 161): expected `[` |
199 | error 161: expected pattern | 199 | error [161; 161): expected pattern |
200 | error 162: expected FAT_ARROW | 200 | error [162; 162): expected FAT_ARROW |
201 | error 232: expected `[` | 201 | error [232; 232): expected `[` |
202 | error 232: expected pattern | 202 | error [232; 232): expected pattern |
203 | error 233: expected FAT_ARROW | 203 | error [233; 233): expected FAT_ARROW |
204 | error 250: expected COMMA | 204 | error [250; 250): expected COMMA |
diff --git a/crates/ra_syntax/test_data/parser/err/0033_match_arms_outer_attrs.txt b/crates/ra_syntax/test_data/parser/err/0033_match_arms_outer_attrs.txt index fd5ccc3f2..e914e688b 100644 --- a/crates/ra_syntax/test_data/parser/err/0033_match_arms_outer_attrs.txt +++ b/crates/ra_syntax/test_data/parser/err/0033_match_arms_outer_attrs.txt | |||
@@ -62,6 +62,6 @@ SOURCE_FILE@[0; 89) | |||
62 | WHITESPACE@[86; 87) "\n" | 62 | WHITESPACE@[86; 87) "\n" |
63 | R_CURLY@[87; 88) "}" | 63 | R_CURLY@[87; 88) "}" |
64 | WHITESPACE@[88; 89) "\n" | 64 | WHITESPACE@[88; 89) "\n" |
65 | error 80: expected pattern | 65 | error [80; 80): expected pattern |
66 | error 80: expected FAT_ARROW | 66 | error [80; 80): expected FAT_ARROW |
67 | error 80: expected expression | 67 | error [80; 80): expected expression |
diff --git a/crates/ra_syntax/test_data/parser/err/0034_bad_box_pattern.txt b/crates/ra_syntax/test_data/parser/err/0034_bad_box_pattern.txt index 21269fb02..2c91b6841 100644 --- a/crates/ra_syntax/test_data/parser/err/0034_bad_box_pattern.txt +++ b/crates/ra_syntax/test_data/parser/err/0034_bad_box_pattern.txt | |||
@@ -88,9 +88,9 @@ SOURCE_FILE@[0; 91) | |||
88 | WHITESPACE@[87; 88) "\n" | 88 | WHITESPACE@[87; 88) "\n" |
89 | R_CURLY@[88; 89) "}" | 89 | R_CURLY@[88; 89) "}" |
90 | WHITESPACE@[89; 91) "\n\n" | 90 | WHITESPACE@[89; 91) "\n\n" |
91 | error 24: expected a name | 91 | error [24; 24): expected a name |
92 | error 27: expected SEMI | 92 | error [27; 27): expected SEMI |
93 | error 48: expected a name | 93 | error [48; 48): expected a name |
94 | error 51: expected SEMI | 94 | error [51; 51): expected SEMI |
95 | error 76: expected a name | 95 | error [76; 76): expected a name |
96 | error 79: expected SEMI | 96 | error [79; 79): expected SEMI |
diff --git a/crates/ra_syntax/test_data/parser/err/0035_use_recover.txt b/crates/ra_syntax/test_data/parser/err/0035_use_recover.txt index 636840828..8cb4ea796 100644 --- a/crates/ra_syntax/test_data/parser/err/0035_use_recover.txt +++ b/crates/ra_syntax/test_data/parser/err/0035_use_recover.txt | |||
@@ -48,7 +48,7 @@ SOURCE_FILE@[0; 48) | |||
48 | L_CURLY@[45; 46) "{" | 48 | L_CURLY@[45; 46) "{" |
49 | R_CURLY@[46; 47) "}" | 49 | R_CURLY@[46; 47) "}" |
50 | WHITESPACE@[47; 48) "\n" | 50 | WHITESPACE@[47; 48) "\n" |
51 | error 17: expected one of `*`, `::`, `{`, `self`, `super` or an identifier | 51 | error [17; 17): expected one of `*`, `::`, `{`, `self`, `super` or an identifier |
52 | error 17: expected SEMI | 52 | error [17; 17): expected SEMI |
53 | error 37: expected one of `*`, `::`, `{`, `self`, `super` or an identifier | 53 | error [37; 37): expected one of `*`, `::`, `{`, `self`, `super` or an identifier |
54 | error 37: expected SEMI | 54 | error [37; 37): expected SEMI |
diff --git a/crates/ra_syntax/test_data/parser/err/0036_partial_use.txt b/crates/ra_syntax/test_data/parser/err/0036_partial_use.txt index 181f408c8..f5490fbe8 100644 --- a/crates/ra_syntax/test_data/parser/err/0036_partial_use.txt +++ b/crates/ra_syntax/test_data/parser/err/0036_partial_use.txt | |||
@@ -39,13 +39,13 @@ SOURCE_FILE@[0; 37) | |||
39 | ERROR@[35; 36) | 39 | ERROR@[35; 36) |
40 | SEMI@[35; 36) ";" | 40 | SEMI@[35; 36) ";" |
41 | WHITESPACE@[36; 37) "\n" | 41 | WHITESPACE@[36; 37) "\n" |
42 | error 22: expected COMMA | 42 | error [22; 22): expected COMMA |
43 | error 22: expected one of `*`, `::`, `{`, `self`, `super` or an identifier | 43 | error [22; 22): expected one of `*`, `::`, `{`, `self`, `super` or an identifier |
44 | error 23: expected COMMA | 44 | error [23; 23): expected COMMA |
45 | error 24: expected one of `*`, `::`, `{`, `self`, `super` or an identifier | 45 | error [24; 24): expected one of `*`, `::`, `{`, `self`, `super` or an identifier |
46 | error 27: expected COMMA | 46 | error [27; 27): expected COMMA |
47 | error 35: expected COMMA | 47 | error [35; 35): expected COMMA |
48 | error 35: expected one of `*`, `::`, `{`, `self`, `super` or an identifier | 48 | error [35; 35): expected one of `*`, `::`, `{`, `self`, `super` or an identifier |
49 | error 36: expected COMMA | 49 | error [36; 36): expected COMMA |
50 | error 36: expected R_CURLY | 50 | error [36; 36): expected R_CURLY |
51 | error 36: expected SEMI | 51 | error [36; 36): expected SEMI |
diff --git a/crates/ra_syntax/test_data/parser/err/0037_visibility_in_traits.txt b/crates/ra_syntax/test_data/parser/err/0037_visibility_in_traits.txt index 749c8cddb..d0a128a5f 100644 --- a/crates/ra_syntax/test_data/parser/err/0037_visibility_in_traits.txt +++ b/crates/ra_syntax/test_data/parser/err/0037_visibility_in_traits.txt | |||
@@ -94,6 +94,6 @@ SOURCE_FILE@[0; 118) | |||
94 | WHITESPACE@[115; 116) "\n" | 94 | WHITESPACE@[115; 116) "\n" |
95 | R_CURLY@[116; 117) "}" | 95 | R_CURLY@[116; 117) "}" |
96 | WHITESPACE@[117; 118) "\n" | 96 | WHITESPACE@[117; 118) "\n" |
97 | error [36; 39): unnecessary visibility qualifier | 97 | error [36; 39): Unnecessary visibility qualifier |
98 | error [56; 66): unnecessary visibility qualifier | 98 | error [56; 66): Unnecessary visibility qualifier |
99 | error [86; 96): unnecessary visibility qualifier | 99 | error [86; 96): Unnecessary visibility qualifier |
diff --git a/crates/ra_syntax/test_data/parser/err/0039_lambda_recovery.txt b/crates/ra_syntax/test_data/parser/err/0039_lambda_recovery.txt index d1544634c..4a2f0a696 100644 --- a/crates/ra_syntax/test_data/parser/err/0039_lambda_recovery.txt +++ b/crates/ra_syntax/test_data/parser/err/0039_lambda_recovery.txt | |||
@@ -80,4 +80,4 @@ SOURCE_FILE@[0; 83) | |||
80 | WHITESPACE@[80; 81) "\n" | 80 | WHITESPACE@[80; 81) "\n" |
81 | R_CURLY@[81; 82) "}" | 81 | R_CURLY@[81; 82) "}" |
82 | WHITESPACE@[82; 83) "\n" | 82 | WHITESPACE@[82; 83) "\n" |
83 | error 56: expected expression | 83 | error [56; 56): expected expression |