Repository navigation
Revert "Fixes adjustment of max_width within macros" (rust-lang/rustfmt#6651) and follow-up (rust-lang/rustfmt#7152) - #7222
Merged
Conversation
Reverts rust-lang#7152. This reverts commit 677b954, reversing changes made to b4260f4.
Reverts rust-lang#6651 since it affects stable macro formatting, even though `format_macro_bodies` is unstable option (unstability applies only to the config, the "format macro bodies" value is stable default formatting). We generally cannot make this change on SE 2024. This reverts commit 93e78f2.
Member
Author
|
(NB: the labels match #6651, but these are still only on beta right now.) |
adjust_max_width"adjust_max_width" and follow-up
adjust_max_width" and follow-upadjust_max_width" (rust-lang/rustfmt#6651) and follow-up
adjust_max_width" (rust-lang/rustfmt#6651) and follow-upadjust_max_width" (rust-lang/rustfmt#6651) and follow-up (rust-lang/rustfmt#7152)
3 tasks done
jieyouxu
commented
Nov 2, 2026
Member
Author
There was a problem hiding this comment.
I think I'd like to have stronger test coverage for the reland.
(This is now more obvious on hindsight...)
Member
Author
|
@ytmimi since this is essentially 2 clean reverts and we essentially have agreement in #7221 (comment), I'm going to unilaterally merge this revert so I can start on the subtree syncs. (If there's a problem we can still revert this revert before we land the syncs, so no big deal.) |
1 of 2 tasks
1 of 2 tasks
adjust_max_width" (rust-lang/rustfmt#6651) and follow-up (rust-lang/rustfmt#7152)max_width within macros" (rust-lang/rustfmt#6651) and follow-up (rust-lang/rustfmt#7152)
1 of 2 tasks
Contributor
|
Thanks for getting this merged 🙏🏼 |
rust-bors Bot
pushed a commit
to rust-lang/rust
that referenced
this pull request
Nov 3, 2026
[beta] Revert "Fixes adjustment of `max_width` within macros" (rust-lang/rustfmt#6651) and follow-up (rust-lang/rustfmt#7152) rust-lang/rust side beta-backport of rust-lang/rustfmt#7222. Part of rust-lang/rustfmt#7223. Closes rust-lang/rustfmt#7223. See rust-lang/rustfmt#7221 (comment). This PR reverts both: 1. rust-lang/rustfmt#6651 (partially; I kept the baseline test commit but not the actual formatting change commit), and 2. rust-lang/rustfmt#7152 (follow-up fix) r? @ytmimi
rust-bors Bot
pushed a commit
to rust-lang/rust
that referenced
this pull request
Nov 3, 2026
[beta] Revert "Fixes adjustment of `max_width` within macros" (rust-lang/rustfmt#6651) and follow-up (rust-lang/rustfmt#7152) rust-lang/rust side beta-backport of rust-lang/rustfmt#7222. Part of rust-lang/rustfmt#7223. Closes rust-lang/rustfmt#7223. See rust-lang/rustfmt#7221 (comment). This PR reverts both: 1. rust-lang/rustfmt#6651 (partially; I kept the baseline test commit but not the actual formatting change commit), and 2. rust-lang/rustfmt#7152 (follow-up fix) r? @ytmimi
rust-bors Bot
pushed a commit
to rust-lang/rust
that referenced
this pull request
Nov 3, 2026
[beta] Revert "Fixes adjustment of `max_width` within macros" (rust-lang/rustfmt#6651) and follow-up (rust-lang/rustfmt#7152) rust-lang/rust side beta-backport of rust-lang/rustfmt#7222. Part of rust-lang/rustfmt#7223. Closes rust-lang/rustfmt#7223. See rust-lang/rustfmt#7221 (comment). This PR reverts both: 1. rust-lang/rustfmt#6651 (partially; I kept the baseline test commit but not the actual formatting change commit), and 2. rust-lang/rustfmt#7152 (follow-up fix) r? @ytmimi
Member
Author
|
Beta cherry-pick of this merged in rust-lang/rust#165368. Technically this PR is both 1.100.0 + 1.101.0. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Part of #7223.
See #7221 (comment). This PR reverts both:
adjust_max_width#7152 (follow-up fix)I didn't expect #6651 to affect stable formatting (not stable default since it requires stable width options to be changed) since
format_macro_bodiesis unstable. Which it is, but the default value offormat_macro_bodiesbeingyesis part of stable default config; you just can't stably toggleformat_macro_bodiestono. So #6651 actually affects stable formatted macro bodies using one of the stable width options, so we can't make that change absent a style edition gate.Considering #6651 and #7152 are both on 1.100 beta (will become stable next week, but beta branch promotion / forking actually happens this Friday), let's revert to be safe. We can reland #6651 + #7152 + #7221 together to give them two release cycles to bake.
Re-opens #5404.
Notes for the reviewer
betaas wellr? @ytmimi