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/0010_bad_tuple_index_expr.rs5
-rw-r--r--crates/ra_syntax/tests/data/parser/inline/err/0010_bad_tuple_index_expr.txt51
2 files changed, 56 insertions, 0 deletions
diff --git a/crates/ra_syntax/tests/data/parser/inline/err/0010_bad_tuple_index_expr.rs b/crates/ra_syntax/tests/data/parser/inline/err/0010_bad_tuple_index_expr.rs
new file mode 100644
index 000000000..30cc49138
--- /dev/null
+++ b/crates/ra_syntax/tests/data/parser/inline/err/0010_bad_tuple_index_expr.rs
@@ -0,0 +1,5 @@
1fn foo() {
2 x.0.;
3 x.1i32;
4 x.0x01;
5}
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
new file mode 100644
index 000000000..c111f60ea
--- /dev/null
+++ b/crates/ra_syntax/tests/data/parser/inline/err/0010_bad_tuple_index_expr.txt
@@ -0,0 +1,51 @@
1SOURCE_FILE@[0; 47)
2 FN_DEF@[0; 46)
3 FN_KW@[0; 2) "fn"
4 WHITESPACE@[2; 3) " "
5 NAME@[3; 6)
6 IDENT@[3; 6) "foo"
7 PARAM_LIST@[6; 8)
8 L_PAREN@[6; 7) "("
9 R_PAREN@[7; 8) ")"
10 WHITESPACE@[8; 9) " "
11 BLOCK@[9; 46)
12 L_CURLY@[9; 10) "{"
13 WHITESPACE@[10; 15) "\n "
14 EXPR_STMT@[15; 20)
15 FIELD_EXPR@[15; 19)
16 PATH_EXPR@[15; 16)
17 PATH@[15; 16)
18 PATH_SEGMENT@[15; 16)
19 NAME_REF@[15; 16)
20 IDENT@[15; 16) "x"
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."
24 SEMI@[19; 20) ";"
25 WHITESPACE@[20; 25) "\n "
26 EXPR_STMT@[25; 32)
27 FIELD_EXPR@[25; 31)
28 PATH_EXPR@[25; 26)
29 PATH@[25; 26)
30 PATH_SEGMENT@[25; 26)
31 NAME_REF@[25; 26)
32 IDENT@[25; 26) "x"
33 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"
36 SEMI@[31; 32) ";"
37 WHITESPACE@[32; 37) "\n "
38 EXPR_STMT@[37; 44)
39 FIELD_EXPR@[37; 43)
40 PATH_EXPR@[37; 38)
41 PATH@[37; 38)
42 PATH_SEGMENT@[37; 38)
43 NAME_REF@[37; 38)
44 IDENT@[37; 38) "x"
45 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"
48 SEMI@[43; 44) ";"
49 WHITESPACE@[44; 45) "\n"
50 R_CURLY@[45; 46) "}"
51 WHITESPACE@[46; 47) "\n"