rustfmt icon indicating copy to clipboard operation
rustfmt copied to clipboard

leverage `itemize_list` and `write_list` to recover trait bound comments

Open ytmimi opened this issue 1 year ago • 2 comments

Fixes #2055

Now when using version::Two, rustfmt will permit comments within trait bounds and actually reformat them instead of refusing to rewrite the entire trait definition because there are comments in the bounds.

This follows the approach hinted at in https://github.com/rust-lang/rustfmt/issues/2055#issuecomment-343150579.

Edit -- Other issues fixed by this change: Fixes #6127

ytmimi avatar Jan 29 '24 04:01 ytmimi

TODO: add test case for #5321, which I think this also fixes

ytmimi avatar Mar 30 '24 01:03 ytmimi