Skip to content

Commit

Permalink
add test for 4708
Browse files Browse the repository at this point in the history
This is fixed by backporting 3999
  • Loading branch information
ytmimi committed Jul 21, 2022
1 parent 69f2d1d commit cd8dc7c
Show file tree
Hide file tree
Showing 5 changed files with 65 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tests/target/issue-4708/imports_granularity_crate.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// rustfmt-imports_granularity: Crate

// See https://github.com/rust-lang/rustfmt/issues/4708
pub use serenity::model::{
// channel::{Message, Reaction, ReactionType},
// gateway::Ready,
// guild::{Member, Role},
// id::{ChannelId, GuildId, MessageId, RoleId, UserId},
// permissions::Permissions,
prelude::*,
// user::User,
};
use {std::env::args /* this comment gets removed */};
13 changes: 13 additions & 0 deletions tests/target/issue-4708/imports_granularity_item.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// rustfmt-imports_granularity: Item

// See https://github.com/rust-lang/rustfmt/issues/4708
pub use serenity::model::{
// channel::{Message, Reaction, ReactionType},
// gateway::Ready,
// guild::{Member, Role},
// id::{ChannelId, GuildId, MessageId, RoleId, UserId},
// permissions::Permissions,
prelude::*,
// user::User,
};
use {std::env::args /* this comment gets removed */};
13 changes: 13 additions & 0 deletions tests/target/issue-4708/imports_granularity_module.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// rustfmt-imports_granularity: Module

// See https://github.com/rust-lang/rustfmt/issues/4708
pub use serenity::model::{
// channel::{Message, Reaction, ReactionType},
// gateway::Ready,
// guild::{Member, Role},
// id::{ChannelId, GuildId, MessageId, RoleId, UserId},
// permissions::Permissions,
prelude::*,
// user::User,
};
use {std::env::args /* this comment gets removed */};
13 changes: 13 additions & 0 deletions tests/target/issue-4708/imports_granularity_one.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// rustfmt-imports_granularity: One

// See https://github.com/rust-lang/rustfmt/issues/4708
pub use serenity::model::{
// channel::{Message, Reaction, ReactionType},
// gateway::Ready,
// guild::{Member, Role},
// id::{ChannelId, GuildId, MessageId, RoleId, UserId},
// permissions::Permissions,
prelude::*,
// user::User,
};
use {std::env::args /* this comment gets removed */};
13 changes: 13 additions & 0 deletions tests/target/issue-4708/imports_granularity_preserve.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// rustfmt-imports_granularity: Preserve

// See https://github.com/rust-lang/rustfmt/issues/4708
pub use serenity::model::{
// channel::{Message, Reaction, ReactionType},
// gateway::Ready,
// guild::{Member, Role},
// id::{ChannelId, GuildId, MessageId, RoleId, UserId},
// permissions::Permissions,
prelude::*,
// user::User,
};
use {std::env::args /* this comment gets removed */};

0 comments on commit cd8dc7c

Please sign in to comment.