Skip to content

Fix Rust Edition 2024 compatibility issues #512

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

Merged
merged 5 commits into from
Mar 30, 2025

Conversation

uklotzde
Copy link
Contributor

No description provided.

@uklotzde uklotzde force-pushed the edition-2024-compatibility branch from 510d2ac to 3a3a528 Compare March 29, 2025 22:30
@uklotzde
Copy link
Contributor Author

@Serial-ATA What about the failing Style check that seems to be unrelated?

@uklotzde uklotzde force-pushed the edition-2024-compatibility branch from 30e1175 to 6f5147d Compare March 29, 2025 22:54
@uklotzde uklotzde marked this pull request as draft March 29, 2025 23:01
@uklotzde uklotzde force-pushed the edition-2024-compatibility branch from f483046 to 6f5147d Compare March 29, 2025 23:02
@uklotzde uklotzde marked this pull request as ready for review March 29, 2025 23:03
@Serial-ATA
Copy link
Owner

@Serial-ATA What about the failing Style check that seems to be unrelated?

I was able to format it on my end. CI uses the latest stable, maybe yours is out of date if you don't see the same formatting?

Comment on lines +28 to +34
# Opt-in to new drop order of Edition 2024.
# TODO: Remove if no longer needed.
tail_expr_drop_order = "allow"
if_let_rescope = "allow"

# TODO: Remove after switching to Edition 2024.
edition_2024_expr_fragment_specifier = "allow"
Copy link
Owner

Choose a reason for hiding this comment

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

Are these still needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes. Only after switching to edition = "2024 both if_let_rescope and edition_2024_expr_fragment_specifier will probably become obsolete.

Copy link
Owner

Choose a reason for hiding this comment

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

You can bump to 2024 edition in this PR if you want. I don't think it's a breaking change.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Switching to Edition 2024 requires to reformat many source files.

I will prepare an intermediate step with some workspace cleanup as part of this PR. Switching editions should be done separately.

@uklotzde
Copy link
Contributor Author

@Serial-ATA What about the failing Style check that seems to be unrelated?

I was able to format it on my end. CI uses the latest stable, maybe yours is out of date if you don't see the same formatting?

I forgot to run cargo fmt manually.

I am used to pre-commit for running various checks. Code formatting is only one of them. Produces the same results locally and on CI. At least if the toolchains are in-sync.

@uklotzde uklotzde marked this pull request as draft March 30, 2025 03:04
@uklotzde uklotzde marked this pull request as ready for review March 30, 2025 03:18
@Serial-ATA
Copy link
Owner

Thanks!

@Serial-ATA Serial-ATA merged commit 756f543 into Serial-ATA:main Mar 30, 2025
4 checks passed
@Serial-ATA Serial-ATA added this to the 0.22.3 milestone Apr 4, 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