Skip to content

Commit 31e799f

Browse files
committed
Document changes for the next release
1 parent b552eb9 commit 31e799f

File tree

1 file changed

+58
-0
lines changed

1 file changed

+58
-0
lines changed

Diff for: CHANGELOG.md

+58
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,64 @@
22

33
## [Unreleased]
44

5+
### Fixed
6+
- Fix issue where rustfmt would crash on Windows when using the `ignore` option [#6178](https://github.com/rust-lang/rustfmt/issues/6178)
7+
8+
### Changed
9+
- `rustfmt --version` now prints a commit hash that is 10 characters long [#6258](https://github.com/rust-lang/rustfmt/pull/6258)
10+
- `rustfmt --version` will no longer print empty git information when git information isn't available at build time.
11+
For example, git information is not available when building rustfmt from a source tarball [#6266](https://github.com/rust-lang/rustfmt/pull/6266)
12+
- `version` has been soft deprecated and replaced by `style_edition`.
13+
`style_edition=2024` is equivalent to `version=Two` and `style_edition={2015|2018|2021}`
14+
are equivalent to `version=One` [#6247](https://github.com/rust-lang/rustfmt/pull/6247)
15+
- When `style_edition=2024` is configured `overflow_delimited_expr` will default to `true` [#6260](https://github.com/rust-lang/rustfmt/pull/6260).
16+
```rust
17+
// with style_edition=2015
18+
do_thing(
19+
x,
20+
Bar {
21+
x: value,
22+
y: value2,
23+
},
24+
);
25+
26+
// with style_edition=2024
27+
do_thing(x, Bar {
28+
x: value,
29+
y: value2,
30+
});
31+
```
32+
- When `style_edition=2024` is configured rustfmt will apply the [style guide's version sorting algorithm]
33+
when sorting imports [#6284](https://github.com/rust-lang/rustfmt/pull/6284)
34+
```rust
35+
// with style_edition=2015
36+
use std::num::{NonZeroU16, NonZeroU32, NonZeroU64, NonZeroU8};
37+
38+
// with style_edition=2024
39+
use std::num::{NonZeroU8, NonZeroU16, NonZeroU32, NonZeroU64};
40+
```
41+
[style guide's version sorting algorithm]: https://doc.rust-lang.org/nightly/style-guide/#sorting
42+
- 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)
43+
44+
### Added
45+
- rustfmt now formats trailing where clauses in type aliases [#5887](https://github.com/rust-lang/rustfmt/pull/5887)
46+
```rust
47+
type Foo
48+
= Bar
49+
where
50+
A: B,
51+
C: D;
52+
```
53+
- Users can now configure which `style_edition` rustfmt uses when formatting their code as specified
54+
in [RFC 3338](https://rust-lang.github.io/rfcs/3338-style-evolution.html). Users are encouraged to configure `style_edition`
55+
in their `rustfmt.toml` files, but the value can also be specified via the cli with `--unstable-features --style-edition={style_edition}`.
56+
When `style_edition` is not explicitly configured it will be inferred from the `edition` configuration.
57+
When neither `style_edition` nor `edition` are configured `style_edition` defaults to `2015` [#6247](https://github.com/rust-lang/rustfmt/pull/6247)
58+
59+
### Misc
60+
- Removed `tracing-attributes` dependency [#6208](https://github.com/rust-lang/rustfmt/pull/6208)
61+
- Reduced syn's features in the internal `config_proc_macro` crate [#6237](https://github.com/rust-lang/rustfmt/pull/6237)
62+
563
## [1.7.1] 2024-06-24
664

765
### Fixed

0 commit comments

Comments
 (0)