Skip to content

Migrate Rewatch to Rust 2024 edition #7602

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

mediremi
Copy link
Contributor

@mediremi mediremi commented Jul 4, 2025

With Rust 1.85.0, the Rust 2024 edition has been stabilised.

The changelog for that edition can be found here: https://blog.rust-lang.org/2025/02/20/Rust-1.85.0/#rust-2024

I followed the official Rust guide on migrating to a new edition, which gives the following steps:

  1. Run cargo update to update your dependencies to the latest versions (commit 77dcfab)
  2. Run cargo fix --edition (commit e299009)
  3. Edit Cargo.toml and set the edition field to the next edition (commit e299009)
  4. Run cargo build and cargo test
  5. Run cargo fmt (commit a423aad)

break;
} else if !line.is_empty() {
deps.insert(line);
match helpers::read_lines(&ast_file) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

cargo fix made this change due to how drop order changed in Rust 2024.

See https://doc.rust-lang.org/nightly/edition-guide/rust-2024/temporary-tail-expr-scope.html#details

@mediremi mediremi marked this pull request as ready for review July 4, 2025 19:01
Copy link

pkg-pr-new bot commented Jul 4, 2025

Open in StackBlitz

rescript

npm i https://pkg.pr.new/rescript-lang/rescript@7602

@rescript/darwin-arm64

npm i https://pkg.pr.new/rescript-lang/rescript/@rescript/darwin-arm64@7602

@rescript/darwin-x64

npm i https://pkg.pr.new/rescript-lang/rescript/@rescript/darwin-x64@7602

@rescript/linux-arm64

npm i https://pkg.pr.new/rescript-lang/rescript/@rescript/linux-arm64@7602

@rescript/linux-x64

npm i https://pkg.pr.new/rescript-lang/rescript/@rescript/linux-x64@7602

@rescript/win32-x64

npm i https://pkg.pr.new/rescript-lang/rescript/@rescript/win32-x64@7602

commit: e6c8c8b

@cknitt cknitt requested a review from jfrolich July 4, 2025 19:07
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant