Skip to content

Releases: rust-lang/rustfmt

v1.4.33

28 Jan 03:00
v1.4.33
Compare
Choose a tag to compare

Changed

  • 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.

Added

  • 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, 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 const keyword 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

16 Jan 17:28
v1.4.32
Compare
Choose a tag to compare

Fixed

  • Indentation now correct on first bound in cases where the generic bounds are multiline formatted and the first bound itself is multiline formatted (#4636)

v1.4.31

09 Jan 18:48
v1.4.31
Compare
Choose a tag to compare

Changed

  • rustc-ap-* crates updated to v697.0.0

Added

  • Support for 2021 Edition (#4618)

v1.4.30

20 Dec 18:07
v1.4.30
Compare
Choose a tag to compare

Fixed

  • Last character in derive no longer erroneously stripped when indent_style is overridden to Visual. (#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 err and typeof types (#4357, #4586)

v1.4.29

08 Dec 03:39
v1.4.29
Compare
Choose a tag to compare

Fixed

  • Negative polarity on non-trait impl now preserved. (#4566)

v1.4.28

29 Nov 19:29
v1.4.28
Compare
Choose a tag to compare

Changed

  • rustc-ap-* crates updated to v691.0.0
  • 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.

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_tabs is 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, mut kw, 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_line is no longer incorrectly applied to multiline function signatures that have no where clause. (#4547)

v1.4.27

16 Nov 22:08
v1.4.27
Compare
Choose a tag to compare
Release v1.4.27

v1.4.26

14 Nov 18:08
v1.4.26
Compare
Choose a tag to compare
Release v1.4.26

v1.4.25

12 Nov 00:28
v1.4.25
Compare
Choose a tag to compare
Release v1.4.25

v1.4.24

06 Nov 02:46
v1.4.24
Compare
Choose a tag to compare
Release v1.4.24