|
2 | 2 |
|
3 | 3 | ## [Unreleased]
|
4 | 4 |
|
| 5 | +## [1.5.3] 2023-06-20 |
| 6 | + |
| 7 | +### Fixed |
| 8 | + |
| 9 | +- When formatting doc comments with `wrap_comments = true` rustfmt will no longer wrap markdown tables [#4210](https://github.com/rust-lang/rustfmt/issues/4210) |
| 10 | +- Properly handle wrapping comments that include a numbered list in markdown [#5416](https://github.com/rust-lang/rustfmt/issues/5416) |
| 11 | +- Properly handle markdown sublists that utilize a `+` [#4041](https://github.com/rust-lang/rustfmt/issues/4210) |
| 12 | +- rustfmt will no longer use shorthand initialization when rewriting a tuple struct even when `use_field_init_shorthand = true` as this leads to code that could no longer compile. |
| 13 | + 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) |
| 14 | +- 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: |
| 15 | + ```rust |
| 16 | + /// ``` |
| 17 | + /// |
| 18 | + /// ``` |
| 19 | + fn main() {} |
| 20 | + ``` |
| 21 | +- rustfmt no longer incorrectly duplicates the 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.: |
| 22 | + ```rust |
| 23 | + struct S<const C: usize> |
| 24 | + where |
| 25 | + [(); { num_slots!(C) }]:, { |
| 26 | + // code ... |
| 27 | + } |
| 28 | + ``` |
| 29 | +- Prevent ICE when parsing invalid attributes in `cfg_if!` macros [#5728](https://github.com/rust-lang/rustfmt/issues/5728), [#5729](https://github.com/rust-lang/rustfmt/issues/5729) |
| 30 | +- rustfmt no longer loses comments placed between a doc comment and generic params [#5320](https://github.com/rust-lang/rustfmt/issues/5320) |
| 31 | +- Handle explicit discriminants in enums with comments present [#5686](https://github.com/rust-lang/rustfmt/issues/5686) |
| 32 | + |
| 33 | +### Changed |
| 34 | + |
| 35 | +- 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) |
| 36 | + |
| 37 | + |
| 38 | +### Added |
| 39 | + |
| 40 | +- 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) |
| 41 | + |
| 42 | +### Misc |
| 43 | + |
| 44 | +- Update various dependencies, including `syn`, `cargo_metadata`, `env_logger`, and `toml` |
| 45 | + |
5 | 46 | ## [1.5.2] 2023-01-24
|
6 | 47 |
|
7 | 48 | ### Fixed
|
|
56 | 97 |
|
57 | 98 | - 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 | 99 |
|
| 100 | +- 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) |
| 101 | + |
59 | 102 | ### Fixed
|
60 | 103 |
|
61 | 104 | - Remove duplicate imports when `imports_granularity` is set to `Item` [#4725](https://github.com/rust-lang/rustfmt/issues/4725)
|
|
0 commit comments