-
Notifications
You must be signed in to change notification settings - Fork 926
Rustfmt deletes comments in 'use {}' #4708
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Labels
Comments
Here's a slightly more common example of where this bug results in an annoyance: pub use serenity::model::{
// channel::{Message, Reaction, ReactionType},
// gateway::Ready,
// guild::{Member, Role},
// id::{ChannelId, GuildId, MessageId, RoleId, UserId},
// permissions::Permissions,
prelude::*,
// user::User,
}; Upon invoking rustfmt, all the commented-out lines disappeared |
repro'd with 1.4.38 |
Is this the same as #3984? |
@AndrewKvalheim it seems like they are the same. Thanks for pointing that out 😁 |
Closed
This was completed in #5853 |
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
Describe the bug
To Reproduce
run rustfmt on the following code:
use {std::env::args /* this comment gets removed */};
fn main() {println!("hello from {}!", args().next().unwrap());}
Expected behavior
comment should be preserved
Meta
The text was updated successfully, but these errors were encountered: