Skip to content

Comments

Revert "defer changes for zero argument functions until style_edition=2027"#6595

Merged
ytmimi merged 1 commit intorust-lang:mainfrom
ytmimi:revert-zero-argument-func-wrapping-2024
Feb 19, 2026
Merged

Revert "defer changes for zero argument functions until style_edition=2027"#6595
ytmimi merged 1 commit intorust-lang:mainfrom
ytmimi:revert-zero-argument-func-wrapping-2024

Conversation

@ytmimi
Copy link
Contributor

@ytmimi ytmimi commented Jul 2, 2025

This effectively reverts commit a7e0c15 from PR #6362

This change made it into the 2024 style-edition so we can't defer it to 2027.

r? @calebcartwright

@calebcartwright
Copy link
Member

I think this is the one my brain glitched on last month. To clarify, are you saying rustfmt (the released, rustfmt available on the toolchains) currently is incorrectly formatting these according to a style change that was punted to 2027 edition?

If so I want to make sure we account for that on the style side is well

@ytmimi
Copy link
Contributor Author

ytmimi commented Oct 8, 2025

@calebcartwright based on your comment #5577 (comment) I know there was interest from t-style to not mess with how we format zero argument functions. Unfortunately the zero argument function changes described in #5577 (comment) were included in Rust 2024.

Here's the rough timeline

Because we haven't done a sync since 2024-09-20 we need to revert the zero argument function changes we made in #6362 before we can sync back with r-l/rustfmt.

@calebcartwright
Copy link
Member

I appreciate the timeline. I believe this was all happening when I was out sick and without a computer for an extended period of time.

For future reference, in cases like that where expediency is required we should absolutely make the changes in-tree in r-l/rust and not couple ourselves to the sync, just like we do for critical bug fixes.

Our sync process is too slow and clunky (details here) to be able to always make changes in r-l/rustfmt

Need to make style team aware and probably update the style guide for 2024 to ensure it reflects the actual behavior in that edition

…=2027"

This effectively reverts commit
a7e0c15.

This change made it into the 2024 style edition so we can't defer it to
2027.
@ytmimi ytmimi force-pushed the revert-zero-argument-func-wrapping-2024 branch from 9db6838 to e4d7e6b Compare February 19, 2026 02:47
@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.

@ytmimi ytmimi merged commit d21c8f3 into rust-lang:main Feb 19, 2026
26 checks passed
@rustbot rustbot added the release-notes Needs an associated changelog entry label Feb 19, 2026
@ytmimi ytmimi deleted the revert-zero-argument-func-wrapping-2024 branch February 19, 2026 03:12
@ytmimi
Copy link
Contributor Author

ytmimi commented Feb 19, 2026

We needed to get this merged to prevent any breaking formatting changes for style_edition=2024 when syncing back up with r-l/rust

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-2024-style-edition Area: style edition 2024 release-notes Needs an associated changelog entry

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants