Skip to content

Comments

[import_granularity] Allow formatting of use behind #[cfg*]#6808

Open
dingxiangfei2009 wants to merge 1 commit intorust-lang:mainfrom
dingxiangfei2009:issue-6666
Open

[import_granularity] Allow formatting of use behind #[cfg*]#6808
dingxiangfei2009 wants to merge 1 commit intorust-lang:mainfrom
dingxiangfei2009:issue-6666

Conversation

@dingxiangfei2009
Copy link

Fix #6666
Related to #4991
Replace #6723

We would like to allow formatting items with attributes that conceptually allows outer styling as well. This is now tested against other granularity settings under the import_granularity flag.

Migrating from #6723 because PR was initiated from a wrong branch.

@rustbot rustbot added the S-waiting-on-review Status: awaiting review from the assignee but also interested parties. label Feb 19, 2026
Fix rust-lang#6666

We would like to allow formatting items with attributes that
conceptually allows outer styling as well.

Signed-off-by: Xiangfei Ding <dingxiangfei2009@protonmail.ch>
@rustbot
Copy link
Collaborator

rustbot commented Feb 19, 2026

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@dingxiangfei2009
Copy link
Author

cc @jieyouxu I had to migrate it to a new PR because the source branch was master from my fork for some reason.

cc @matthewhughes934 I had addressed your review comments in #6723 including some additional tests.

@dingxiangfei2009
Copy link
Author

@rustbot label +UO-imports_granularity

@rustbot rustbot added the UO-imports_granularity Unstable option: imports_granularity label Feb 19, 2026
@jieyouxu jieyouxu added the F-impacts-unstable-options Expected formatting impact: only affects code formatted by unstable options label Feb 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

F-impacts-unstable-options Expected formatting impact: only affects code formatted by unstable options S-waiting-on-review Status: awaiting review from the assignee but also interested parties. UO-imports_granularity Unstable option: imports_granularity

Projects

None yet

Development

Successfully merging this pull request may close these issues.

imports_granularity is not respected for #[cfg]'d items

3 participants