diff options
Diffstat (limited to 'crates/syntax/test_data/parser/inline')
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0145_record_pat_field.rast | 58 | ||||
-rw-r--r-- | crates/syntax/test_data/parser/inline/ok/0145_record_pat_field.rs | 1 |
2 files changed, 53 insertions, 6 deletions
diff --git a/crates/syntax/test_data/parser/inline/ok/0145_record_pat_field.rast b/crates/syntax/test_data/parser/inline/ok/0145_record_pat_field.rast index 925409bdf..e9202a612 100644 --- a/crates/syntax/test_data/parser/inline/ok/0145_record_pat_field.rast +++ b/crates/syntax/test_data/parser/inline/ok/0145_record_pat_field.rast | |||
@@ -1,5 +1,5 @@ | |||
1 | SOURCE_FILE@0..63 | 1 | SOURCE_FILE@0..102 |
2 | FN@0..62 | 2 | FN@0..101 |
3 | FN_KW@0..2 "fn" | 3 | FN_KW@0..2 "fn" |
4 | WHITESPACE@2..3 " " | 4 | WHITESPACE@2..3 " " |
5 | NAME@3..6 | 5 | NAME@3..6 |
@@ -8,7 +8,7 @@ SOURCE_FILE@0..63 | |||
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_EXPR@9..62 | 11 | BLOCK_EXPR@9..101 |
12 | L_CURLY@9..10 "{" | 12 | L_CURLY@9..10 "{" |
13 | WHITESPACE@10..15 "\n " | 13 | WHITESPACE@10..15 "\n " |
14 | LET_STMT@15..35 | 14 | LET_STMT@15..35 |
@@ -70,6 +70,52 @@ SOURCE_FILE@0..63 | |||
70 | L_PAREN@57..58 "(" | 70 | L_PAREN@57..58 "(" |
71 | R_PAREN@58..59 ")" | 71 | R_PAREN@58..59 ")" |
72 | SEMICOLON@59..60 ";" | 72 | SEMICOLON@59..60 ";" |
73 | WHITESPACE@60..61 "\n" | 73 | WHITESPACE@60..65 "\n " |
74 | R_CURLY@61..62 "}" | 74 | LET_STMT@65..99 |
75 | WHITESPACE@62..63 "\n" | 75 | LET_KW@65..68 "let" |
76 | WHITESPACE@68..69 " " | ||
77 | RECORD_PAT@69..93 | ||
78 | PATH@69..70 | ||
79 | PATH_SEGMENT@69..70 | ||
80 | NAME_REF@69..70 | ||
81 | IDENT@69..70 "S" | ||
82 | WHITESPACE@70..71 " " | ||
83 | RECORD_PAT_FIELD_LIST@71..93 | ||
84 | L_CURLY@71..72 "{" | ||
85 | WHITESPACE@72..73 " " | ||
86 | RECORD_PAT_FIELD@73..91 | ||
87 | ATTR@73..86 | ||
88 | POUND@73..74 "#" | ||
89 | L_BRACK@74..75 "[" | ||
90 | PATH@75..78 | ||
91 | PATH_SEGMENT@75..78 | ||
92 | NAME_REF@75..78 | ||
93 | IDENT@75..78 "cfg" | ||
94 | TOKEN_TREE@78..85 | ||
95 | L_PAREN@78..79 "(" | ||
96 | IDENT@79..82 "any" | ||
97 | TOKEN_TREE@82..84 | ||
98 | L_PAREN@82..83 "(" | ||
99 | R_PAREN@83..84 ")" | ||
100 | R_PAREN@84..85 ")" | ||
101 | R_BRACK@85..86 "]" | ||
102 | WHITESPACE@86..87 " " | ||
103 | NAME_REF@87..88 | ||
104 | IDENT@87..88 "x" | ||
105 | COLON@88..89 ":" | ||
106 | WHITESPACE@89..90 " " | ||
107 | LITERAL_PAT@90..91 | ||
108 | LITERAL@90..91 | ||
109 | INT_NUMBER@90..91 "1" | ||
110 | WHITESPACE@91..92 " " | ||
111 | R_CURLY@92..93 "}" | ||
112 | WHITESPACE@93..94 " " | ||
113 | EQ@94..95 "=" | ||
114 | WHITESPACE@95..96 " " | ||
115 | TUPLE_EXPR@96..98 | ||
116 | L_PAREN@96..97 "(" | ||
117 | R_PAREN@97..98 ")" | ||
118 | SEMICOLON@98..99 ";" | ||
119 | WHITESPACE@99..100 "\n" | ||
120 | R_CURLY@100..101 "}" | ||
121 | WHITESPACE@101..102 "\n" | ||
diff --git a/crates/syntax/test_data/parser/inline/ok/0145_record_pat_field.rs b/crates/syntax/test_data/parser/inline/ok/0145_record_pat_field.rs index 26b1d5f89..53cfdc22d 100644 --- a/crates/syntax/test_data/parser/inline/ok/0145_record_pat_field.rs +++ b/crates/syntax/test_data/parser/inline/ok/0145_record_pat_field.rs | |||
@@ -1,4 +1,5 @@ | |||
1 | fn foo() { | 1 | fn foo() { |
2 | let S { 0: 1 } = (); | 2 | let S { 0: 1 } = (); |
3 | let S { x: 1 } = (); | 3 | let S { x: 1 } = (); |
4 | let S { #[cfg(any())] x: 1 } = (); | ||
4 | } | 5 | } |