github rust-lang/rustfmt v1.4.28

latest releases: v1.7.0, v1.6.0, v1.5.3...
3 years ago

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)

Don't miss a new rustfmt release

NewReleases is sending notifications on new releases.