aboutsummaryrefslogtreecommitdiff
path: root/crates/ide/src/diagnostics
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2021-05-17 10:41:48 +0100
committerAleksey Kladov <[email protected]>2021-05-17 10:45:01 +0100
commit75a012361409349d0325c9232e0c8fe8d52de505 (patch)
treebeae641851dc5839f7d69472420012f920c25e8c /crates/ide/src/diagnostics
parent21918c6f5e0add44c7ba0df362c4890494e86875 (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.rs25
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#"
197struct S { a: (), b: () }
198
199fn f() {
200 S {
201 $0
202 };
203}
204"#,
205 r#"
206struct S { a: (), b: () }
207
208fn f() {
209 S {
210 a: (),
211 b: (),
212 };
213}
214"#,
215 );
216 }
192} 217}