Releases: rust-lang/rustfmt
Releases · rust-lang/rustfmt
v1.4.33
Changed
merge_importsconfiguration has been deprecated in favor of the newimports_granularityoption. Any existing usage ofmerge_importswill be automatically mapped to the corresponding value onimports_granularitywith a warning message printed to encourage users to update their config files.
Added
- New
imports_granularityoption has been added which succeedsmerge_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, PR #4639)
See the section on the configuration site for more information
https://rust-lang.github.io/rustfmt/?version=v1.4.33&search=#imports_granularity
Fixed
- Fix erroneous removal of
constkeyword on const trait impl (#4084) - Fix incorrect span usage wit const generics in supertraits (#4204)
- Use correct span for const generic params (#4263)
- Correct span on const generics to include type bounds (#4310)
- Idempotence issue on blocks containing only empty statements (#4627 and #3868)
- Fix issue with semicolon placement on required functions that have a trailing comment that ends in a line-style comment before the semicolon (#4646)
- Avoid shared interned cfg_if symbol since rustfmt can re-initialize the rustc_ast globals on multiple inputs (#4656)
v1.4.32
v1.4.31
v1.4.30
Fixed
- Last character in derive no longer erroneously stripped when
indent_styleis overridden toVisual. (#4584) - 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)
- No more panics on invalid code with
errandtypeoftypes (#4357, #4586)
v1.4.29
v1.4.28
Changed
rustc-ap-*crates updated to v691.0.0- In the event of an invalid inner attribute on a
cfg_ifcondition, 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.
Added
group_imports- a new configuration option that allows users to control the strategy used for grouping imports (#4107)
Fixed
- Formatting of malformed derived attributes is no longer butchered. (#3898, #4029, #4115, #4545)
- Correct indentation used in macro branches when
hard_tabsis enabled. (#4152) - Comments between the visibility modifier and item name are no longer dropped. (#2781)
- Comments preceding the assignment operator in type aliases are no longer dropped. (#4244)
- Comments between {
&operator, lifetime,mutkw, type} are no longer dropped. (#4245) - Comments between type bounds are no longer dropped. (#4243)
- Function headers are no longer dropped on foreign function items. (#4288)
- Foreign function blocks are no longer dropped. (#4313)
where_single_lineis no longer incorrectly applied to multiline function signatures that have nowhereclause. (#4547)
v1.4.27
Release v1.4.27
v1.4.26
Release v1.4.26
v1.4.25
Release v1.4.25
v1.4.24
Release v1.4.24