-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Add imports_granularity = "Module"
to rustfmt.toml
#11095
Conversation
r? @Manishearth (rustbot has picked a reviewer for you, use r? to override) |
What about |
I'd like to switch to rust-lang/rustfmt#5781 if that should get merged. |
Ooh I like that :) |
FWIW this also only modifies just under a third of the files, 195/605 (excluding tests since almost all of those are unchanged) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm fine with adding this. But once the above linked feature is available, I'd like to move to that one. But I wouldn't block this PR on that.
Leaving this PR open for 1-3 days, so that people can raise their objections, if any.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same opinion as @flip1995 , r=me after a couple days
☔ The latest upstream changes (presumably #10788) made this pull request unmergeable. Please resolve the merge conflicts. |
3928ece
to
2811eff
Compare
Let's create a bunch of conflicts! @bors r=Manishearth |
☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test |
This lets rustfmt split/merge imports,
Module
seems to be the most common style in clippyhttps://rust-lang.github.io/rustfmt/?version=v1.6.0&search=#imports_granularity
changelog: none
Almost all the updates other than the config file change are from
cargo dev fmt
or blessed tests, the exceptions beingtests/ui/single_component_path_imports.rs
tests/ui/single_component_path_imports_nested_first.rs
tests/ui/single_component_path_imports_self_after.rs
tests/ui/single_component_path_imports_self_before.rs
tests/ui/unsafe_removed_from_name.rs
(added a test with merged imports as a drive by)tests/ui/wildcard_imports.rs
tests/ui/wildcard_imports_2021.rs