You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+37Lines changed: 37 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,41 @@
2
2
3
3
## [Unreleased]
4
4
5
+
### Fixed
6
+
7
+
- When formatting doc comments with `wrap_comments = true` rustfmt will no longer wrap markdown tables [#4210](https://github.com/rust-lang/rustfmt/issues/4210)
8
+
- rustfmt will no longer use shorthand initialization when rewriting a tuple struct even when `use_field_init_shorthand = true` as this lead to code that could no longer compile.
9
+
Take the following struct as an example `struct MyStruct(u64);`. rustfmt will no longer format `MyStruct { 0: 0 }` as `MyStruct { 0 }`[#5488](https://github.com/rust-lang/rustfmt/issues/5488)
10
+
- rustfmt no longer panics when formatting an empty code block in a doc comment with `format_code_in_doc_comments = true`[#5234](https://github.com/rust-lang/rustfmt/issues/5234). For example:
11
+
```rust
12
+
/// ```
13
+
///
14
+
/// ```
15
+
fnmain() {}
16
+
```
17
+
- Use the correct span when rewriting struct generics. This prevents rustfmt from incorrectly duplicating where clause bounds when using const expression in where clause bounds with feature `#![feature(generic_const_exprs)]`[#5691](https://github.com/rust-lang/rustfmt/issues/5691). e.g.:
18
+
```rust
19
+
structS<constC:usize>
20
+
where
21
+
[(); { num_slots!(C) }]:, {
22
+
// code ...
23
+
}
24
+
```
25
+
26
+
### Changed
27
+
28
+
- Users can now control whether rustc parser errors are displayed with color using rustfmt's `--color` option. To disable colored errors pass `--color=Never` to rustfmt [#5717](https://github.com/rust-lang/rustfmt/issues/5717)
29
+
30
+
31
+
### Added
32
+
33
+
- rustfmt now recognises `+` as the start of a markdown list, and won't incorrectly wrap sublists that begin with `+` when formatting doc comments with `wrap_comments = true`[#5560](https://github.com/rust-lang/rustfmt/pull/5560)
34
+
35
+
### Misc
36
+
37
+
- Prevent ICE when parsing invalid attributes in `cfg_if!` macros [#5728](https://github.com/rust-lang/rustfmt/issues/5728)
38
+
39
+
5
40
## [1.5.2] 2023-01-24
6
41
7
42
### Fixed
@@ -56,6 +91,8 @@
56
91
57
92
- Simplify the rustfmt help text by eliding the full path to the rustfmt binary path from the usage string when running `rustfmt --help`[#5214](https://github.com/rust-lang/rustfmt/issues/5214)
58
93
94
+
- Bumped the version for serveral dependencies. Most notably `dirs``v2.0.1` -> `v4.0.0`. This changed the global user config directory on macOS from `$HOME/Library/Preferences` to `$HOME/Library/Application Support`[#5237](https://github.com/rust-lang/rustfmt/pull/5237)
95
+
59
96
### Fixed
60
97
61
98
- Remove duplicate imports when `imports_granularity` is set to `Item`[#4725](https://github.com/rust-lang/rustfmt/issues/4725)
0 commit comments