|
2 | 2 |
|
3 | 3 | ## [Unreleased]
|
4 | 4 |
|
5 |
| -- Updating `dirs 4.0.0 -> 5.0.1` and `cargo_metadata 0.15.4 -> 0.18.0` [#6033] (https://github.com/rust-lang/rustfmt/issues/6033) |
| 5 | +### Fixed |
| 6 | + |
| 7 | +- Fix an idempotency issue when rewriting where clauses in which rustfmt would continuously add a trailing comma `,` to the end of trailing line comments [#5941](https://github.com/rust-lang/rustfmt/issues/5941). |
| 8 | +- When using `version=Two`, the `trace!` macro from the [log crate] is now formatted similarly to `debug!`, `info!`, `warn!`, and `error!` [#5987](https://github.com/rust-lang/rustfmt/issues/5987). |
| 9 | +- Prevent enum variant attributes from wrapping one character early when using `version=Two` [#5801](https://github.com/rust-lang/rustfmt/issues/5801) |
| 10 | +- Properly wrap macro matchers at the `max_width` when using `version=Two` and `format_macro_matchers=true` [#3805](https://github.com/rust-lang/rustfmt/issues/3805) |
| 11 | +- Prevent panic when formatting trait declaration with non [Unicode Normalization Form] C (NFC) identifiers [#6069](https://github.com/rust-lang/rustfmt/issues/6069) |
| 12 | + ```rust |
| 13 | + // The ó below is two codepoints, ASCII o followed by U+0301 COMBINING ACUTE ACCENT. |
| 14 | + // It NFC-normalizes to ó, U+00F3 LATIN SMALL LETTER O WITH ACUTE. |
| 15 | + trait Foó: Bar {} |
| 16 | + ``` |
| 17 | +- Ensure a space is added to a range expression, when the right hand side of the range expression is a binary expression that ends with a trailing period. |
| 18 | + ```rust |
| 19 | + let range = 3. / 2. ..4.; |
| 20 | + ``` |
| 21 | +- When using `version=Two`, comments in match arms that contain `=>` no longer prevent formatting [#5998](https://github.com/rust-lang/rustfmt/issues/5998) |
| 22 | + ```rust |
| 23 | + match a { |
| 24 | + _ => |
| 25 | + // comment with => |
| 26 | + { |
| 27 | + println!("A") |
| 28 | + } |
| 29 | + } |
| 30 | + ``` |
| 31 | +- Prevent panics when formatting input that contains the expanded form of `offset_of!` [#5885](https://github.com/rust-lang/rustfmt/issues/5885) [#6105](https://github.com/rust-lang/rustfmt/issues/6105) |
| 32 | + ```rust |
| 33 | + const _: () = builtin # offset_of(x, x); |
| 34 | + ``` |
| 35 | + |
| 36 | +[log crate]: https://crates.io/crates/log |
| 37 | +[unicode normalization form]: https://unicode.org/reports/tr15/ |
| 38 | + |
| 39 | + |
| 40 | +### Changed |
| 41 | + |
| 42 | +- `hide_parse_errors` has been soft deprecated and it's been renamed to `show_parse_errors` [#5961](https://github.com/rust-lang/rustfmt/pull/5961). |
| 43 | +- The diff output produced by `rustfmt --check` is more compatable with editors that support navigating directly to line numbers [#5971](https://github.com/rust-lang/rustfmt/pull/5971) |
| 44 | + |
| 45 | + |
| 46 | +### Added |
| 47 | + |
| 48 | +- `generated_marker_line_search_limit` is a new unstable configuration option that allows users to configure how many lines to search for an `@generated` marker when `format_generated_files=false` [#5658](https://github.com/rust-lang/rustfmt/issues/5658) |
| 49 | + |
| 50 | + |
| 51 | +### Misc |
| 52 | + |
| 53 | +- Updated dependencies: `dirs 4.0.0 -> 5.0.1` and `cargo_metadata 0.15.4 -> 0.18.0` [#6033] (https://github.com/rust-lang/rustfmt/issues/6033) |
| 54 | +- Addressed clap deprecations output when running `cargo check --features clap/deprecated` [#6101](https://github.com/rust-lang/rustfmt/pull/6101) |
6 | 55 |
|
7 | 56 | ## [1.7.0] 2023-10-22
|
8 | 57 |
|
|
0 commit comments