aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax/test_data/parser/err
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2020-02-18 12:57:26 +0000
committerGitHub <[email protected]>2020-02-18 12:57:26 +0000
commitc447fe9bc06006a7080da782cf67d739c91b534c (patch)
tree45cbc9578b24437da3eedc6a234784be22b1f38c /crates/ra_syntax/test_data/parser/err
parent742459c8fe08e359ae380e3e1dc0d059c0b4f871 (diff)
parent053ccf4121797e4e559e3225d46d3f23cb1ad70b (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')
-rw-r--r--crates/ra_syntax/test_data/parser/err/0000_struct_field_missing_comma.txt2
-rw-r--r--crates/ra_syntax/test_data/parser/err/0001_item_recovery_in_file.txt4
-rw-r--r--crates/ra_syntax/test_data/parser/err/0002_duplicate_shebang.txt22
-rw-r--r--crates/ra_syntax/test_data/parser/err/0003_C++_semicolon.txt2
-rw-r--r--crates/ra_syntax/test_data/parser/err/0004_use_path_bad_segment.txt2
-rw-r--r--crates/ra_syntax/test_data/parser/err/0005_attribute_recover.txt6
-rw-r--r--crates/ra_syntax/test_data/parser/err/0006_named_field_recovery.txt16
-rw-r--r--crates/ra_syntax/test_data/parser/err/0007_stray_curly_in_file.txt6
-rw-r--r--crates/ra_syntax/test_data/parser/err/0008_item_block_recovery.txt6
-rw-r--r--crates/ra_syntax/test_data/parser/err/0009_broken_struct_type_parameter.txt22
-rw-r--r--crates/ra_syntax/test_data/parser/err/0010_unsafe_lambda_block.txt2
-rw-r--r--crates/ra_syntax/test_data/parser/err/0011_extern_struct.txt2
-rw-r--r--crates/ra_syntax/test_data/parser/err/0013_invalid_type.txt36
-rw-r--r--crates/ra_syntax/test_data/parser/err/0014_where_no_bounds.txt2
-rw-r--r--crates/ra_syntax/test_data/parser/err/0015_curly_in_params.txt12
-rw-r--r--crates/ra_syntax/test_data/parser/err/0016_missing_semi.txt2
-rw-r--r--crates/ra_syntax/test_data/parser/err/0017_incomplete_binexpr.txt2
-rw-r--r--crates/ra_syntax/test_data/parser/err/0018_incomplete_fn.txt10
-rw-r--r--crates/ra_syntax/test_data/parser/err/0019_let_recover.txt20
-rw-r--r--crates/ra_syntax/test_data/parser/err/0020_fn_recover.txt6
-rw-r--r--crates/ra_syntax/test_data/parser/err/0021_incomplete_param.txt4
-rw-r--r--crates/ra_syntax/test_data/parser/err/0022_bad_exprs.txt66
-rw-r--r--crates/ra_syntax/test_data/parser/err/0023_mismatched_paren.txt4
-rw-r--r--crates/ra_syntax/test_data/parser/err/0024_many_type_parens.txt58
-rw-r--r--crates/ra_syntax/test_data/parser/err/0025_nope.txt22
-rw-r--r--crates/ra_syntax/test_data/parser/err/0026_imp_recovery.txt4
-rw-r--r--crates/ra_syntax/test_data/parser/err/0027_incomplere_where_for.txt4
-rw-r--r--crates/ra_syntax/test_data/parser/err/0029_field_completion.txt2
-rw-r--r--crates/ra_syntax/test_data/parser/err/0032_match_arms_inner_attrs.txt22
-rw-r--r--crates/ra_syntax/test_data/parser/err/0033_match_arms_outer_attrs.txt6
-rw-r--r--crates/ra_syntax/test_data/parser/err/0034_bad_box_pattern.txt12
-rw-r--r--crates/ra_syntax/test_data/parser/err/0035_use_recover.txt8
-rw-r--r--crates/ra_syntax/test_data/parser/err/0036_partial_use.txt20
-rw-r--r--crates/ra_syntax/test_data/parser/err/0037_visibility_in_traits.txt6
-rw-r--r--crates/ra_syntax/test_data/parser/err/0039_lambda_recovery.txt2
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) "}"
34error 21: expected COMMA 34error [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) "}"
17error 0: expected an item 17error [0; 0): expected an item
18error 3: expected an item 18error [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"
29error 23: expected `[` 29error [23; 23): expected `[`
30error 23: expected an item 30error [23; 23): expected an item
31error 27: expected one of `*`, `::`, `{`, `self`, `super` or an identifier 31error [27; 27): expected one of `*`, `::`, `{`, `self`, `super` or an identifier
32error 28: expected SEMI 32error [28; 28): expected SEMI
33error 31: expected EXCL 33error [31; 31): expected EXCL
34error 31: expected `{`, `[`, `(` 34error [31; 31): expected `{`, `[`, `(`
35error 31: expected SEMI 35error [31; 31): expected SEMI
36error 31: expected an item 36error [31; 31): expected an item
37error 35: expected EXCL 37error [35; 35): expected EXCL
38error 41: expected `{`, `[`, `(` 38error [41; 41): expected `{`, `[`, `(`
39error 41: expected SEMI 39error [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) ";"
38error 39: expected item, found `;` 38error [39; 39): expected item, found `;`
39consider removing this semicolon 39consider 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) ";"
16error 9: expected identifier 16error [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"
58error 53: expected R_PAREN 58error [53; 53): expected R_PAREN
59error 53: expected `]` 59error [53; 53): expected `]`
60error 53: expected an item 60error [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"
67error 31: expected field declaration 67error [31; 31): expected field declaration
68error 33: expected COMMA 68error [33; 33): expected COMMA
69error 38: expected field declaration 69error [38; 38): expected field declaration
70error 39: expected COMMA 70error [39; 39): expected COMMA
71error 40: expected field declaration 71error [40; 40): expected field declaration
72error 41: expected COMMA 72error [41; 41): expected COMMA
73error 42: expected field declaration 73error [42; 42): expected field declaration
74error 43: expected COMMA 74error [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"
31error 0: unmatched `}` 31error [0; 0): unmatched `}`
32error 14: unmatched `}` 32error [14; 14): unmatched `}`
33error 29: unmatched `}` 33error [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"
79error 17: expected EXCL 79error [17; 17): expected EXCL
80error 19: expected SEMI 80error [19; 19): expected SEMI
81error 20: expected an item 81error [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"
48error 9: expected type parameter 48error [9; 9): expected type parameter
49error 11: expected COMMA 49error [11; 11): expected COMMA
50error 11: expected R_ANGLE 50error [11; 11): expected R_ANGLE
51error 11: expected `;`, `{`, or `(` 51error [11; 11): expected `;`, `{`, or `(`
52error 12: expected an item 52error [12; 12): expected an item
53error 14: expected an item 53error [14; 14): expected an item
54error 15: expected an item 54error [15; 15): expected an item
55error 17: expected an item 55error [17; 17): expected an item
56error 24: expected SEMI 56error [24; 24): expected SEMI
57error 24: expected expression 57error [24; 24): expected expression
58error 25: expected SEMI 58error [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"
43error 24: expected `{` 43error [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"
13error 6: expected existential, fn, trait or impl 13error [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"
72error 67: expected type 72error [67; 67): expected type
73error 68: expected COMMA 73error [68; 68): expected COMMA
74error 68: expected R_ANGLE 74error [68; 68): expected R_ANGLE
75error 68: expected COMMA 75error [68; 68): expected COMMA
76error 68: expected R_ANGLE 76error [68; 68): expected R_ANGLE
77error 68: expected COMMA 77error [68; 68): expected COMMA
78error 68: expected R_ANGLE 78error [68; 68): expected R_ANGLE
79error 68: expected COMMA 79error [68; 68): expected COMMA
80error 72: expected COMMA 80error [72; 72): expected COMMA
81error 72: expected a type 81error [72; 72): expected a type
82error 72: expected R_PAREN 82error [72; 72): expected R_PAREN
83error 72: expected SEMI 83error [72; 72): expected SEMI
84error 72: expected an item 84error [72; 72): expected an item
85error 73: expected an item 85error [73; 73): expected an item
86error 79: expected an item 86error [79; 79): expected an item
87error 80: expected an item 87error [80; 80): expected an item
88error 82: expected an item 88error [82; 82): expected an item
89error 83: expected an item 89error [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"
32error 19: expected colon 32error [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"
19error 7: expected value parameter 19error [7; 7): expected value parameter
20error 7: expected R_PAREN 20error [7; 7): expected R_PAREN
21error 7: expected a block 21error [7; 7): expected a block
22error 7: unmatched `}` 22error [7; 7): unmatched `}`
23error 8: expected an item 23error [8; 8): expected an item
24error 10: expected an item 24error [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"
44error 38: expected SEMI 44error [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"
47error 44: expected expression 47error [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"
128error 34: expected pattern 128error [34; 34): expected pattern
129error 34: expected COLON 129error [34; 34): expected COLON
130error 34: expected type 130error [34; 34): expected type
131error 180: expected function arguments 131error [180; 180): expected function arguments
132error 180: expected a block 132error [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"
98error 24: expected expression 98error [24; 24): expected expression
99error 24: expected SEMI 99error [24; 24): expected SEMI
100error 49: expected pattern 100error [49; 49): expected pattern
101error 49: expected SEMI 101error [49; 49): expected SEMI
102error 75: expected pattern 102error [75; 75): expected pattern
103error 75: expected SEMI 103error [75; 75): expected SEMI
104error 98: expected pattern 104error [98; 98): expected pattern
105error 98: expected SEMI 105error [98; 98): expected SEMI
106error 124: expected pattern 106error [124; 124): expected pattern
107error 124: expected SEMI 107error [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"
19error 2: expected a name 19error [2; 2): expected a name
20error 2: expected function arguments 20error [2; 2): expected function arguments
21error 2: expected a block 21error [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"
34error 16: expected COLON 34error [16; 16): expected COLON
35error 16: expected type 35error [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"
151error 16: expected expression 151error [16; 16): expected expression
152error 17: expected R_BRACK 152error [17; 17): expected R_BRACK
153error 17: expected SEMI 153error [17; 17): expected SEMI
154error 17: expected expression 154error [17; 17): expected expression
155error 18: expected SEMI 155error [18; 18): expected SEMI
156error 25: expected a name 156error [25; 25): expected a name
157error 26: expected `;`, `{`, or `(` 157error [26; 26): expected `;`, `{`, or `(`
158error 30: expected pattern 158error [30; 30): expected pattern
159error 31: expected SEMI 159error [31; 31): expected SEMI
160error 53: expected expression 160error [53; 53): expected expression
161error 54: expected SEMI 161error [54; 54): expected SEMI
162error 54: expected expression 162error [54; 54): expected expression
163error 55: expected SEMI 163error [55; 55): expected SEMI
164error 60: expected type 164error [60; 60): expected type
165error 60: expected `{` 165error [60; 60): expected `{`
166error 60: expected expression 166error [60; 60): expected expression
167error 61: expected SEMI 167error [61; 61): expected SEMI
168error 65: expected pattern 168error [65; 65): expected pattern
169error 65: expected SEMI 169error [65; 65): expected SEMI
170error 65: expected expression 170error [65; 65): expected expression
171error 92: expected expression 171error [92; 92): expected expression
172error 93: expected SEMI 172error [93; 93): expected SEMI
173error 93: expected expression 173error [93; 93): expected expression
174error 94: expected SEMI 174error [94; 94): expected SEMI
175error 95: expected expression 175error [95; 95): expected expression
176error 96: expected SEMI 176error [96; 96): expected SEMI
177error 96: expected expression 177error [96; 96): expected expression
178error 97: expected SEMI 178error [97; 97): expected SEMI
179error 103: expected a name 179error [103; 103): expected a name
180error 104: expected `{` 180error [104; 104): expected `{`
181error 108: expected pattern 181error [108; 108): expected pattern
182error 108: expected SEMI 182error [108; 108): expected SEMI
183error 108: expected expression 183error [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"
43error 49: unmatched `}` 43error [49; 49): unmatched `}`
44error 92: unmatched `}` 44error [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"
293error 88: expected COMMA 293error [88; 88): expected COMMA
294error 88: expected R_ANGLE 294error [88; 88): expected R_ANGLE
295error 121: expected SEMI 295error [121; 121): expected SEMI
296error 121: expected expression 296error [121; 121): expected expression
297error 140: expected type 297error [140; 140): expected type
298error 141: expected R_PAREN 298error [141; 141): expected R_PAREN
299error 141: expected COMMA 299error [141; 141): expected COMMA
300error 141: expected R_ANGLE 300error [141; 141): expected R_ANGLE
301error 141: expected SEMI 301error [141; 141): expected SEMI
302error 146: expected SEMI 302error [146; 146): expected SEMI
303error 146: expected expression 303error [146; 146): expected expression
304error 147: expected SEMI 304error [147; 147): expected SEMI
305error 148: expected expression 305error [148; 148): expected expression
306error 149: expected SEMI 306error [149; 149): expected SEMI
307error 154: expected pattern 307error [154; 154): expected pattern
308error 155: expected IN_KW 308error [155; 155): expected IN_KW
309error 155: expected expression 309error [155; 155): expected expression
310error 157: expected a block 310error [157; 157): expected a block
311error 165: expected expression 311error [165; 165): expected expression
312error 168: expected expression 312error [168; 168): expected expression
313error 179: expected expression 313error [179; 179): expected expression
314error 180: expected COMMA 314error [180; 180): expected COMMA
315error 180: expected expression 315error [180; 180): expected expression
316error 180: expected R_PAREN 316error [180; 180): expected R_PAREN
317error 180: expected SEMI 317error [180; 180): expected SEMI
318error 215: expected COMMA 318error [215; 215): expected COMMA
319error 215: expected R_ANGLE 319error [215; 215): expected R_ANGLE
320error 235: expected SEMI 320error [235; 235): expected SEMI
321error 235: expected expression 321error [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"
194error 95: expected type 194error [95; 95): expected type
195error 95: expected COMMA 195error [95; 95): expected COMMA
196error 96: expected field 196error [96; 96): expected field
197error 98: expected field declaration 197error [98; 98): expected field declaration
198error 371: expected COMMA 198error [371; 371): expected COMMA
199error 372: expected a type 199error [372; 372): expected a type
200error 372: expected R_PAREN 200error [372; 372): expected R_PAREN
201error 372: expected COMMA 201error [372; 372): expected COMMA
202error 372: expected enum variant 202error [372; 372): expected enum variant
203error 374: expected enum variant 203error [374; 374): expected enum variant
204error 508: expected expression 204error [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"
48error 14: expected trait or type 48error [14; 14): expected trait or type
49error 14: expected `{` 49error [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"
28error 26: expected a path 28error [26; 26): expected a path
29error 26: expected colon 29error [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"
36error 21: expected field name or number 36error [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"
194error 52: expected `[` 194error [52; 52): expected `[`
195error 52: expected pattern 195error [52; 52): expected pattern
196error 53: expected FAT_ARROW 196error [53; 53): expected FAT_ARROW
197error 78: expected COMMA 197error [78; 78): expected COMMA
198error 161: expected `[` 198error [161; 161): expected `[`
199error 161: expected pattern 199error [161; 161): expected pattern
200error 162: expected FAT_ARROW 200error [162; 162): expected FAT_ARROW
201error 232: expected `[` 201error [232; 232): expected `[`
202error 232: expected pattern 202error [232; 232): expected pattern
203error 233: expected FAT_ARROW 203error [233; 233): expected FAT_ARROW
204error 250: expected COMMA 204error [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"
65error 80: expected pattern 65error [80; 80): expected pattern
66error 80: expected FAT_ARROW 66error [80; 80): expected FAT_ARROW
67error 80: expected expression 67error [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"
91error 24: expected a name 91error [24; 24): expected a name
92error 27: expected SEMI 92error [27; 27): expected SEMI
93error 48: expected a name 93error [48; 48): expected a name
94error 51: expected SEMI 94error [51; 51): expected SEMI
95error 76: expected a name 95error [76; 76): expected a name
96error 79: expected SEMI 96error [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"
51error 17: expected one of `*`, `::`, `{`, `self`, `super` or an identifier 51error [17; 17): expected one of `*`, `::`, `{`, `self`, `super` or an identifier
52error 17: expected SEMI 52error [17; 17): expected SEMI
53error 37: expected one of `*`, `::`, `{`, `self`, `super` or an identifier 53error [37; 37): expected one of `*`, `::`, `{`, `self`, `super` or an identifier
54error 37: expected SEMI 54error [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"
42error 22: expected COMMA 42error [22; 22): expected COMMA
43error 22: expected one of `*`, `::`, `{`, `self`, `super` or an identifier 43error [22; 22): expected one of `*`, `::`, `{`, `self`, `super` or an identifier
44error 23: expected COMMA 44error [23; 23): expected COMMA
45error 24: expected one of `*`, `::`, `{`, `self`, `super` or an identifier 45error [24; 24): expected one of `*`, `::`, `{`, `self`, `super` or an identifier
46error 27: expected COMMA 46error [27; 27): expected COMMA
47error 35: expected COMMA 47error [35; 35): expected COMMA
48error 35: expected one of `*`, `::`, `{`, `self`, `super` or an identifier 48error [35; 35): expected one of `*`, `::`, `{`, `self`, `super` or an identifier
49error 36: expected COMMA 49error [36; 36): expected COMMA
50error 36: expected R_CURLY 50error [36; 36): expected R_CURLY
51error 36: expected SEMI 51error [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"
97error [36; 39): unnecessary visibility qualifier 97error [36; 39): Unnecessary visibility qualifier
98error [56; 66): unnecessary visibility qualifier 98error [56; 66): Unnecessary visibility qualifier
99error [86; 96): unnecessary visibility qualifier 99error [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"
83error 56: expected expression 83error [56; 56): expected expression