rustfmt
rustfmt copied to clipboard
Issue-5892: Type alias generic ident should follow the same linebreak rule as trait
Pull Request Template
Checklist
- [x] Confirmed that
cargo testpasses
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