Skip to content

Commit

Permalink
Document changes for the next release
Browse files Browse the repository at this point in the history
  • Loading branch information
ytmimi committed Sep 18, 2024
1 parent b552eb9 commit 31e799f
Showing 1 changed file with 58 additions and 0 deletions.
58 changes: 58 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,64 @@

## [Unreleased]

### Fixed
- Fix issue where rustfmt would crash on Windows when using the `ignore` option [#6178](https://github.com/rust-lang/rustfmt/issues/6178)

### Changed
- `rustfmt --version` now prints a commit hash that is 10 characters long [#6258](https://github.com/rust-lang/rustfmt/pull/6258)
- `rustfmt --version` will no longer print empty git information when git information isn't available at build time.
For example, git information is not available when building rustfmt from a source tarball [#6266](https://github.com/rust-lang/rustfmt/pull/6266)
- `version` has been soft deprecated and replaced by `style_edition`.
`style_edition=2024` is equivalent to `version=Two` and `style_edition={2015|2018|2021}`
are equivalent to `version=One` [#6247](https://github.com/rust-lang/rustfmt/pull/6247)
- When `style_edition=2024` is configured `overflow_delimited_expr` will default to `true` [#6260](https://github.com/rust-lang/rustfmt/pull/6260).
```rust
// with style_edition=2015
do_thing(
x,
Bar {
x: value,
y: value2,
},
);

// with style_edition=2024
do_thing(x, Bar {
x: value,
y: value2,
});
```
- When `style_edition=2024` is configured rustfmt will apply the [style guide's version sorting algorithm]
when sorting imports [#6284](https://github.com/rust-lang/rustfmt/pull/6284)
```rust
// with style_edition=2015
use std::num::{NonZeroU16, NonZeroU32, NonZeroU64, NonZeroU8};

// with style_edition=2024
use std::num::{NonZeroU8, NonZeroU16, NonZeroU32, NonZeroU64};
```
[style guide's version sorting algorithm]: https://doc.rust-lang.org/nightly/style-guide/#sorting
- When parsing rustfmt configurations fails, rustfmt will now include the path to the toml file in the erorr message [#6302](https://github.com/rust-lang/rustfmt/issues/6302)

### Added
- rustfmt now formats trailing where clauses in type aliases [#5887](https://github.com/rust-lang/rustfmt/pull/5887)
```rust
type Foo
= Bar
where
A: B,
C: D;
```
- Users can now configure which `style_edition` rustfmt uses when formatting their code as specified
in [RFC 3338](https://rust-lang.github.io/rfcs/3338-style-evolution.html). Users are encouraged to configure `style_edition`
in their `rustfmt.toml` files, but the value can also be specified via the cli with `--unstable-features --style-edition={style_edition}`.
When `style_edition` is not explicitly configured it will be inferred from the `edition` configuration.
When neither `style_edition` nor `edition` are configured `style_edition` defaults to `2015` [#6247](https://github.com/rust-lang/rustfmt/pull/6247)

### Misc
- Removed `tracing-attributes` dependency [#6208](https://github.com/rust-lang/rustfmt/pull/6208)
- Reduced syn's features in the internal `config_proc_macro` crate [#6237](https://github.com/rust-lang/rustfmt/pull/6237)

## [1.7.1] 2024-06-24

### Fixed
Expand Down

0 comments on commit 31e799f

Please sign in to comment.