Add imports_granularity = "Module" to rustfmt.toml#11095
Add imports_granularity = "Module" to rustfmt.toml#11095bors merged 1 commit intorust-lang:masterfrom
imports_granularity = "Module" to rustfmt.toml#11095Conversation
|
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) |
flip1995
left a comment
There was a problem hiding this comment.
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.
Manishearth
left a comment
There was a problem hiding this comment.
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,
Moduleseems 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 fmtor blessed tests, the exceptions beingtests/ui/single_component_path_imports.rstests/ui/single_component_path_imports_nested_first.rstests/ui/single_component_path_imports_self_after.rstests/ui/single_component_path_imports_self_before.rstests/ui/unsafe_removed_from_name.rs(added a test with merged imports as a drive by)tests/ui/wildcard_imports.rstests/ui/wildcard_imports_2021.rs