aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax/test_data/parser/inline/err
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_syntax/test_data/parser/inline/err')
-rw-r--r--crates/ra_syntax/test_data/parser/inline/err/0002_misplaced_label_err.txt27
-rw-r--r--crates/ra_syntax/test_data/parser/inline/err/0006_unsafe_block_in_mod.txt14
-rw-r--r--crates/ra_syntax/test_data/parser/inline/err/0007_async_without_semicolon.txt39
-rw-r--r--crates/ra_syntax/test_data/parser/inline/err/0008_pub_expr.txt27
-rw-r--r--crates/ra_syntax/test_data/parser/inline/err/0009_attr_on_expr_not_allowed.txt86
-rw-r--r--crates/ra_syntax/test_data/parser/inline/err/0010_bad_tuple_index_expr.txt79
-rw-r--r--crates/ra_syntax/test_data/parser/inline/err/0010_wrong_order_fns.txt14
-rw-r--r--crates/ra_syntax/test_data/parser/inline/err/0014_default_fn_type.txt7
8 files changed, 152 insertions, 141 deletions
diff --git a/crates/ra_syntax/test_data/parser/inline/err/0002_misplaced_label_err.txt b/crates/ra_syntax/test_data/parser/inline/err/0002_misplaced_label_err.txt
index 7abc49d5e..2950d77ef 100644
--- a/crates/ra_syntax/test_data/parser/inline/err/0002_misplaced_label_err.txt
+++ b/crates/ra_syntax/test_data/parser/inline/err/0002_misplaced_label_err.txt
@@ -8,19 +8,20 @@ SOURCE_FILE@[0; 30)
8 L_PAREN@[7; 8) "(" 8 L_PAREN@[7; 8) "("
9 R_PAREN@[8; 9) ")" 9 R_PAREN@[8; 9) ")"
10 WHITESPACE@[9; 10) " " 10 WHITESPACE@[9; 10) " "
11 BLOCK@[10; 29) 11 BLOCK_EXPR@[10; 29)
12 L_CURLY@[10; 11) "{" 12 BLOCK@[10; 29)
13 WHITESPACE@[11; 16) "\n " 13 L_CURLY@[10; 11) "{"
14 EXPR_STMT@[16; 22) 14 WHITESPACE@[11; 16) "\n "
15 ERROR@[16; 22) 15 EXPR_STMT@[16; 22)
16 LABEL@[16; 22) 16 ERROR@[16; 22)
17 LIFETIME@[16; 21) "\'loop" 17 LABEL@[16; 22)
18 COLON@[21; 22) ":" 18 LIFETIME@[16; 21) "\'loop"
19 WHITESPACE@[22; 23) " " 19 COLON@[21; 22) ":"
20 IMPL_BLOCK@[23; 27) 20 WHITESPACE@[22; 23) " "
21 IMPL_KW@[23; 27) "impl" 21 IMPL_BLOCK@[23; 27)
22 WHITESPACE@[27; 28) "\n" 22 IMPL_KW@[23; 27) "impl"
23 R_CURLY@[28; 29) "}" 23 WHITESPACE@[27; 28) "\n"
24 R_CURLY@[28; 29) "}"
24 WHITESPACE@[29; 30) "\n" 25 WHITESPACE@[29; 30) "\n"
25error 22: expected a loop 26error 22: expected a loop
26error 22: expected SEMI 27error 22: expected SEMI
diff --git a/crates/ra_syntax/test_data/parser/inline/err/0006_unsafe_block_in_mod.txt b/crates/ra_syntax/test_data/parser/inline/err/0006_unsafe_block_in_mod.txt
index a1871ec08..f3fbc4828 100644
--- a/crates/ra_syntax/test_data/parser/inline/err/0006_unsafe_block_in_mod.txt
+++ b/crates/ra_syntax/test_data/parser/inline/err/0006_unsafe_block_in_mod.txt
@@ -7,9 +7,10 @@ SOURCE_FILE@[0; 33)
7 PARAM_LIST@[6; 8) 7 PARAM_LIST@[6; 8)
8 L_PAREN@[6; 7) "(" 8 L_PAREN@[6; 7) "("
9 R_PAREN@[7; 8) ")" 9 R_PAREN@[7; 8) ")"
10 BLOCK@[8; 10) 10 BLOCK_EXPR@[8; 10)
11 L_CURLY@[8; 9) "{" 11 BLOCK@[8; 10)
12 R_CURLY@[9; 10) "}" 12 L_CURLY@[8; 9) "{"
13 R_CURLY@[9; 10) "}"
13 WHITESPACE@[10; 11) " " 14 WHITESPACE@[10; 11) " "
14 ERROR@[11; 17) 15 ERROR@[11; 17)
15 UNSAFE_KW@[11; 17) "unsafe" 16 UNSAFE_KW@[11; 17) "unsafe"
@@ -27,9 +28,10 @@ SOURCE_FILE@[0; 33)
27 PARAM_LIST@[28; 30) 28 PARAM_LIST@[28; 30)
28 L_PAREN@[28; 29) "(" 29 L_PAREN@[28; 29) "("
29 R_PAREN@[29; 30) ")" 30 R_PAREN@[29; 30) ")"
30 BLOCK@[30; 32) 31 BLOCK_EXPR@[30; 32)
31 L_CURLY@[30; 31) "{" 32 BLOCK@[30; 32)
32 R_CURLY@[31; 32) "}" 33 L_CURLY@[30; 31) "{"
34 R_CURLY@[31; 32) "}"
33 WHITESPACE@[32; 33) "\n" 35 WHITESPACE@[32; 33) "\n"
34error 11: expected an item 36error 11: expected an item
35error 18: expected an item 37error 18: expected an item
diff --git a/crates/ra_syntax/test_data/parser/inline/err/0007_async_without_semicolon.txt b/crates/ra_syntax/test_data/parser/inline/err/0007_async_without_semicolon.txt
index f70adc25d..5cfe766d7 100644
--- a/crates/ra_syntax/test_data/parser/inline/err/0007_async_without_semicolon.txt
+++ b/crates/ra_syntax/test_data/parser/inline/err/0007_async_without_semicolon.txt
@@ -8,24 +8,25 @@ SOURCE_FILE@[0; 30)
8 L_PAREN@[6; 7) "(" 8 L_PAREN@[6; 7) "("
9 R_PAREN@[7; 8) ")" 9 R_PAREN@[7; 8) ")"
10 WHITESPACE@[8; 9) " " 10 WHITESPACE@[8; 9) " "
11 BLOCK@[9; 29) 11 BLOCK_EXPR@[9; 29)
12 L_CURLY@[9; 10) "{" 12 BLOCK@[9; 29)
13 WHITESPACE@[10; 11) " " 13 L_CURLY@[9; 10) "{"
14 LET_STMT@[11; 27) 14 WHITESPACE@[10; 11) " "
15 LET_KW@[11; 14) "let" 15 LET_STMT@[11; 27)
16 WHITESPACE@[14; 15) " " 16 LET_KW@[11; 14) "let"
17 PLACEHOLDER_PAT@[15; 16) 17 WHITESPACE@[14; 15) " "
18 UNDERSCORE@[15; 16) "_" 18 PLACEHOLDER_PAT@[15; 16)
19 WHITESPACE@[16; 17) " " 19 UNDERSCORE@[15; 16) "_"
20 EQ@[17; 18) "=" 20 WHITESPACE@[16; 17) " "
21 WHITESPACE@[18; 19) " " 21 EQ@[17; 18) "="
22 BLOCK_EXPR@[19; 27) 22 WHITESPACE@[18; 19) " "
23 ASYNC_KW@[19; 24) "async" 23 BLOCK_EXPR@[19; 27)
24 WHITESPACE@[24; 25) " " 24 ASYNC_KW@[19; 24) "async"
25 BLOCK@[25; 27) 25 WHITESPACE@[24; 25) " "
26 L_CURLY@[25; 26) "{" 26 BLOCK@[25; 27)
27 R_CURLY@[26; 27) "}" 27 L_CURLY@[25; 26) "{"
28 WHITESPACE@[27; 28) " " 28 R_CURLY@[26; 27) "}"
29 R_CURLY@[28; 29) "}" 29 WHITESPACE@[27; 28) " "
30 R_CURLY@[28; 29) "}"
30 WHITESPACE@[29; 30) "\n" 31 WHITESPACE@[29; 30) "\n"
31error 27: expected SEMI 32error 27: expected SEMI
diff --git a/crates/ra_syntax/test_data/parser/inline/err/0008_pub_expr.txt b/crates/ra_syntax/test_data/parser/inline/err/0008_pub_expr.txt
index 1dbfca698..0594f148f 100644
--- a/crates/ra_syntax/test_data/parser/inline/err/0008_pub_expr.txt
+++ b/crates/ra_syntax/test_data/parser/inline/err/0008_pub_expr.txt
@@ -8,18 +8,19 @@ SOURCE_FILE@[0; 21)
8 L_PAREN@[6; 7) "(" 8 L_PAREN@[6; 7) "("
9 R_PAREN@[7; 8) ")" 9 R_PAREN@[7; 8) ")"
10 WHITESPACE@[8; 9) " " 10 WHITESPACE@[8; 9) " "
11 BLOCK@[9; 20) 11 BLOCK_EXPR@[9; 20)
12 L_CURLY@[9; 10) "{" 12 BLOCK@[9; 20)
13 WHITESPACE@[10; 11) " " 13 L_CURLY@[9; 10) "{"
14 ERROR@[11; 14) 14 WHITESPACE@[10; 11) " "
15 VISIBILITY@[11; 14) 15 ERROR@[11; 14)
16 PUB_KW@[11; 14) "pub" 16 VISIBILITY@[11; 14)
17 WHITESPACE@[14; 15) " " 17 PUB_KW@[11; 14) "pub"
18 EXPR_STMT@[15; 18) 18 WHITESPACE@[14; 15) " "
19 LITERAL@[15; 17) 19 EXPR_STMT@[15; 18)
20 INT_NUMBER@[15; 17) "92" 20 LITERAL@[15; 17)
21 SEMI@[17; 18) ";" 21 INT_NUMBER@[15; 17) "92"
22 WHITESPACE@[18; 19) " " 22 SEMI@[17; 18) ";"
23 R_CURLY@[19; 20) "}" 23 WHITESPACE@[18; 19) " "
24 R_CURLY@[19; 20) "}"
24 WHITESPACE@[20; 21) "\n" 25 WHITESPACE@[20; 21) "\n"
25error 14: expected an item 26error 14: expected an item
diff --git a/crates/ra_syntax/test_data/parser/inline/err/0009_attr_on_expr_not_allowed.txt b/crates/ra_syntax/test_data/parser/inline/err/0009_attr_on_expr_not_allowed.txt
index 338776a72..eab9f5b91 100644
--- a/crates/ra_syntax/test_data/parser/inline/err/0009_attr_on_expr_not_allowed.txt
+++ b/crates/ra_syntax/test_data/parser/inline/err/0009_attr_on_expr_not_allowed.txt
@@ -8,48 +8,50 @@ SOURCE_FILE@[0; 48)
8 L_PAREN@[6; 7) "(" 8 L_PAREN@[6; 7) "("
9 R_PAREN@[7; 8) ")" 9 R_PAREN@[7; 8) ")"
10 WHITESPACE@[8; 9) " " 10 WHITESPACE@[8; 9) " "
11 BLOCK@[9; 47) 11 BLOCK_EXPR@[9; 47)
12 L_CURLY@[9; 10) "{" 12 BLOCK@[9; 47)
13 WHITESPACE@[10; 14) "\n " 13 L_CURLY@[9; 10) "{"
14 EXPR_STMT@[14; 25) 14 WHITESPACE@[10; 14) "\n "
15 ATTR@[14; 18) 15 EXPR_STMT@[14; 25)
16 POUND@[14; 15) "#" 16 ATTR@[14; 18)
17 TOKEN_TREE@[15; 18) 17 POUND@[14; 15) "#"
18 L_BRACK@[15; 16) "[" 18 TOKEN_TREE@[15; 18)
19 IDENT@[16; 17) "A" 19 L_BRACK@[15; 16) "["
20 R_BRACK@[17; 18) "]" 20 IDENT@[16; 17) "A"
21 WHITESPACE@[18; 19) " " 21 R_BRACK@[17; 18) "]"
22 BIN_EXPR@[19; 24) 22 WHITESPACE@[18; 19) " "
23 LITERAL@[19; 20) 23 BIN_EXPR@[19; 24)
24 INT_NUMBER@[19; 20) "1" 24 LITERAL@[19; 20)
25 WHITESPACE@[20; 21) " " 25 INT_NUMBER@[19; 20) "1"
26 PLUS@[21; 22) "+" 26 WHITESPACE@[20; 21) " "
27 WHITESPACE@[22; 23) " " 27 PLUS@[21; 22) "+"
28 LITERAL@[23; 24) 28 WHITESPACE@[22; 23) " "
29 INT_NUMBER@[23; 24) "2" 29 LITERAL@[23; 24)
30 SEMI@[24; 25) ";" 30 INT_NUMBER@[23; 24) "2"
31 WHITESPACE@[25; 29) "\n " 31 SEMI@[24; 25) ";"
32 EXPR_STMT@[29; 45) 32 WHITESPACE@[25; 29) "\n "
33 ATTR@[29; 33) 33 EXPR_STMT@[29; 45)
34 POUND@[29; 30) "#" 34 ATTR@[29; 33)
35 TOKEN_TREE@[30; 33) 35 POUND@[29; 30) "#"
36 L_BRACK@[30; 31) "[" 36 TOKEN_TREE@[30; 33)
37 IDENT@[31; 32) "B" 37 L_BRACK@[30; 31) "["
38 R_BRACK@[32; 33) "]" 38 IDENT@[31; 32) "B"
39 WHITESPACE@[33; 34) " " 39 R_BRACK@[32; 33) "]"
40 IF_EXPR@[34; 44) 40 WHITESPACE@[33; 34) " "
41 IF_KW@[34; 36) "if" 41 IF_EXPR@[34; 44)
42 WHITESPACE@[36; 37) " " 42 IF_KW@[34; 36) "if"
43 CONDITION@[37; 41) 43 WHITESPACE@[36; 37) " "
44 LITERAL@[37; 41) 44 CONDITION@[37; 41)
45 TRUE_KW@[37; 41) "true" 45 LITERAL@[37; 41)
46 WHITESPACE@[41; 42) " " 46 TRUE_KW@[37; 41) "true"
47 BLOCK@[42; 44) 47 WHITESPACE@[41; 42) " "
48 L_CURLY@[42; 43) "{" 48 BLOCK_EXPR@[42; 44)
49 R_CURLY@[43; 44) "}" 49 BLOCK@[42; 44)
50 SEMI@[44; 45) ";" 50 L_CURLY@[42; 43) "{"
51 WHITESPACE@[45; 46) "\n" 51 R_CURLY@[43; 44) "}"
52 R_CURLY@[46; 47) "}" 52 SEMI@[44; 45) ";"
53 WHITESPACE@[45; 46) "\n"
54 R_CURLY@[46; 47) "}"
53 WHITESPACE@[47; 48) "\n" 55 WHITESPACE@[47; 48) "\n"
54error 24: attributes are not allowed on BIN_EXPR 56error 24: attributes are not allowed on BIN_EXPR
55error 44: attributes are not allowed on IF_EXPR 57error 44: attributes are not allowed on IF_EXPR
diff --git a/crates/ra_syntax/test_data/parser/inline/err/0010_bad_tuple_index_expr.txt b/crates/ra_syntax/test_data/parser/inline/err/0010_bad_tuple_index_expr.txt
index 465e79e7b..8ad2a588f 100644
--- a/crates/ra_syntax/test_data/parser/inline/err/0010_bad_tuple_index_expr.txt
+++ b/crates/ra_syntax/test_data/parser/inline/err/0010_bad_tuple_index_expr.txt
@@ -8,45 +8,46 @@ SOURCE_FILE@[0; 47)
8 L_PAREN@[6; 7) "(" 8 L_PAREN@[6; 7) "("
9 R_PAREN@[7; 8) ")" 9 R_PAREN@[7; 8) ")"
10 WHITESPACE@[8; 9) " " 10 WHITESPACE@[8; 9) " "
11 BLOCK@[9; 46) 11 BLOCK_EXPR@[9; 46)
12 L_CURLY@[9; 10) "{" 12 BLOCK@[9; 46)
13 WHITESPACE@[10; 15) "\n " 13 L_CURLY@[9; 10) "{"
14 EXPR_STMT@[15; 20) 14 WHITESPACE@[10; 15) "\n "
15 FIELD_EXPR@[15; 19) 15 EXPR_STMT@[15; 20)
16 PATH_EXPR@[15; 16) 16 FIELD_EXPR@[15; 19)
17 PATH@[15; 16) 17 PATH_EXPR@[15; 16)
18 PATH_SEGMENT@[15; 16) 18 PATH@[15; 16)
19 NAME_REF@[15; 16) 19 PATH_SEGMENT@[15; 16)
20 IDENT@[15; 16) "x" 20 NAME_REF@[15; 16)
21 DOT@[16; 17) "." 21 IDENT@[15; 16) "x"
22 FLOAT_NUMBER@[17; 19) "0." 22 DOT@[16; 17) "."
23 SEMI@[19; 20) ";" 23 FLOAT_NUMBER@[17; 19) "0."
24 WHITESPACE@[20; 25) "\n " 24 SEMI@[19; 20) ";"
25 EXPR_STMT@[25; 32) 25 WHITESPACE@[20; 25) "\n "
26 FIELD_EXPR@[25; 31) 26 EXPR_STMT@[25; 32)
27 PATH_EXPR@[25; 26) 27 FIELD_EXPR@[25; 31)
28 PATH@[25; 26) 28 PATH_EXPR@[25; 26)
29 PATH_SEGMENT@[25; 26) 29 PATH@[25; 26)
30 NAME_REF@[25; 26) 30 PATH_SEGMENT@[25; 26)
31 IDENT@[25; 26) "x" 31 NAME_REF@[25; 26)
32 DOT@[26; 27) "." 32 IDENT@[25; 26) "x"
33 NAME_REF@[27; 31) 33 DOT@[26; 27) "."
34 INT_NUMBER@[27; 31) "1i32" 34 NAME_REF@[27; 31)
35 SEMI@[31; 32) ";" 35 INT_NUMBER@[27; 31) "1i32"
36 WHITESPACE@[32; 37) "\n " 36 SEMI@[31; 32) ";"
37 EXPR_STMT@[37; 44) 37 WHITESPACE@[32; 37) "\n "
38 FIELD_EXPR@[37; 43) 38 EXPR_STMT@[37; 44)
39 PATH_EXPR@[37; 38) 39 FIELD_EXPR@[37; 43)
40 PATH@[37; 38) 40 PATH_EXPR@[37; 38)
41 PATH_SEGMENT@[37; 38) 41 PATH@[37; 38)
42 NAME_REF@[37; 38) 42 PATH_SEGMENT@[37; 38)
43 IDENT@[37; 38) "x" 43 NAME_REF@[37; 38)
44 DOT@[38; 39) "." 44 IDENT@[37; 38) "x"
45 NAME_REF@[39; 43) 45 DOT@[38; 39) "."
46 INT_NUMBER@[39; 43) "0x01" 46 NAME_REF@[39; 43)
47 SEMI@[43; 44) ";" 47 INT_NUMBER@[39; 43) "0x01"
48 WHITESPACE@[44; 45) "\n" 48 SEMI@[43; 44) ";"
49 R_CURLY@[45; 46) "}" 49 WHITESPACE@[44; 45) "\n"
50 R_CURLY@[45; 46) "}"
50 WHITESPACE@[46; 47) "\n" 51 WHITESPACE@[46; 47) "\n"
51error [27; 31): Tuple (struct) field access is only allowed through decimal integers with no underscores or suffix 52error [27; 31): Tuple (struct) field access is only allowed through decimal integers with no underscores or suffix
52error [39; 43): Tuple (struct) field access is only allowed through decimal integers with no underscores or suffix 53error [39; 43): Tuple (struct) field access is only allowed through decimal integers with no underscores or suffix
diff --git a/crates/ra_syntax/test_data/parser/inline/err/0010_wrong_order_fns.txt b/crates/ra_syntax/test_data/parser/inline/err/0010_wrong_order_fns.txt
index b1ef210d3..2ea6a566d 100644
--- a/crates/ra_syntax/test_data/parser/inline/err/0010_wrong_order_fns.txt
+++ b/crates/ra_syntax/test_data/parser/inline/err/0010_wrong_order_fns.txt
@@ -13,9 +13,10 @@ SOURCE_FILE@[0; 50)
13 L_PAREN@[19; 20) "(" 13 L_PAREN@[19; 20) "("
14 R_PAREN@[20; 21) ")" 14 R_PAREN@[20; 21) ")"
15 WHITESPACE@[21; 22) " " 15 WHITESPACE@[21; 22) " "
16 BLOCK@[22; 24) 16 BLOCK_EXPR@[22; 24)
17 L_CURLY@[22; 23) "{" 17 BLOCK@[22; 24)
18 R_CURLY@[23; 24) "}" 18 L_CURLY@[22; 23) "{"
19 R_CURLY@[23; 24) "}"
19 WHITESPACE@[24; 25) "\n" 20 WHITESPACE@[24; 25) "\n"
20 ERROR@[25; 31) 21 ERROR@[25; 31)
21 UNSAFE_KW@[25; 31) "unsafe" 22 UNSAFE_KW@[25; 31) "unsafe"
@@ -31,9 +32,10 @@ SOURCE_FILE@[0; 50)
31 L_PAREN@[44; 45) "(" 32 L_PAREN@[44; 45) "("
32 R_PAREN@[45; 46) ")" 33 R_PAREN@[45; 46) ")"
33 WHITESPACE@[46; 47) " " 34 WHITESPACE@[46; 47) " "
34 BLOCK@[47; 49) 35 BLOCK_EXPR@[47; 49)
35 L_CURLY@[47; 48) "{" 36 BLOCK@[47; 49)
36 R_CURLY@[48; 49) "}" 37 L_CURLY@[47; 48) "{"
38 R_CURLY@[48; 49) "}"
37 WHITESPACE@[49; 50) "\n" 39 WHITESPACE@[49; 50) "\n"
38error 5: expected existential, fn, trait or impl 40error 5: expected existential, fn, trait or impl
39error 31: expected existential, fn, trait or impl 41error 31: expected existential, fn, trait or impl
diff --git a/crates/ra_syntax/test_data/parser/inline/err/0014_default_fn_type.txt b/crates/ra_syntax/test_data/parser/inline/err/0014_default_fn_type.txt
index 7da4e243f..a1a0bd7c4 100644
--- a/crates/ra_syntax/test_data/parser/inline/err/0014_default_fn_type.txt
+++ b/crates/ra_syntax/test_data/parser/inline/err/0014_default_fn_type.txt
@@ -44,9 +44,10 @@ SOURCE_FILE@[0; 62)
44 L_PAREN@[54; 55) "(" 44 L_PAREN@[54; 55) "("
45 R_PAREN@[55; 56) ")" 45 R_PAREN@[55; 56) ")"
46 WHITESPACE@[56; 57) " " 46 WHITESPACE@[56; 57) " "
47 BLOCK@[57; 59) 47 BLOCK_EXPR@[57; 59)
48 L_CURLY@[57; 58) "{" 48 BLOCK@[57; 59)
49 R_CURLY@[58; 59) "}" 49 L_CURLY@[57; 58) "{"
50 R_CURLY@[58; 59) "}"
50 WHITESPACE@[59; 60) "\n" 51 WHITESPACE@[59; 60) "\n"
51 R_CURLY@[60; 61) "}" 52 R_CURLY@[60; 61) "}"
52 WHITESPACE@[61; 62) "\n" 53 WHITESPACE@[61; 62) "\n"