Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rustfmt puts single-line comment after wrong import when reordering imports #4027

Closed
Boscop opened this issue Jan 24, 2020 · 4 comments · May be fixed by #4504
Closed

Rustfmt puts single-line comment after wrong import when reordering imports #4027

Boscop opened this issue Jan 24, 2020 · 4 comments · May be fixed by #4504

Comments

@Boscop
Copy link

Boscop commented Jan 24, 2020

before rustfmt:

pub use views::*;
pub use foo::bar; // re-export for frontend

after (with import reordering enabled):

pub use foo::bar;
pub use views::*; // re-export for frontend

The comment is at the wrong import now. It should not just reorder the imports but also their comments with them!

@topecongiro topecongiro added the a-imports `use` syntax label Jun 29, 2020
@topecongiro topecongiro added this to the 3.0.0 milestone Jun 29, 2020
@mbarbar
Copy link

mbarbar commented Sep 10, 2020

Looks like #3720.

@whizsid
Copy link
Contributor

whizsid commented Oct 20, 2020

I am working on this issue.

@mbarbar
Copy link

mbarbar commented Oct 21, 2020

This comment may make getting started a little easier, though it may be outdated.
#3720 (comment)

@ytmimi
Copy link
Contributor

ytmimi commented Jul 26, 2022

closing this as a duplicate of #3720

@ytmimi ytmimi closed this as not planned Won't fix, can't repro, duplicate, stale Jul 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants