aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax/tests/data/parser/inline/err
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_syntax/tests/data/parser/inline/err')
-rw-r--r--crates/ra_syntax/tests/data/parser/inline/err/0001_array_type_missing_semi.txt10
-rw-r--r--crates/ra_syntax/tests/data/parser/inline/err/0002_misplaced_label_err.txt8
-rw-r--r--crates/ra_syntax/tests/data/parser/inline/err/0003_pointer_type_no_mutability.txt2
-rw-r--r--crates/ra_syntax/tests/data/parser/inline/err/0004_impl_type.txt8
-rw-r--r--crates/ra_syntax/tests/data/parser/inline/err/0005_fn_pointer_type_missing_fn.txt10
-rw-r--r--crates/ra_syntax/tests/data/parser/inline/err/0006_unsafe_block_in_mod.txt4
-rw-r--r--crates/ra_syntax/tests/data/parser/inline/err/0007_async_without_semicolon.txt2
-rw-r--r--crates/ra_syntax/tests/data/parser/inline/err/0008_pub_expr.txt2
-rw-r--r--crates/ra_syntax/tests/data/parser/inline/err/0009_attr_on_expr_not_allowed.txt4
-rw-r--r--crates/ra_syntax/tests/data/parser/inline/err/0010_bad_tuple_index_expr.txt6
-rw-r--r--crates/ra_syntax/tests/data/parser/inline/err/0010_wrong_order_fns.txt4
11 files changed, 30 insertions, 30 deletions
diff --git a/crates/ra_syntax/tests/data/parser/inline/err/0001_array_type_missing_semi.txt b/crates/ra_syntax/tests/data/parser/inline/err/0001_array_type_missing_semi.txt
index 3020f9086..eb6d98fcd 100644
--- a/crates/ra_syntax/tests/data/parser/inline/err/0001_array_type_missing_semi.txt
+++ b/crates/ra_syntax/tests/data/parser/inline/err/0001_array_type_missing_semi.txt
@@ -12,16 +12,16 @@ SOURCE_FILE@[0; 18)
12 TUPLE_TYPE@[10; 12) 12 TUPLE_TYPE@[10; 12)
13 L_PAREN@[10; 11) "(" 13 L_PAREN@[10; 11) "("
14 R_PAREN@[11; 12) ")" 14 R_PAREN@[11; 12) ")"
15 err: `expected `;` or `]``
16 err: `expected SEMI`
17 WHITESPACE@[12; 13) " " 15 WHITESPACE@[12; 13) " "
18 err: `expected an item`
19 ERROR@[13; 15) 16 ERROR@[13; 15)
20 INT_NUMBER@[13; 15) "92" 17 INT_NUMBER@[13; 15) "92"
21 err: `expected an item`
22 ERROR@[15; 16) 18 ERROR@[15; 16)
23 R_BRACK@[15; 16) "]" 19 R_BRACK@[15; 16) "]"
24 err: `expected an item`
25 ERROR@[16; 17) 20 ERROR@[16; 17)
26 SEMI@[16; 17) ";" 21 SEMI@[16; 17) ";"
27 WHITESPACE@[17; 18) "\n" 22 WHITESPACE@[17; 18) "\n"
23err: `expected `;` or `]``
24err: `expected SEMI`
25err: `expected an item`
26err: `expected an item`
27err: `expected an item`
diff --git a/crates/ra_syntax/tests/data/parser/inline/err/0002_misplaced_label_err.txt b/crates/ra_syntax/tests/data/parser/inline/err/0002_misplaced_label_err.txt
index d61d8e73e..b1d104bd4 100644
--- a/crates/ra_syntax/tests/data/parser/inline/err/0002_misplaced_label_err.txt
+++ b/crates/ra_syntax/tests/data/parser/inline/err/0002_misplaced_label_err.txt
@@ -16,13 +16,13 @@ SOURCE_FILE@[0; 30)
16 LABEL@[16; 22) 16 LABEL@[16; 22)
17 LIFETIME@[16; 21) "\'loop" 17 LIFETIME@[16; 21) "\'loop"
18 COLON@[21; 22) ":" 18 COLON@[21; 22) ":"
19 err: `expected a loop`
20 err: `expected SEMI`
21 WHITESPACE@[22; 23) " " 19 WHITESPACE@[22; 23) " "
22 IMPL_BLOCK@[23; 27) 20 IMPL_BLOCK@[23; 27)
23 IMPL_KW@[23; 27) "impl" 21 IMPL_KW@[23; 27) "impl"
24 err: `expected type`
25 err: `expected `{``
26 WHITESPACE@[27; 28) "\n" 22 WHITESPACE@[27; 28) "\n"
27 R_CURLY@[28; 29) "}" 23 R_CURLY@[28; 29) "}"
28 WHITESPACE@[29; 30) "\n" 24 WHITESPACE@[29; 30) "\n"
25err: `expected a loop`
26err: `expected SEMI`
27err: `expected type`
28err: `expected `{``
diff --git a/crates/ra_syntax/tests/data/parser/inline/err/0003_pointer_type_no_mutability.txt b/crates/ra_syntax/tests/data/parser/inline/err/0003_pointer_type_no_mutability.txt
index 3d7a6a745..b470d9ad1 100644
--- a/crates/ra_syntax/tests/data/parser/inline/err/0003_pointer_type_no_mutability.txt
+++ b/crates/ra_syntax/tests/data/parser/inline/err/0003_pointer_type_no_mutability.txt
@@ -9,9 +9,9 @@ SOURCE_FILE@[0; 14)
9 WHITESPACE@[8; 9) " " 9 WHITESPACE@[8; 9) " "
10 POINTER_TYPE@[9; 12) 10 POINTER_TYPE@[9; 12)
11 STAR@[9; 10) "*" 11 STAR@[9; 10) "*"
12 err: `expected mut or const in raw pointer type (use `*mut T` or `*const T` as appropriate)`
13 TUPLE_TYPE@[10; 12) 12 TUPLE_TYPE@[10; 12)
14 L_PAREN@[10; 11) "(" 13 L_PAREN@[10; 11) "("
15 R_PAREN@[11; 12) ")" 14 R_PAREN@[11; 12) ")"
16 SEMI@[12; 13) ";" 15 SEMI@[12; 13) ";"
17 WHITESPACE@[13; 14) "\n" 16 WHITESPACE@[13; 14) "\n"
17err: `expected mut or const in raw pointer type (use `*mut T` or `*const T` as appropriate)`
diff --git a/crates/ra_syntax/tests/data/parser/inline/err/0004_impl_type.txt b/crates/ra_syntax/tests/data/parser/inline/err/0004_impl_type.txt
index 86f84459a..ef4e0d5dd 100644
--- a/crates/ra_syntax/tests/data/parser/inline/err/0004_impl_type.txt
+++ b/crates/ra_syntax/tests/data/parser/inline/err/0004_impl_type.txt
@@ -35,8 +35,6 @@ SOURCE_FILE@[0; 87)
35 WHITESPACE@[33; 34) "\n" 35 WHITESPACE@[33; 34) "\n"
36 IMPL_BLOCK@[34; 38) 36 IMPL_BLOCK@[34; 38)
37 IMPL_KW@[34; 38) "impl" 37 IMPL_KW@[34; 38) "impl"
38 err: `expected trait or type`
39 err: `expected `{``
40 WHITESPACE@[38; 39) " " 38 WHITESPACE@[38; 39) " "
41 IMPL_BLOCK@[39; 54) 39 IMPL_BLOCK@[39; 54)
42 IMPL_KW@[39; 43) "impl" 40 IMPL_KW@[39; 43) "impl"
@@ -61,8 +59,6 @@ SOURCE_FILE@[0; 87)
61 IDENT@[60; 66) "Trait2" 59 IDENT@[60; 66) "Trait2"
62 WHITESPACE@[66; 67) " " 60 WHITESPACE@[66; 67) " "
63 FOR_KW@[67; 70) "for" 61 FOR_KW@[67; 70) "for"
64 err: `expected trait or type`
65 err: `expected `{``
66 WHITESPACE@[70; 71) " " 62 WHITESPACE@[70; 71) " "
67 IMPL_BLOCK@[71; 86) 63 IMPL_BLOCK@[71; 86)
68 IMPL_KW@[71; 75) "impl" 64 IMPL_KW@[71; 75) "impl"
@@ -77,3 +73,7 @@ SOURCE_FILE@[0; 87)
77 L_CURLY@[84; 85) "{" 73 L_CURLY@[84; 85) "{"
78 R_CURLY@[85; 86) "}" 74 R_CURLY@[85; 86) "}"
79 WHITESPACE@[86; 87) "\n" 75 WHITESPACE@[86; 87) "\n"
76err: `expected trait or type`
77err: `expected `{``
78err: `expected trait or type`
79err: `expected `{``
diff --git a/crates/ra_syntax/tests/data/parser/inline/err/0005_fn_pointer_type_missing_fn.txt b/crates/ra_syntax/tests/data/parser/inline/err/0005_fn_pointer_type_missing_fn.txt
index 4587525aa..41e623b41 100644
--- a/crates/ra_syntax/tests/data/parser/inline/err/0005_fn_pointer_type_missing_fn.txt
+++ b/crates/ra_syntax/tests/data/parser/inline/err/0005_fn_pointer_type_missing_fn.txt
@@ -8,16 +8,16 @@ SOURCE_FILE@[0; 20)
8 EQ@[7; 8) "=" 8 EQ@[7; 8) "="
9 WHITESPACE@[8; 9) " " 9 WHITESPACE@[8; 9) " "
10 UNSAFE_KW@[9; 15) "unsafe" 10 UNSAFE_KW@[9; 15) "unsafe"
11 err: `expected `fn``
12 err: `expected SEMI`
13 WHITESPACE@[15; 16) " " 11 WHITESPACE@[15; 16) " "
14 err: `expected an item`
15 ERROR@[16; 17) 12 ERROR@[16; 17)
16 L_PAREN@[16; 17) "(" 13 L_PAREN@[16; 17) "("
17 err: `expected an item`
18 ERROR@[17; 18) 14 ERROR@[17; 18)
19 R_PAREN@[17; 18) ")" 15 R_PAREN@[17; 18) ")"
20 err: `expected an item`
21 ERROR@[18; 19) 16 ERROR@[18; 19)
22 SEMI@[18; 19) ";" 17 SEMI@[18; 19) ";"
23 WHITESPACE@[19; 20) "\n" 18 WHITESPACE@[19; 20) "\n"
19err: `expected `fn``
20err: `expected SEMI`
21err: `expected an item`
22err: `expected an item`
23err: `expected an item`
diff --git a/crates/ra_syntax/tests/data/parser/inline/err/0006_unsafe_block_in_mod.txt b/crates/ra_syntax/tests/data/parser/inline/err/0006_unsafe_block_in_mod.txt
index fefa35c20..f1d0dd5c6 100644
--- a/crates/ra_syntax/tests/data/parser/inline/err/0006_unsafe_block_in_mod.txt
+++ b/crates/ra_syntax/tests/data/parser/inline/err/0006_unsafe_block_in_mod.txt
@@ -11,11 +11,9 @@ SOURCE_FILE@[0; 33)
11 L_CURLY@[8; 9) "{" 11 L_CURLY@[8; 9) "{"
12 R_CURLY@[9; 10) "}" 12 R_CURLY@[9; 10) "}"
13 WHITESPACE@[10; 11) " " 13 WHITESPACE@[10; 11) " "
14 err: `expected an item`
15 ERROR@[11; 17) 14 ERROR@[11; 17)
16 UNSAFE_KW@[11; 17) "unsafe" 15 UNSAFE_KW@[11; 17) "unsafe"
17 WHITESPACE@[17; 18) " " 16 WHITESPACE@[17; 18) " "
18 err: `expected an item`
19 ERROR@[18; 21) 17 ERROR@[18; 21)
20 L_CURLY@[18; 19) "{" 18 L_CURLY@[18; 19) "{"
21 WHITESPACE@[19; 20) " " 19 WHITESPACE@[19; 20) " "
@@ -33,3 +31,5 @@ SOURCE_FILE@[0; 33)
33 L_CURLY@[30; 31) "{" 31 L_CURLY@[30; 31) "{"
34 R_CURLY@[31; 32) "}" 32 R_CURLY@[31; 32) "}"
35 WHITESPACE@[32; 33) "\n" 33 WHITESPACE@[32; 33) "\n"
34err: `expected an item`
35err: `expected an item`
diff --git a/crates/ra_syntax/tests/data/parser/inline/err/0007_async_without_semicolon.txt b/crates/ra_syntax/tests/data/parser/inline/err/0007_async_without_semicolon.txt
index 8afcd5429..1a8fa029c 100644
--- a/crates/ra_syntax/tests/data/parser/inline/err/0007_async_without_semicolon.txt
+++ b/crates/ra_syntax/tests/data/parser/inline/err/0007_async_without_semicolon.txt
@@ -25,7 +25,7 @@ SOURCE_FILE@[0; 30)
25 BLOCK@[25; 27) 25 BLOCK@[25; 27)
26 L_CURLY@[25; 26) "{" 26 L_CURLY@[25; 26) "{"
27 R_CURLY@[26; 27) "}" 27 R_CURLY@[26; 27) "}"
28 err: `expected SEMI`
29 WHITESPACE@[27; 28) " " 28 WHITESPACE@[27; 28) " "
30 R_CURLY@[28; 29) "}" 29 R_CURLY@[28; 29) "}"
31 WHITESPACE@[29; 30) "\n" 30 WHITESPACE@[29; 30) "\n"
31err: `expected SEMI`
diff --git a/crates/ra_syntax/tests/data/parser/inline/err/0008_pub_expr.txt b/crates/ra_syntax/tests/data/parser/inline/err/0008_pub_expr.txt
index 1af31c48b..cadbbc078 100644
--- a/crates/ra_syntax/tests/data/parser/inline/err/0008_pub_expr.txt
+++ b/crates/ra_syntax/tests/data/parser/inline/err/0008_pub_expr.txt
@@ -14,7 +14,6 @@ SOURCE_FILE@[0; 21)
14 ERROR@[11; 14) 14 ERROR@[11; 14)
15 VISIBILITY@[11; 14) 15 VISIBILITY@[11; 14)
16 PUB_KW@[11; 14) "pub" 16 PUB_KW@[11; 14) "pub"
17 err: `expected an item`
18 WHITESPACE@[14; 15) " " 17 WHITESPACE@[14; 15) " "
19 EXPR_STMT@[15; 18) 18 EXPR_STMT@[15; 18)
20 LITERAL@[15; 17) 19 LITERAL@[15; 17)
@@ -23,3 +22,4 @@ SOURCE_FILE@[0; 21)
23 WHITESPACE@[18; 19) " " 22 WHITESPACE@[18; 19) " "
24 R_CURLY@[19; 20) "}" 23 R_CURLY@[19; 20) "}"
25 WHITESPACE@[20; 21) "\n" 24 WHITESPACE@[20; 21) "\n"
25err: `expected an item`
diff --git a/crates/ra_syntax/tests/data/parser/inline/err/0009_attr_on_expr_not_allowed.txt b/crates/ra_syntax/tests/data/parser/inline/err/0009_attr_on_expr_not_allowed.txt
index 9d50a520f..8e7d7d241 100644
--- a/crates/ra_syntax/tests/data/parser/inline/err/0009_attr_on_expr_not_allowed.txt
+++ b/crates/ra_syntax/tests/data/parser/inline/err/0009_attr_on_expr_not_allowed.txt
@@ -27,7 +27,6 @@ SOURCE_FILE@[0; 48)
27 WHITESPACE@[22; 23) " " 27 WHITESPACE@[22; 23) " "
28 LITERAL@[23; 24) 28 LITERAL@[23; 24)
29 INT_NUMBER@[23; 24) "2" 29 INT_NUMBER@[23; 24) "2"
30 err: `attributes are not allowed on BIN_EXPR`
31 SEMI@[24; 25) ";" 30 SEMI@[24; 25) ";"
32 WHITESPACE@[25; 29) "\n " 31 WHITESPACE@[25; 29) "\n "
33 EXPR_STMT@[29; 45) 32 EXPR_STMT@[29; 45)
@@ -48,8 +47,9 @@ SOURCE_FILE@[0; 48)
48 BLOCK@[42; 44) 47 BLOCK@[42; 44)
49 L_CURLY@[42; 43) "{" 48 L_CURLY@[42; 43) "{"
50 R_CURLY@[43; 44) "}" 49 R_CURLY@[43; 44) "}"
51 err: `attributes are not allowed on IF_EXPR`
52 SEMI@[44; 45) ";" 50 SEMI@[44; 45) ";"
53 WHITESPACE@[45; 46) "\n" 51 WHITESPACE@[45; 46) "\n"
54 R_CURLY@[46; 47) "}" 52 R_CURLY@[46; 47) "}"
55 WHITESPACE@[47; 48) "\n" 53 WHITESPACE@[47; 48) "\n"
54err: `attributes are not allowed on BIN_EXPR`
55err: `attributes are not allowed on IF_EXPR`
diff --git a/crates/ra_syntax/tests/data/parser/inline/err/0010_bad_tuple_index_expr.txt b/crates/ra_syntax/tests/data/parser/inline/err/0010_bad_tuple_index_expr.txt
index c111f60ea..36717439e 100644
--- a/crates/ra_syntax/tests/data/parser/inline/err/0010_bad_tuple_index_expr.txt
+++ b/crates/ra_syntax/tests/data/parser/inline/err/0010_bad_tuple_index_expr.txt
@@ -19,7 +19,6 @@ SOURCE_FILE@[0; 47)
19 NAME_REF@[15; 16) 19 NAME_REF@[15; 16)
20 IDENT@[15; 16) "x" 20 IDENT@[15; 16) "x"
21 DOT@[16; 17) "." 21 DOT@[16; 17) "."
22 err: `Tuple (struct) field access is only allowed through decimal integers with no underscores or suffix`
23 FLOAT_NUMBER@[17; 19) "0." 22 FLOAT_NUMBER@[17; 19) "0."
24 SEMI@[19; 20) ";" 23 SEMI@[19; 20) ";"
25 WHITESPACE@[20; 25) "\n " 24 WHITESPACE@[20; 25) "\n "
@@ -31,7 +30,6 @@ SOURCE_FILE@[0; 47)
31 NAME_REF@[25; 26) 30 NAME_REF@[25; 26)
32 IDENT@[25; 26) "x" 31 IDENT@[25; 26) "x"
33 DOT@[26; 27) "." 32 DOT@[26; 27) "."
34 err: `Tuple (struct) field access is only allowed through decimal integers with no underscores or suffix`
35 INT_NUMBER@[27; 31) "1i32" 33 INT_NUMBER@[27; 31) "1i32"
36 SEMI@[31; 32) ";" 34 SEMI@[31; 32) ";"
37 WHITESPACE@[32; 37) "\n " 35 WHITESPACE@[32; 37) "\n "
@@ -43,9 +41,11 @@ SOURCE_FILE@[0; 47)
43 NAME_REF@[37; 38) 41 NAME_REF@[37; 38)
44 IDENT@[37; 38) "x" 42 IDENT@[37; 38) "x"
45 DOT@[38; 39) "." 43 DOT@[38; 39) "."
46 err: `Tuple (struct) field access is only allowed through decimal integers with no underscores or suffix`
47 INT_NUMBER@[39; 43) "0x01" 44 INT_NUMBER@[39; 43) "0x01"
48 SEMI@[43; 44) ";" 45 SEMI@[43; 44) ";"
49 WHITESPACE@[44; 45) "\n" 46 WHITESPACE@[44; 45) "\n"
50 R_CURLY@[45; 46) "}" 47 R_CURLY@[45; 46) "}"
51 WHITESPACE@[46; 47) "\n" 48 WHITESPACE@[46; 47) "\n"
49err: `Tuple (struct) field access is only allowed through decimal integers with no underscores or suffix`
50err: `Tuple (struct) field access is only allowed through decimal integers with no underscores or suffix`
51err: `Tuple (struct) field access is only allowed through decimal integers with no underscores or suffix`
diff --git a/crates/ra_syntax/tests/data/parser/inline/err/0010_wrong_order_fns.txt b/crates/ra_syntax/tests/data/parser/inline/err/0010_wrong_order_fns.txt
index 220191ffa..5f39e7238 100644
--- a/crates/ra_syntax/tests/data/parser/inline/err/0010_wrong_order_fns.txt
+++ b/crates/ra_syntax/tests/data/parser/inline/err/0010_wrong_order_fns.txt
@@ -1,7 +1,6 @@
1SOURCE_FILE@[0; 50) 1SOURCE_FILE@[0; 50)
2 ERROR@[0; 5) 2 ERROR@[0; 5)
3 ASYNC_KW@[0; 5) "async" 3 ASYNC_KW@[0; 5) "async"
4 err: `expected fn, trait or impl`
5 WHITESPACE@[5; 6) " " 4 WHITESPACE@[5; 6) " "
6 FN_DEF@[6; 24) 5 FN_DEF@[6; 24)
7 UNSAFE_KW@[6; 12) "unsafe" 6 UNSAFE_KW@[6; 12) "unsafe"
@@ -20,7 +19,6 @@ SOURCE_FILE@[0; 50)
20 WHITESPACE@[24; 25) "\n" 19 WHITESPACE@[24; 25) "\n"
21 ERROR@[25; 31) 20 ERROR@[25; 31)
22 UNSAFE_KW@[25; 31) "unsafe" 21 UNSAFE_KW@[25; 31) "unsafe"
23 err: `expected fn, trait or impl`
24 WHITESPACE@[31; 32) " " 22 WHITESPACE@[31; 32) " "
25 FN_DEF@[32; 49) 23 FN_DEF@[32; 49)
26 CONST_KW@[32; 37) "const" 24 CONST_KW@[32; 37) "const"
@@ -37,3 +35,5 @@ SOURCE_FILE@[0; 50)
37 L_CURLY@[47; 48) "{" 35 L_CURLY@[47; 48) "{"
38 R_CURLY@[48; 49) "}" 36 R_CURLY@[48; 49) "}"
39 WHITESPACE@[49; 50) "\n" 37 WHITESPACE@[49; 50) "\n"
38err: `expected fn, trait or impl`
39err: `expected fn, trait or impl`