rustfmt
rustfmt copied to clipboard
leverage `itemize_list` and `write_list` to recover trait bound 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
TODO: add test case for #5321, which I think this also fixes