diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-03-13 11:55:04 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2020-03-13 11:55:04 +0000 |
commit | 02b44006b8e37a8cd3f96d5b1c949d62e01be2e8 (patch) | |
tree | 69121d32a0a4e6484945fe1afa7724ea11ed223a /crates/ra_syntax | |
parent | b0ed808266e346b0f9330822f874e930710df4ec (diff) | |
parent | 680182d0a0853a3a76fd1cae9838feb5b0acf31c (diff) |
Merge #3575
3575: Restore cargo-fmt gating r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_syntax')
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0116_trait_fn_placeholder_parameter.rs | 3 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0116_trait_fn_placeholder_parameter.txt | 47 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0156_fn_def_param.rs | 1 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0156_fn_def_param.txt | 44 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/ok/0063_trait_fn_patterns.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0153_trait_fn_patterns.rs) | 1 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/ok/0063_trait_fn_patterns.txt (renamed from crates/ra_syntax/test_data/parser/inline/ok/0153_trait_fn_patterns.txt) | 47 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/ok/0064_impl_fn_params.rs (renamed from crates/ra_syntax/test_data/parser/inline/ok/0152_fn_patterns.rs) | 0 | ||||
-rw-r--r-- | crates/ra_syntax/test_data/parser/ok/0064_impl_fn_params.txt (renamed from crates/ra_syntax/test_data/parser/inline/ok/0152_fn_patterns.txt) | 0 |
8 files changed, 87 insertions, 56 deletions
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0116_trait_fn_placeholder_parameter.rs b/crates/ra_syntax/test_data/parser/inline/ok/0116_trait_fn_placeholder_parameter.rs deleted file mode 100644 index 472cb8803..000000000 --- a/crates/ra_syntax/test_data/parser/inline/ok/0116_trait_fn_placeholder_parameter.rs +++ /dev/null | |||
@@ -1,3 +0,0 @@ | |||
1 | trait Foo { | ||
2 | fn bar(_: u64, mut x: i32); | ||
3 | } | ||
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0116_trait_fn_placeholder_parameter.txt b/crates/ra_syntax/test_data/parser/inline/ok/0116_trait_fn_placeholder_parameter.txt deleted file mode 100644 index 158236c5a..000000000 --- a/crates/ra_syntax/test_data/parser/inline/ok/0116_trait_fn_placeholder_parameter.txt +++ /dev/null | |||
@@ -1,47 +0,0 @@ | |||
1 | SOURCE_FILE@[0; 46) | ||
2 | TRAIT_DEF@[0; 45) | ||
3 | TRAIT_KW@[0; 5) "trait" | ||
4 | WHITESPACE@[5; 6) " " | ||
5 | NAME@[6; 9) | ||
6 | IDENT@[6; 9) "Foo" | ||
7 | WHITESPACE@[9; 10) " " | ||
8 | ITEM_LIST@[10; 45) | ||
9 | L_CURLY@[10; 11) "{" | ||
10 | WHITESPACE@[11; 16) "\n " | ||
11 | FN_DEF@[16; 43) | ||
12 | FN_KW@[16; 18) "fn" | ||
13 | WHITESPACE@[18; 19) " " | ||
14 | NAME@[19; 22) | ||
15 | IDENT@[19; 22) "bar" | ||
16 | PARAM_LIST@[22; 42) | ||
17 | L_PAREN@[22; 23) "(" | ||
18 | PARAM@[23; 29) | ||
19 | PLACEHOLDER_PAT@[23; 24) | ||
20 | UNDERSCORE@[23; 24) "_" | ||
21 | COLON@[24; 25) ":" | ||
22 | WHITESPACE@[25; 26) " " | ||
23 | PATH_TYPE@[26; 29) | ||
24 | PATH@[26; 29) | ||
25 | PATH_SEGMENT@[26; 29) | ||
26 | NAME_REF@[26; 29) | ||
27 | IDENT@[26; 29) "u64" | ||
28 | COMMA@[29; 30) "," | ||
29 | WHITESPACE@[30; 31) " " | ||
30 | PARAM@[31; 41) | ||
31 | BIND_PAT@[31; 36) | ||
32 | MUT_KW@[31; 34) "mut" | ||
33 | WHITESPACE@[34; 35) " " | ||
34 | NAME@[35; 36) | ||
35 | IDENT@[35; 36) "x" | ||
36 | COLON@[36; 37) ":" | ||
37 | WHITESPACE@[37; 38) " " | ||
38 | PATH_TYPE@[38; 41) | ||
39 | PATH@[38; 41) | ||
40 | PATH_SEGMENT@[38; 41) | ||
41 | NAME_REF@[38; 41) | ||
42 | IDENT@[38; 41) "i32" | ||
43 | R_PAREN@[41; 42) ")" | ||
44 | SEMI@[42; 43) ";" | ||
45 | WHITESPACE@[43; 44) "\n" | ||
46 | R_CURLY@[44; 45) "}" | ||
47 | WHITESPACE@[45; 46) "\n" | ||
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0156_fn_def_param.rs b/crates/ra_syntax/test_data/parser/inline/ok/0156_fn_def_param.rs new file mode 100644 index 000000000..7b277c16b --- /dev/null +++ b/crates/ra_syntax/test_data/parser/inline/ok/0156_fn_def_param.rs | |||
@@ -0,0 +1 @@ | |||
fn foo((x, y): (i32, i32)) {} | |||
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0156_fn_def_param.txt b/crates/ra_syntax/test_data/parser/inline/ok/0156_fn_def_param.txt new file mode 100644 index 000000000..103e254a6 --- /dev/null +++ b/crates/ra_syntax/test_data/parser/inline/ok/0156_fn_def_param.txt | |||
@@ -0,0 +1,44 @@ | |||
1 | SOURCE_FILE@[0; 30) | ||
2 | FN_DEF@[0; 29) | ||
3 | FN_KW@[0; 2) "fn" | ||
4 | WHITESPACE@[2; 3) " " | ||
5 | NAME@[3; 6) | ||
6 | IDENT@[3; 6) "foo" | ||
7 | PARAM_LIST@[6; 26) | ||
8 | L_PAREN@[6; 7) "(" | ||
9 | PARAM@[7; 25) | ||
10 | TUPLE_PAT@[7; 13) | ||
11 | L_PAREN@[7; 8) "(" | ||
12 | BIND_PAT@[8; 9) | ||
13 | NAME@[8; 9) | ||
14 | IDENT@[8; 9) "x" | ||
15 | COMMA@[9; 10) "," | ||
16 | WHITESPACE@[10; 11) " " | ||
17 | BIND_PAT@[11; 12) | ||
18 | NAME@[11; 12) | ||
19 | IDENT@[11; 12) "y" | ||
20 | R_PAREN@[12; 13) ")" | ||
21 | COLON@[13; 14) ":" | ||
22 | WHITESPACE@[14; 15) " " | ||
23 | TUPLE_TYPE@[15; 25) | ||
24 | L_PAREN@[15; 16) "(" | ||
25 | PATH_TYPE@[16; 19) | ||
26 | PATH@[16; 19) | ||
27 | PATH_SEGMENT@[16; 19) | ||
28 | NAME_REF@[16; 19) | ||
29 | IDENT@[16; 19) "i32" | ||
30 | COMMA@[19; 20) "," | ||
31 | WHITESPACE@[20; 21) " " | ||
32 | PATH_TYPE@[21; 24) | ||
33 | PATH@[21; 24) | ||
34 | PATH_SEGMENT@[21; 24) | ||
35 | NAME_REF@[21; 24) | ||
36 | IDENT@[21; 24) "i32" | ||
37 | R_PAREN@[24; 25) ")" | ||
38 | R_PAREN@[25; 26) ")" | ||
39 | WHITESPACE@[26; 27) " " | ||
40 | BLOCK_EXPR@[27; 29) | ||
41 | BLOCK@[27; 29) | ||
42 | L_CURLY@[27; 28) "{" | ||
43 | R_CURLY@[28; 29) "}" | ||
44 | WHITESPACE@[29; 30) "\n" | ||
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0153_trait_fn_patterns.rs b/crates/ra_syntax/test_data/parser/ok/0063_trait_fn_patterns.rs index a94bf378a..3b666af8e 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0153_trait_fn_patterns.rs +++ b/crates/ra_syntax/test_data/parser/ok/0063_trait_fn_patterns.rs | |||
@@ -3,4 +3,5 @@ trait T { | |||
3 | fn f2(S { a, b }: S) {} | 3 | fn f2(S { a, b }: S) {} |
4 | fn f3(NewType(a): NewType) {} | 4 | fn f3(NewType(a): NewType) {} |
5 | fn f4(&&a: &&usize) {} | 5 | fn f4(&&a: &&usize) {} |
6 | fn bar(_: u64, mut x: i32); | ||
6 | } | 7 | } |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0153_trait_fn_patterns.txt b/crates/ra_syntax/test_data/parser/ok/0063_trait_fn_patterns.txt index b22df8dbe..eb2e3a503 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0153_trait_fn_patterns.txt +++ b/crates/ra_syntax/test_data/parser/ok/0063_trait_fn_patterns.txt | |||
@@ -1,11 +1,11 @@ | |||
1 | SOURCE_FILE@[0; 138) | 1 | SOURCE_FILE@[0; 170) |
2 | TRAIT_DEF@[0; 137) | 2 | TRAIT_DEF@[0; 169) |
3 | TRAIT_KW@[0; 5) "trait" | 3 | TRAIT_KW@[0; 5) "trait" |
4 | WHITESPACE@[5; 6) " " | 4 | WHITESPACE@[5; 6) " " |
5 | NAME@[6; 7) | 5 | NAME@[6; 7) |
6 | IDENT@[6; 7) "T" | 6 | IDENT@[6; 7) "T" |
7 | WHITESPACE@[7; 8) " " | 7 | WHITESPACE@[7; 8) " " |
8 | ITEM_LIST@[8; 137) | 8 | ITEM_LIST@[8; 169) |
9 | L_CURLY@[8; 9) "{" | 9 | L_CURLY@[8; 9) "{" |
10 | WHITESPACE@[9; 14) "\n " | 10 | WHITESPACE@[9; 14) "\n " |
11 | FN_DEF@[14; 46) | 11 | FN_DEF@[14; 46) |
@@ -156,6 +156,41 @@ SOURCE_FILE@[0; 138) | |||
156 | BLOCK@[133; 135) | 156 | BLOCK@[133; 135) |
157 | L_CURLY@[133; 134) "{" | 157 | L_CURLY@[133; 134) "{" |
158 | R_CURLY@[134; 135) "}" | 158 | R_CURLY@[134; 135) "}" |
159 | WHITESPACE@[135; 136) "\n" | 159 | WHITESPACE@[135; 140) "\n " |
160 | R_CURLY@[136; 137) "}" | 160 | FN_DEF@[140; 167) |
161 | WHITESPACE@[137; 138) "\n" | 161 | FN_KW@[140; 142) "fn" |
162 | WHITESPACE@[142; 143) " " | ||
163 | NAME@[143; 146) | ||
164 | IDENT@[143; 146) "bar" | ||
165 | PARAM_LIST@[146; 166) | ||
166 | L_PAREN@[146; 147) "(" | ||
167 | PARAM@[147; 153) | ||
168 | PLACEHOLDER_PAT@[147; 148) | ||
169 | UNDERSCORE@[147; 148) "_" | ||
170 | COLON@[148; 149) ":" | ||
171 | WHITESPACE@[149; 150) " " | ||
172 | PATH_TYPE@[150; 153) | ||
173 | PATH@[150; 153) | ||
174 | PATH_SEGMENT@[150; 153) | ||
175 | NAME_REF@[150; 153) | ||
176 | IDENT@[150; 153) "u64" | ||
177 | COMMA@[153; 154) "," | ||
178 | WHITESPACE@[154; 155) " " | ||
179 | PARAM@[155; 165) | ||
180 | BIND_PAT@[155; 160) | ||
181 | MUT_KW@[155; 158) "mut" | ||
182 | WHITESPACE@[158; 159) " " | ||
183 | NAME@[159; 160) | ||
184 | IDENT@[159; 160) "x" | ||
185 | COLON@[160; 161) ":" | ||
186 | WHITESPACE@[161; 162) " " | ||
187 | PATH_TYPE@[162; 165) | ||
188 | PATH@[162; 165) | ||
189 | PATH_SEGMENT@[162; 165) | ||
190 | NAME_REF@[162; 165) | ||
191 | IDENT@[162; 165) "i32" | ||
192 | R_PAREN@[165; 166) ")" | ||
193 | SEMI@[166; 167) ";" | ||
194 | WHITESPACE@[167; 168) "\n" | ||
195 | R_CURLY@[168; 169) "}" | ||
196 | WHITESPACE@[169; 170) "\n" | ||
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0152_fn_patterns.rs b/crates/ra_syntax/test_data/parser/ok/0064_impl_fn_params.rs index b49e872d7..b49e872d7 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0152_fn_patterns.rs +++ b/crates/ra_syntax/test_data/parser/ok/0064_impl_fn_params.rs | |||
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0152_fn_patterns.txt b/crates/ra_syntax/test_data/parser/ok/0064_impl_fn_params.txt index b30030de3..b30030de3 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0152_fn_patterns.txt +++ b/crates/ra_syntax/test_data/parser/ok/0064_impl_fn_params.txt | |||