rust-lang / rustfmt

Format Rust code
https://rust-lang.github.io/rustfmt/
Apache License 2.0
6.05k stars 888 forks source link

Breaking change in type alias with bound #6348

Closed robertbastian closed 2 months ago

robertbastian commented 2 months ago

The formatting of the declaration

type W<'a> = T::W<'a> where T: 'a;

changed in nightly-2024-09-22. The above code is formatted on stable, now it gets formatted to

type W<'a>
    = T::W<'a>
where
    T: 'a;
ytmimi commented 2 months ago

This was an expected change. Previously rustfmt didn't format type aliases that had trailing where clauses and now it does based on the prescription in the style guide.

For a full list of things that changed in the 1.8.0 release see the changelog.