Skip to content

Commit 302107e

Browse files
docs: update changelog
1 parent d84a32c commit 302107e

File tree

1 file changed

+215
-1
lines changed

1 file changed

+215
-1
lines changed

Diff for: CHANGELOG.md

+215-1
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,220 @@
5454
- Stabilize `match_block_trailing_comma` configuration option.
5555
- Stabilize `ignore` configuration option.
5656

57+
## [1.4.36] 2021-02-07
58+
59+
### Changed
60+
61+
- `rustc-ap-*` crates updated to v705.0.0
62+
63+
### Install/Download Options
64+
- **crates.io package** - *pending*
65+
- **rustup (nightly)** - *pending*
66+
- **GitHub Release Binaries** - [Release v1.4.36](https://github.com/rust-lang/rustfmt/releases/tag/v1.4.36)
67+
- **Build from source** - [Tag v1.4.36](https://github.com/rust-lang/rustfmt/tree/v1.4.36), see instructions for how to [install rustfmt from source][install-from-source]
68+
69+
## [1.4.35] 2021-02-03
70+
71+
### Changed
72+
73+
- `rustc-ap-*` crates updated to v702.0.0
74+
75+
### Install/Download Options
76+
- **crates.io package** - *pending*
77+
- **rustup (nightly)** - *n/a (superseded by [v1.4.36](#1436-2021-02-07))
78+
- **GitHub Release Binaries** - [Release v1.4.35](https://github.com/rust-lang/rustfmt/releases/tag/v1.4.35)
79+
- **Build from source** - [Tag v1.4.35](https://github.com/rust-lang/rustfmt/tree/v1.4.35), see instructions for how to [install rustfmt from source][install-from-source]
80+
81+
## [1.4.34] 2021-01-28
82+
83+
### Fixed
84+
- Don't insert trailing comma on (base-less) rest in struct literals within macros ([#4675](https://github.com/rust-lang/rustfmt/issues/4675))
85+
86+
### Install/Download Options
87+
- **crates.io package** - *pending*
88+
- **rustup (nightly)** - Starting in `2021-01-31`
89+
- **GitHub Release Binaries** - [Release v1.4.34](https://github.com/rust-lang/rustfmt/releases/tag/v1.4.34)
90+
- **Build from source** - [Tag v1.4.34](https://github.com/rust-lang/rustfmt/tree/v1.4.34), see instructions for how to [install rustfmt from source][install-from-source]
91+
92+
## [1.4.33] 2021-01-27
93+
94+
### Changed
95+
- `merge_imports` configuration has been deprecated in favor of the new `imports_granularity` option. Any existing usage of `merge_imports` will be automatically mapped to the corresponding value on `imports_granularity` with a warning message printed to encourage users to update their config files.
96+
97+
### Added
98+
- New `imports_granularity` option has been added which succeeds `merge_imports`. This new option supports several additional variants which allow users to merge imports at different levels (crate or module), and even flatten imports to have a single use statement per item. ([PR #4634](https://github.com/rust-lang/rustfmt/pull/4634), [PR #4639](https://github.com/rust-lang/rustfmt/pull/4639))
99+
100+
See the section on the configuration site for more information
101+
https://rust-lang.github.io/rustfmt/?version=v1.4.33&search=#imports_granularity
102+
103+
### Fixed
104+
- Fix erroneous removal of `const` keyword on const trait impl ([#4084](https://github.com/rust-lang/rustfmt/issues/4084))
105+
- Fix incorrect span usage wit const generics in supertraits ([#4204](https://github.com/rust-lang/rustfmt/issues/4204))
106+
- Use correct span for const generic params ([#4263](https://github.com/rust-lang/rustfmt/issues/4263))
107+
- Correct span on const generics to include type bounds ([#4310](https://github.com/rust-lang/rustfmt/issues/4310))
108+
- Idempotence issue on blocks containing only empty statements ([#4627](https://github.com/rust-lang/rustfmt/issues/4627) and [#3868](https://github.com/rust-lang/rustfmt/issues/3868))
109+
- Fix issue with semicolon placement on required functions that have a trailing comment that ends in a line-style comment before the semicolon ([#4646](https://github.com/rust-lang/rustfmt/issues/4646))
110+
- Avoid shared interned cfg_if symbol since rustfmt can re-initialize the rustc_ast globals on multiple inputs ([#4656](https://github.com/rust-lang/rustfmt/issues/4656))
111+
112+
### Install/Download Options
113+
- **crates.io package** - *pending*
114+
- **rustup (nightly)** - n/a (superseded by [v1.4.34](#1434-2021-01-28))
115+
- **GitHub Release Binaries** - [Release v1.4.33](https://github.com/rust-lang/rustfmt/releases/tag/v1.4.33)
116+
- **Build from source** - [Tag v1.4.33](https://github.com/rust-lang/rustfmt/tree/v1.4.33), see instructions for how to [install rustfmt from source][install-from-source]
117+
118+
## [1.4.32] 2021-01-16
119+
120+
### Fixed
121+
- Indentation now correct on first bound in cases where the generic bounds are multiline formatted and the first bound itself is multiline formatted ([#4636](https://github.com/rust-lang/rustfmt/issues/4636))
122+
123+
### Install/Download Options
124+
- **crates.io package** - *pending*
125+
- **rustup (nightly)** - Starting in `2021-01-18`
126+
- **GitHub Release Binaries** - [Release v1.4.32](https://github.com/rust-lang/rustfmt/releases/tag/v1.4.32)
127+
- **Build from source** - [Tag v1.4.32](https://github.com/rust-lang/rustfmt/tree/v1.4.32), see instructions for how to [install rustfmt from source][install-from-source]
128+
129+
## [1.4.31] 2021-01-09
130+
131+
### Changed
132+
133+
- `rustc-ap-*` crates updated to v697.0.0
134+
135+
### Added
136+
- Support for 2021 Edition [#4618](https://github.com/rust-lang/rustfmt/pull/4618))
137+
138+
### Install/Download Options
139+
- **crates.io package** - *pending*
140+
- **rustup (nightly)** - Starting in `2021-01-16`
141+
- **GitHub Release Binaries** - [Release v1.4.31](https://github.com/rust-lang/rustfmt/releases/tag/v1.4.31)
142+
- **Build from source** - [Tag v1.4.31](https://github.com/rust-lang/rustfmt/tree/v1.4.31), see instructions for how to [install rustfmt from source][install-from-source]
143+
144+
## [1.4.30] 2020-12-20
145+
146+
### Fixed
147+
- Last character in derive no longer erroneously stripped when `indent_style` is overridden to `Visual`. ([#4584](https://github.com/rust-lang/rustfmt/issues/4584))
148+
- Brace wrapping of closure bodies maintained in cases where the closure has an explicit return type and the body consists of a single expression statement. ([#4577](https://github.com/rust-lang/rustfmt/issues/4577))
149+
- No more panics on invalid code with `err` and `typeof` types ([#4357](https://github.com/rust-lang/rustfmt/issues/4357), [#4586](https://github.com/rust-lang/rustfmt/issues/4586))
150+
151+
### Install/Download Options
152+
- **crates.io package** - *pending*
153+
- **rustup (nightly)** - Starting in `2020-12-25`
154+
- **GitHub Release Binaries** - [Release v1.4.30](https://github.com/rust-lang/rustfmt/releases/tag/v1.4.30)
155+
- **Build from source** - [Tag v1.4.30](https://github.com/rust-lang/rustfmt/tree/v1.4.30), see instructions for how to [install rustfmt from source][install-from-source]
156+
157+
## [1.4.29] 2020-12-04
158+
159+
### Fixed
160+
- Negative polarity on non-trait impl now preserved. ([#4566](https://github.com/rust-lang/rustfmt/issues/4566))
161+
162+
### Install/Download Options
163+
- **crates.io package** - *pending*
164+
- **rustup (nightly)** - Starting in `2020-12-07`
165+
- **GitHub Release Binaries** - [Release v1.4.29](https://github.com/rust-lang/rustfmt/releases/tag/v1.4.29)
166+
- **Build from source** - [Tag v1.4.29](https://github.com/rust-lang/rustfmt/tree/v1.4.29), see instructions for how to [install rustfmt from source][install-from-source]
167+
168+
## [1.4.28] 2020-11-29
169+
170+
### Changed
171+
172+
- `rustc-ap-*` crates updated to v691.0.0
173+
- In the event of an invalid inner attribute on a `cfg_if` condition, rustfmt will now attempt to continue and format the imported modules. Previously rustfmt would emit the parser error about an inner attribute being invalid in this position, but for rustfmt's purposes the invalid attribute doesn't prevent nor impact module formatting.
174+
175+
### Added
176+
177+
- [`group_imports`][group-imports-config-docs] - a new configuration option that allows users to control the strategy used for grouping imports ([#4107](https://github.com/rust-lang/rustfmt/issues/4107))
178+
179+
[group-imports-config-docs]: https://github.com/rust-lang/rustfmt/blob/v1.4.28/Configurations.md#group_imports
180+
181+
### Fixed
182+
- Formatting of malformed derived attributes is no longer butchered. ([#3898](https://github.com/rust-lang/rustfmt/issues/3898), [#4029](https://github.com/rust-lang/rustfmt/issues/4029), [#4115](https://github.com/rust-lang/rustfmt/issues/4115), [#4545](https://github.com/rust-lang/rustfmt/issues/4545))
183+
- Correct indentation used in macro branches when `hard_tabs` is enabled. ([#4152](https://github.com/rust-lang/rustfmt/issues/4152))
184+
- Comments between the visibility modifier and item name are no longer dropped. ([#2781](https://github.com/rust-lang/rustfmt/issues/2781))
185+
- Comments preceding the assignment operator in type aliases are no longer dropped. ([#4244](https://github.com/rust-lang/rustfmt/issues/4244))
186+
- Comments between {`&` operator, lifetime, `mut` kw, type} are no longer dropped. ([#4245](https://github.com/rust-lang/rustfmt/issues/4245))
187+
- Comments between type bounds are no longer dropped. ([#4243](https://github.com/rust-lang/rustfmt/issues/4243))
188+
- Function headers are no longer dropped on foreign function items. ([#4288](https://github.com/rust-lang/rustfmt/issues/4288))
189+
- Foreign function blocks are no longer dropped. ([#4313](https://github.com/rust-lang/rustfmt/issues/4313))
190+
- `where_single_line` is no longer incorrectly applied to multiline function signatures that have no `where` clause. ([#4547](https://github.com/rust-lang/rustfmt/issues/4547))
191+
- `matches!` expressions with multiple patterns and a destructure pattern are now able to be formatted. ([#4512](https://github.com/rust-lang/rustfmt/issues/4512))
192+
193+
### Install/Download Options
194+
- **crates.io package** - *pending*
195+
- **rustup (nightly)** - n/a (superseded by [v1.4.29](#1429-2020-12-04))
196+
- **GitHub Release Binaries** - [Release v1.4.28](https://github.com/rust-lang/rustfmt/releases/tag/v1.4.28)
197+
- **Build from source** - [Tag v1.4.28](https://github.com/rust-lang/rustfmt/tree/v1.4.28), see instructions for how to [install rustfmt from source][install-from-source]
198+
199+
## [1.4.27] 2020-11-16
200+
201+
### Fixed
202+
203+
- Leading comments in an extern block are no longer dropped (a bug that exists in v1.4.26). ([#4528](https://github.com/rust-lang/rustfmt/issues/4528))
204+
205+
### Install/Download Options
206+
- **crates.io package** - *pending*
207+
- **rustup (nightly)** - Starting in `2020-11-18`
208+
- **GitHub Release Binaries** - [Release v1.4.27](https://github.com/rust-lang/rustfmt/releases/tag/v1.4.27)
209+
- **Build from source** - [Tag v1.4.27](https://github.com/rust-lang/rustfmt/tree/v1.4.27), see instructions for how to [install rustfmt from source][install-from-source]
210+
211+
## [1.4.26] 2020-11-14
212+
213+
### Changed
214+
215+
- Original comment indentation for trailing comments within an `if` is now taken into account when determining the indentation level to use for the trailing comment in formatted code. This does not modify any existing code formatted with rustfmt; it simply gives the programmer discretion to specify whether the comment is associated to the `else` block, or if the trailing comment is just a member of the `if` block. ([#1575](https://github.com/rust-lang/rustfmt/issues/1575), [#4120](https://github.com/rust-lang/rustfmt/issues/4120), [#4506](https://github.com/rust-lang/rustfmt/issues/4506))
216+
217+
In this example the `// else comment` refers to the `else`:
218+
```rust
219+
// if comment
220+
if cond {
221+
"if"
222+
// else comment
223+
} else {
224+
"else"
225+
}
226+
```
227+
228+
Whereas in this case the `// continue` comments are members of their respective blocks and do not refer to the `else` below.
229+
```rust
230+
if toks.eat_token(Token::Word("modify"))? && toks.eat_token(Token::Word("labels"))? {
231+
if toks.eat_token(Token::Colon)? {
232+
// ate the token
233+
} else if toks.eat_token(Token::Word("to"))? {
234+
// optionally eat the colon after to, e.g.:
235+
// @rustbot modify labels to: -S-waiting-on-author, +S-waiting-on-review
236+
toks.eat_token(Token::Colon)?;
237+
} else {
238+
// It's okay if there's no to or colon, we can just eat labels
239+
// afterwards.
240+
}
241+
1 + 2;
242+
// continue
243+
} else if toks.eat_token(Token::Word("label"))? {
244+
// continue
245+
} else {
246+
return Ok(None);
247+
}
248+
```
249+
250+
### Fixed
251+
- Formatting of empty blocks with attributes which only contained comments is no longer butchered.([#4475](https://github.com/rust-lang/rustfmt/issues/4475), [#4467](https://github.com/rust-lang/rustfmt/issues/4467), [#4452](https://github.com/rust-lang/rustfmt/issues/4452#issuecomment-705886282), [#4522](https://github.com/rust-lang/rustfmt/issues/4522))
252+
- Indentation of trailing comments in non-empty extern blocks is now correct. ([#4120](https://github.com/rust-lang/rustfmt/issues/4120#issuecomment-696491872))
253+
254+
### Install/Download Options
255+
- **crates.io package** - *pending*
256+
- **rustup (nightly)** - Starting in `2020-11-16`
257+
- **GitHub Release Binaries** - [Release v1.4.26](https://github.com/rust-lang/rustfmt/releases/tag/v1.4.26)
258+
- **Build from source** - [Tag v1.4.26](https://github.com/rust-lang/rustfmt/tree/v1.4.26), see instructions for how to [install rustfmt from source][install-from-source]
259+
260+
## [1.4.25] 2020-11-10
261+
262+
### Changed
263+
264+
- Semicolons are no longer automatically inserted on trailing expressions in macro definition arms ([#4507](https://github.com/rust-lang/rustfmt/pull/4507)). This gives the programmer control and discretion over whether there should be semicolons in these scenarios so that potential expansion issues can be avoided.
265+
266+
### Install/Download Options
267+
- **crates.io package** - *pending*
268+
- **rustup (nightly)** - Starting in `2020-11-14`
269+
- **GitHub Release Binaries** - [Release v1.4.25](https://github.com/rust-lang/rustfmt/releases/tag/v1.4.25)
270+
- **Build from source** - [Tag v1.4.25](https://github.com/rust-lang/rustfmt/tree/v1.4.25), see instructions for how to [install rustfmt from source][install-from-source]
57271

58272
## [1.4.24] 2020-11-05
59273

@@ -66,7 +280,7 @@
66280

67281
### Install/Download Options
68282
- **crates.io package** - **pending**
69-
- **rustup (nightly)** - **pending**
283+
- **rustup (nightly)** - Starting in `2020-11-09`
70284
- **GitHub Release Binaries** - [Release v1.4.24](https://github.com/rust-lang/rustfmt/releases/tag/v1.4.24)
71285
- **Build from source** - [Tag v1.4.24](https://github.com/rust-lang/rustfmt/tree/v1.4.24), see instructions for how to [install rustfmt from source][install-from-source]
72286

0 commit comments

Comments
 (0)