Skip to content
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

style(edition): migrate the codebase to the 2024 Style Edition #4190

Merged
merged 2 commits into from
Feb 21, 2025

Conversation

rami3l
Copy link
Member

@rami3l rami3l commented Feb 20, 2025

This PR is the first part of rustup's migration to Rust 2024, which contains style-related changes only. Notably, macro invocations are now correctly formatted by rustfmt.

A second PR will follow shortly once this one gets merged, which will perform a semi-auto migration based on #4061's plan:

[workspace.lints.rust]
rust_2018_idioms = { level = "deny", priority = -1 }
rust-2024-compatibility = { level = "warn", priority = -2 }

PS: The newly-added rustfmt config is here for migration purposes. It should be deleted by the end of the second PR.

PPS: The CI should pass once the 2024 Edition lands in stable in a few hours.

@rami3l rami3l changed the title chore(edition): migrate to Rust 2024 style(edition): migrate codebase to the 2024 Style Edition Feb 20, 2025
@rami3l rami3l force-pushed the chore/edition branch 2 times, most recently from f0e39df to a4a0fb7 Compare February 20, 2025 15:31
@rami3l rami3l marked this pull request as ready for review February 20, 2025 15:39
@rami3l rami3l requested review from djc and ChrisDenton and removed request for djc February 20, 2025 15:40
@rami3l rami3l changed the title style(edition): migrate codebase to the 2024 Style Edition style(edition): migrate the codebase to the 2024 Style Edition Feb 20, 2025
Copy link
Member

@ChrisDenton ChrisDenton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems fine. Though did something about maximum line length change? In any case using the new style seems like a good idea.

@rami3l
Copy link
Member Author

rami3l commented Feb 20, 2025

@ChrisDenton I believe what's really happening is that rustfmt is now trying its best to make macro invocations behave like function invocations, and there used to be many macro invocation lines that are too wide but got ignored.

@rami3l rami3l added this pull request to the merge queue Feb 20, 2025
@ChrisDenton
Copy link
Member

Ah that makes sense.

Merged via the queue into rust-lang:master with commit 39526f9 Feb 21, 2025
29 checks passed
@rami3l rami3l deleted the chore/edition branch February 21, 2025 00:01
@rami3l rami3l added this to the 1.28.0 milestone Feb 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants