diff options
author | Aleksey Kladov <[email protected]> | 2021-05-17 10:41:48 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2021-05-17 10:45:01 +0100 |
commit | 75a012361409349d0325c9232e0c8fe8d52de505 (patch) | |
tree | beae641851dc5839f7d69472420012f920c25e8c /crates/ide/src/diagnostics | |
parent | 21918c6f5e0add44c7ba0df362c4890494e86875 (diff) |
fix: don't add extra whitespace around fields
closes #8785
Diffstat (limited to 'crates/ide/src/diagnostics')
-rw-r--r-- | crates/ide/src/diagnostics/fixes/fill_missing_fields.rs | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/crates/ide/src/diagnostics/fixes/fill_missing_fields.rs b/crates/ide/src/diagnostics/fixes/fill_missing_fields.rs index 123c2f0af..37a0e37a9 100644 --- a/crates/ide/src/diagnostics/fixes/fill_missing_fields.rs +++ b/crates/ide/src/diagnostics/fixes/fill_missing_fields.rs | |||
@@ -189,4 +189,29 @@ fn test_fn() { | |||
189 | "#, | 189 | "#, |
190 | ); | 190 | ); |
191 | } | 191 | } |
192 | |||
193 | #[test] | ||
194 | fn test_fill_struct_fields_blank_line() { | ||
195 | check_fix( | ||
196 | r#" | ||
197 | struct S { a: (), b: () } | ||
198 | |||
199 | fn f() { | ||
200 | S { | ||
201 | $0 | ||
202 | }; | ||
203 | } | ||
204 | "#, | ||
205 | r#" | ||
206 | struct S { a: (), b: () } | ||
207 | |||
208 | fn f() { | ||
209 | S { | ||
210 | a: (), | ||
211 | b: (), | ||
212 | }; | ||
213 | } | ||
214 | "#, | ||
215 | ); | ||
216 | } | ||
192 | } | 217 | } |