rustfmt
rustfmt copied to clipboard
Fixed first comment and last comment not reordering issue
Fixes #4027 .
Thanks @whizsid! Note CI is failing and we're blocked on https://github.com/rust-lang/rust/issues/78549
Blocking issues should be resolved. When you get a chance can you rebase on master to grab the latest and get CI passing?
@calebcartwright I adjusted my PR. can you review again?
@calebcartwright I adjusted my PR. can you review again?
Thanks for the updates! This PR has been sitting out here for a while though, would you please rebase on master?
While there's a few nits I do think the approach seems reasonable, and the resulting formatting is certainly better than what it exists today (some of these snippets get horribly butchered today).
I'd like to add a couple more test cases before merging though, just to be extra cautious. Could you add a couple snippets to cover the following:
- A trailing mix of a block comment followed by a line comment (use foo; /* bar */ // evil
- Multiline block comments
- imports within indented scopes (e.g inside an inline module, function, etc.)
After those tests are added, should be good to merge