rustfmt icon indicating copy to clipboard operation
rustfmt copied to clipboard

Issue-5892: Type alias generic ident should follow the same linebreak rule as trait

Open johnhuichen opened this issue 1 year ago • 0 comments

Pull Request Template

Checklist

  • [x] Confirmed that cargo test passes

Related Issues/PRs

https://github.com/rust-lang/rustfmt/issues/5892

Changes

The type alias formatting uses overlapping code path as trait formatting.

The difference is that type alias doesn't use the logic of rewrite_assign_rhs_with_comments, which checks if the generic bounds should be placed on the next line

Testing

added a test case tests/source/issue-5892.rs

johnhuichen avatar Aug 25 '24 06:08 johnhuichen