Skip to content

Comments

Update to Rust 2025#11724

Closed
konstin wants to merge 3 commits intomainfrom
konsti/rust-2025
Closed

Update to Rust 2025#11724
konstin wants to merge 3 commits intomainfrom
konsti/rust-2025

Conversation

@konstin
Copy link
Member

@konstin konstin commented Feb 23, 2025

Update to Rust 2025, replace one |...| async with async |...| (other interesting closures are tracing-instrumented) and all |...| async move with async |...|.

The changes are generally cargo fix, cargo fmt and occasional manual editing where cargo fix failed, such as removing the ref muts and refs for values that are already references, which is forbidden in the 2025 edition.

@konstin konstin added the internal A refactor or improvement that is not user-facing label Feb 23, 2025
@charliermarsh
Copy link
Member

Do conda-forge and Homebrew support this yet?

@konstin
Copy link
Member Author

konstin commented Feb 25, 2025

@samypr100
Copy link
Collaborator

samypr100 commented Mar 2, 2025

Seems like conda-forge is now at 1.85

@charliermarsh
Copy link
Member

We're planning to setup an official MSRV policy. The current plan is to use N-2 (so, we always use 2-versions earlier than the latest stable) as our MSRV. I need to update our versioning documentation to reflect it though.

@charliermarsh
Copy link
Member

See: #11898

@konstin
Copy link
Member Author

konstin commented Mar 3, 2025

Closing this (too many merge conflicts) in favor of recreating it when 1.87 ships and 1.85 with the initial edition 2025 support is N-2.

@konstin konstin closed this Mar 3, 2025
konstin added a commit that referenced this pull request Mar 3, 2025
Three edition 2021 compatible sets of changes in preparation for the edition 2025 split out from #11724.

In edition 2025, `gen` is a keyword, so we escape it as `r#gen`. `ref` and `ref mut` are not allowed anymore for `&T` and `&mut T`, so we remove them. `cargo fmt` now formats inside of macros, which the 2021 formatter doesn't undo.
konstin added a commit that referenced this pull request Mar 3, 2025
Three edition 2021 compatible sets of changes in preparation for the
edition 2025 split out from #11724.

In edition 2025, `gen` is a keyword, so we escape it as `r#gen`. `ref`
and `ref mut` are not allowed anymore for `&T` and `&mut T`, so we
remove them. `cargo fmt` now formats inside of macros, which the 2021
formatter doesn't undo.
@konstin konstin mentioned this pull request May 15, 2025
charliermarsh added a commit that referenced this pull request May 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

internal A refactor or improvement that is not user-facing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants