|
2 | 2 |
|
3 | 3 | ## [Unreleased]
|
4 | 4 |
|
| 5 | +## [1.5.3] 2023-06-20 |
| 6 | + |
5 | 7 | ### Fixed
|
6 | 8 |
|
7 | 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)
|
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. |
| 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. |
9 | 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)
|
10 | 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:
|
11 | 15 | ```rust
|
|
14 | 18 | /// ```
|
15 | 19 | fn main() {}
|
16 | 20 | ```
|
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.: |
| 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.: |
18 | 22 | ```rust
|
19 | 23 | struct S<const C: usize>
|
20 | 24 | where
|
21 | 25 | [(); { num_slots!(C) }]:, {
|
22 | 26 | // code ...
|
23 | 27 | }
|
24 | 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) |
25 | 32 |
|
26 | 33 | ### Changed
|
27 | 34 |
|
|
34 | 41 |
|
35 | 42 | ### Misc
|
36 | 43 |
|
37 |
| -- Prevent ICE when parsing invalid attributes in `cfg_if!` macros [#5728](https://github.com/rust-lang/rustfmt/issues/5728) |
38 |
| - |
39 |
| - |
40 |
| -## [1.5.2] 2023-01-24 |
41 |
| - |
42 |
| -### Fixed |
43 |
| - |
44 |
| -- Resolve issue when comments are found within const generic defaults in unit structs [#5668](https://github.com/rust-lang/rustfmt/issues/5668) |
45 |
| -- Resolve issue when block comments are found within trait generics [#5358](https://github.com/rust-lang/rustfmt/issues/5358) |
46 |
| -- Correctly handle alignment of comments containing unicode characters [#5504](https://github.com/rust-lang/rustfmt/issues/5504) |
47 |
| -- Properly indent a single generic bound that requires being written across multiple lines [#4689](https://github.com/rust-lang/rustfmt/issues/4689) (n.b. this change is version gated and will only appear when the `version` configuration option is set to `Two`) |
48 |
| - |
49 |
| -### Changed |
50 |
| - |
51 |
| -- Renamed `fn_args_layout` configuration option to `fn_params_layout` [#4149](https://github.com/rust-lang/rustfmt/issues/4149). Note that `fn_args_layout` has only been soft deprecated: `fn_args_layout` will continue to work without issue, but rustfmt will display a warning to encourage users to switch to the new name |
52 |
| - |
53 |
| -### Added |
54 |
| - |
55 |
| -- New configuration option (`skip_macro_invocations`)[https://rust-lang.github.io/rustfmt/?version=master&search=#skip_macro_invocations] [#5347](https://github.com/rust-lang/rustfmt/pull/5347) that can be used to globally define a single enumerated list of macro calls that rustfmt should skip formatting. rustfmt [currently also supports this via a custom tool attribute](https://github.com/rust-lang/rustfmt#tips), however, these cannot be used in all contexts because [custom inner attributes are unstable](https://github.com/rust-lang/rust/issues/54726) |
56 |
| - |
57 |
| -### Misc |
58 |
| - |
59 |
| -- rustfmt now internally supports the ability to have both stable and unstable variants of a configuration option [#5378](https://github.com/rust-lang/rustfmt/issues/5378). This ability will allow the rustfmt team to make certain configuration options available on stable toolchains more quickly because we no longer have to wait for _every_ variant to be stable-ready before stabilizing _any_ variant. |
60 |
| - |
61 |
| -### Install/Download Options |
62 |
| -- **rustup (nightly)** - nightly-2023-01-24 |
63 |
| -- **GitHub Release Binaries** - [Release v1.5.2](https://github.com/rust-lang/rustfmt/releases/tag/v1.5.2) |
64 |
| -- **Build from source** - [Tag v1.5.2](https://github.com/rust-lang/rustfmt/tree/v1.5.2), see instructions for how to [install rustfmt from source][install-from-source] |
| 44 | +- Update various dependencies, including `syn`, `cargo_metadata`, `env_logger`, and `toml` |
65 | 45 |
|
66 | 46 | ## [1.5.2] 2023-01-24
|
67 | 47 |
|
|
0 commit comments