Backport 3999
Do not remove comment from an import with a single item (#3999)
I haven't had a chance to check yet, but it's likely that this backport will fix #4708 and #3984
This has conflicts that will need to be resolved, though may be worth waiting to do so until after some other PRs land given the likely overlap of modified code
Now that we retain the comments this test case from #3984 is giving us some trouble use a::item /* comment */;
use a::item /* comment */; gets formatted as use a::item; /* comment */; Note the extra semicolon after the comment.
@calebcartwright Do you think it would be best to drop the test cases for #3984 and address that issue in a separate PR or to try and get that sorted out in this PR as well?
The backport was completed by https://github.com/rust-lang/rustfmt/pull/5853