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

bump to Rust edition 2024 & min = 1.85 #7423

Open
wants to merge 18 commits into
base: main
Choose a base branch
from

Conversation

sylvestre
Copy link
Contributor

No description provided.

@sylvestre sylvestre force-pushed the rust-2024 branch 3 times, most recently from 85602c7 to 7f43030 Compare March 8, 2025 14:33
@sylvestre sylvestre force-pushed the rust-2024 branch 6 times, most recently from adb6ea4 to 5125911 Compare March 8, 2025 15:33
@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)

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.

1 participant