mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-11-15 02:09:36 +00:00
Rollup merge of #139132 - m-ou-se:hir-pp-struct-expr, r=compiler-errors
Improve hir_pretty for struct expressions. While working on https://github.com/rust-lang/rust/pull/139131 I noticed the hir pretty printer outputs an empty line between each field, and is also missing a space before the `{` and the `}`: ```rust let a = StructWithSomeFields{ field_1: 1, field_2: 2, field_3: 3, field_4: 4, field_5: 5, field_6: 6,}; let a = StructWithSomeFields{ field_1: 1, field_2: 2, ..a}; ``` This changes it to: ```rust let a = StructWithSomeFields { field_1: 1, field_2: 2, field_3: 3, field_4: 4, field_5: 5, field_6: 6 }; let a = StructWithSomeFields { field_1: 1, field_2: 2, ..a }; ```
This commit is contained in:
commit
9d619866b0