rustfmt: Discover modules via cfg_select!#158372
Conversation
|
cc @rust-lang/rustfmt |
|
r? @ytmimi rustbot has assigned @ytmimi. Use Why was this reviewer chosen?The reviewer was selected based on:
|
|
@rustbot label +beta-nominated
|
|
Overall I think this is a good change, and although it would technically be breaking since we'd end up formatting modules listed inside the |
There was a problem hiding this comment.
I think there are still a few references to the old cfg_match! that we should change. Once that's done and we figure out how we'll disclose this breaking change you can r=me.
I think it's fine to get this out before cfg_select! formatting lands since I agree that the impact of entire modules being left unformatted is larger than what will change once we start formatting cfg_select! calls.
3ba2282 to
a71b047
Compare
This comment has been minimized.
This comment has been minimized.
a71b047 to
4e98db3
Compare
4e98db3 to
facc787
Compare
|
(As |
|
At that point, probably yeah. |
|
I think the changes themselves should be fine now.
Is there any way I can help with that? Should I write something for the release notes or do something else? |
|
@jieyouxu would you be willing to merge this one since Yacin approved?
I added the relnotes label, you can add something to #159615. |
There was a problem hiding this comment.
Thanks, since the cfg_match -> cfg_select renames are now also done, and we have an associated relnotes issue...
@bors r=ytmimi,jieyouxu
Rollup of 14 pull requests Successful merges: - #159765 (Avoid spurious rebuilds of JSON docs in bootstrap) - #159781 (Update bootstrap to use -Zembed-metadata=no instead of -Zno-embed-metadata) - #158362 (trait solver: account for universes from replace_bound_vars) - #158372 (rustfmt: Discover modules via `cfg_select!`) - #159173 (Add allowed list check on EII implementations attributes) - #159718 (Make `DocLinkResMap` an `FxIndexMap`) - #159722 ( [rustdoc] Retrieve `cfg_attr` information for derived impls for `doc_cfg` feature) - #159731 (std: Implement futex on wasip3 targets, update target spec) - #159755 (Improve consistency of attribute error messages) - #155795 (constify `vec![1, 2, 3]` macro) - #157776 (ci: Enable autodiff tests on x86_64 linux) - #158766 (Promote riscv64-unknown-linux-musl to tier 2 with host tools) - #159271 (str: add ASCII fast path to word_to_titlecase) - #159667 (Make some parser structured suggestions verbose and tweak their wording)
Rollup merge of #158372 - mkroening:rustfmt-cfg_select-modules, r=ytmimi,jieyouxu rustfmt: Discover modules via `cfg_select!` This PR renames all occurrences of `cfg_match!` in rustfmt to `cfg_select!`. This makes the module file detection logic from rust-lang/rustfmt#6522 kick in for `cfg_select!` instead of `cfg_match!`, which no longer exists. This PR performs no other adjustments to the logic to be as small as possible. I am opening this PR in this repo since that is also the target for the more comprehensive #154202, which covers more than merely detecting other files through `cfg_select!`. Closes #158371. CC: @ytmimi, @CAD97
View all comments
This PR renames all occurrences of
cfg_match!in rustfmt tocfg_select!. This makes the module file detection logic from rust-lang/rustfmt#6522 kick in forcfg_select!instead ofcfg_match!, which no longer exists.This PR performs no other adjustments to the logic to be as small as possible.
I am opening this PR in this repo since that is also the target for the more comprehensive #154202, which covers more than merely detecting other files through
cfg_select!.Closes #158371.
CC: @ytmimi, @CAD97