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

Reordered imports and comments mixed up #11087

Closed
NickLarsenNZ opened this issue Dec 21, 2021 · 2 comments
Closed

Reordered imports and comments mixed up #11087

NickLarsenNZ opened this issue Dec 21, 2021 · 2 comments

Comments

@NickLarsenNZ
Copy link

I've noticed an issue where comments on imports end up on the wrong line after the imports are reordered:

Before hitting save:

image

After hitting save:

Notice the comment on the wrong line

image

rust-analyzer version: rust-analyzer version: 0add6e95e 2021-12-20 stable

rustc version: rustc 1.57.0 (f1edd0429 2021-11-29)

@Veykril
Copy link
Member

Veykril commented Dec 21, 2021

We merely invoke rustfmt on save, so this is a bug with rustfmt, not rust-analyzer.

@NickLarsenNZ
Copy link
Author

NickLarsenNZ commented Dec 21, 2021

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants