diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/data/parser/inline/0061_struct_lit.rs | 5 | ||||
-rw-r--r-- | tests/data/parser/inline/0061_struct_lit.txt | 94 |
2 files changed, 99 insertions, 0 deletions
diff --git a/tests/data/parser/inline/0061_struct_lit.rs b/tests/data/parser/inline/0061_struct_lit.rs new file mode 100644 index 000000000..eb711f68a --- /dev/null +++ b/tests/data/parser/inline/0061_struct_lit.rs | |||
@@ -0,0 +1,5 @@ | |||
1 | fn foo() { | ||
2 | S {}; | ||
3 | S { x, y: 32, }; | ||
4 | S { x, y: 32, ..Default::default() }; | ||
5 | } | ||
diff --git a/tests/data/parser/inline/0061_struct_lit.txt b/tests/data/parser/inline/0061_struct_lit.txt new file mode 100644 index 000000000..9a63d8fb2 --- /dev/null +++ b/tests/data/parser/inline/0061_struct_lit.txt | |||
@@ -0,0 +1,94 @@ | |||
1 | FILE@[0; 86) | ||
2 | FN_ITEM@[0; 86) | ||
3 | FN_KW@[0; 2) | ||
4 | NAME@[2; 6) | ||
5 | WHITESPACE@[2; 3) | ||
6 | IDENT@[3; 6) "foo" | ||
7 | PARAM_LIST@[6; 9) | ||
8 | L_PAREN@[6; 7) | ||
9 | R_PAREN@[7; 8) | ||
10 | WHITESPACE@[8; 9) | ||
11 | BLOCK@[9; 86) | ||
12 | L_CURLY@[9; 10) | ||
13 | EXPR_STMT@[10; 25) | ||
14 | STRUCT_LIT@[10; 19) | ||
15 | PATH@[10; 17) | ||
16 | PATH_SEGMENT@[10; 17) | ||
17 | NAME_REF@[10; 17) | ||
18 | WHITESPACE@[10; 15) | ||
19 | IDENT@[15; 16) "S" | ||
20 | WHITESPACE@[16; 17) | ||
21 | L_CURLY@[17; 18) | ||
22 | R_CURLY@[18; 19) | ||
23 | SEMI@[19; 20) | ||
24 | WHITESPACE@[20; 25) | ||
25 | EXPR_STMT@[25; 46) | ||
26 | STRUCT_LIT@[25; 40) | ||
27 | PATH@[25; 27) | ||
28 | PATH_SEGMENT@[25; 27) | ||
29 | NAME_REF@[25; 27) | ||
30 | IDENT@[25; 26) "S" | ||
31 | WHITESPACE@[26; 27) | ||
32 | L_CURLY@[27; 28) | ||
33 | STRUCT_LIT_FIELD@[28; 30) | ||
34 | NAME_REF@[28; 30) | ||
35 | WHITESPACE@[28; 29) | ||
36 | IDENT@[29; 30) "x" | ||
37 | COMMA@[30; 31) | ||
38 | STRUCT_LIT_FIELD@[31; 37) | ||
39 | NAME_REF@[31; 33) | ||
40 | WHITESPACE@[31; 32) | ||
41 | IDENT@[32; 33) "y" | ||
42 | COLON@[33; 34) | ||
43 | LITERAL@[34; 37) | ||
44 | WHITESPACE@[34; 35) | ||
45 | INT_NUMBER@[35; 37) | ||
46 | COMMA@[37; 38) | ||
47 | WHITESPACE@[38; 39) | ||
48 | R_CURLY@[39; 40) | ||
49 | SEMI@[40; 41) | ||
50 | WHITESPACE@[41; 46) | ||
51 | EXPR_STMT@[46; 84) | ||
52 | STRUCT_LIT@[46; 82) | ||
53 | PATH@[46; 48) | ||
54 | PATH_SEGMENT@[46; 48) | ||
55 | NAME_REF@[46; 48) | ||
56 | IDENT@[46; 47) "S" | ||
57 | WHITESPACE@[47; 48) | ||
58 | L_CURLY@[48; 49) | ||
59 | STRUCT_LIT_FIELD@[49; 51) | ||
60 | NAME_REF@[49; 51) | ||
61 | WHITESPACE@[49; 50) | ||
62 | IDENT@[50; 51) "x" | ||
63 | COMMA@[51; 52) | ||
64 | STRUCT_LIT_FIELD@[52; 58) | ||
65 | NAME_REF@[52; 54) | ||
66 | WHITESPACE@[52; 53) | ||
67 | IDENT@[53; 54) "y" | ||
68 | COLON@[54; 55) | ||
69 | LITERAL@[55; 58) | ||
70 | WHITESPACE@[55; 56) | ||
71 | INT_NUMBER@[56; 58) | ||
72 | COMMA@[58; 59) | ||
73 | WHITESPACE@[59; 60) | ||
74 | DOTDOT@[60; 62) | ||
75 | CALL_EXPR@[62; 81) | ||
76 | PATH_EXPR@[62; 78) | ||
77 | PATH@[62; 78) | ||
78 | PATH@[62; 69) | ||
79 | PATH_SEGMENT@[62; 69) | ||
80 | NAME_REF@[62; 69) | ||
81 | IDENT@[62; 69) "Default" | ||
82 | COLONCOLON@[69; 71) | ||
83 | PATH_SEGMENT@[71; 78) | ||
84 | NAME_REF@[71; 78) | ||
85 | IDENT@[71; 78) "default" | ||
86 | ARG_LIST@[78; 81) | ||
87 | L_PAREN@[78; 79) | ||
88 | R_PAREN@[79; 80) | ||
89 | WHITESPACE@[80; 81) | ||
90 | R_CURLY@[81; 82) | ||
91 | SEMI@[82; 83) | ||
92 | WHITESPACE@[83; 84) | ||
93 | R_CURLY@[84; 85) | ||
94 | WHITESPACE@[85; 86) | ||