Skip to content

bump to Rust edition 2024 & min = 1.85 #7423

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 13 commits into from
Mar 25, 2025
Merged

Conversation

sylvestre
Copy link
Contributor

No description provided.

@sylvestre sylvestre force-pushed the rust-2024 branch 10 times, most recently from 5125911 to 6dfeff0 Compare March 8, 2025 15:40
@sylvestre sylvestre requested a review from Copilot March 8, 2025 15:47
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

PR Overview

This PR updates the Rust toolchain requirements by bumping the Rust edition to 2024 and the minimum supported Rust version to 1.85.0. It also makes minor import reordering and formatting adjustments across multiple project files to align with the new edition requirements.

  • Update Rust edition and minimum supported version in Cargo.toml files and related documentation.
  • Modify unsafe blocks in fuzz targets wrapping env::set_var, and reorder imports in various source files.
  • Update CI configuration to reflect the new minimum Rust version.

Reviewed Changes

File Description
Cargo.toml Bumped rust-version to "1.85.0" and edition to "2024".
src/uu/*/Cargo.toml Updated edition from "2021" to "2024" across multiple sub-crates.
fuzz/fuzz_targets/fuzz_expr.rs Wrapped env::set_var in an unnecessary unsafe block.
fuzz/Cargo.toml Updated edition from "2021" to "2024".
fuzz/fuzz_targets/fuzz_sort.rs Wrapped env::set_var in an unnecessary unsafe block.
fuzz/fuzz_targets/fuzz_printf.rs Wrapped env::set_var in an unnecessary unsafe block.
README.md Updated MSRV badge and text to reflect version "1.85.0".
.github/workflows/CICD.yml Updated RUST_MIN_SRV to "1.85.0".
src/uu/arch/src/arch.rs Reordered clap imports for consistency.
src/uu/cat/src/cat.rs Reordered module imports and simplified formatting.
src/uu/basename/src/basename.rs Reordered clap and std::path imports for consistency.
build.rs Minor formatting fix by adding a semicolon.
src/uu/base32/src/base_common.rs Reordered imports to maintain a consistent order.
src/uu/basenc/src/basenc.rs Reordered imports and updated the base_common usage for clarity.

Copilot reviewed 326 out of 326 changed files in this pull request and generated 3 comments.

@sylvestre
Copy link
Contributor Author

Android fails because rustc is 1.84:
https://packages-cf.termux.dev/apt/termux-main/pool/main/r/rustc-dev/

Copy link

github-actions bot commented Mar 8, 2025

GNU testsuite comparison:

Skip an intermittent issue tests/misc/stdbuf (fails in this run but passes in the 'main' branch)

@sylvestre
Copy link
Contributor Author

This is blocked on termux/termux-packages#23469

Copy link

GNU testsuite comparison:

Skip an intermittent issue tests/timeout/timeout (fails in this run but passes in the 'main' branch)
Skipping an intermittent issue tests/misc/stdbuf (passes in this run but fails in the 'main' branch)

@cakebaker
Copy link
Contributor

@sylvestre it looks like the blocking issue has been fixed in the meantime.

@sylvestre sylvestre force-pushed the rust-2024 branch 3 times, most recently from 357c547 to 31c8fd8 Compare March 24, 2025 20:27
Copy link

GNU testsuite comparison:

Skipping an intermittent issue tests/timeout/timeout (passes in this run but fails in the 'main' branch)

@sylvestre
Copy link
Contributor Author

@cakebaker it is green! :)

@cakebaker cakebaker merged commit f038d3e into uutils:main Mar 25, 2025
69 of 70 checks passed
@cakebaker
Copy link
Contributor

@sylvestre good job :)

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