Skip to content

Upgrade project to Rust 2024 edition - #4

Merged
jac3km4 merged 5 commits into
masterfrom
upgrade-to-rust-2024-3859093713268396088
Apr 30, 2026
Merged

Upgrade project to Rust 2024 edition#4
jac3km4 merged 5 commits into
masterfrom
upgrade-to-rust-2024-3859093713268396088

Conversation

@jac3km4

@jac3km4 jac3km4 commented Apr 30, 2026

Copy link
Copy Markdown
Owner

Upgrades the workspace to Rust 2024 and resolves compilation issues due to stabilized or changing nightly features.


PR created automatically by Jules for task 3859093713268396088 started by @jac3km4

- Set `edition = "2024"` in `Cargo.toml` files for all workspace members.
- Added `resolver = "3"` in the root `Cargo.toml`.
- Replaced the stabilized `slice_group_by` nightly feature with the standard `chunk_by` method.
- Replaced the `assert_matches` nightly feature with the `assert_matches` external crate to fix API changes.

Co-authored-by: jac3km4 <11986158+jac3km4@users.noreply.github.com>
@google-labs-jules

Copy link
Copy Markdown
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

google-labs-jules Bot and others added 4 commits April 30, 2026 18:27
- Added `.github/workflows/ci.yml` based on the requested template.
- Adjusted the CI workflow to install `clang` and `libclang-dev` required by `clang-sys`.
- Used `nightly` toolchain for all CI jobs since the project requires unstable Rust features (e.g., `#![feature(iter_advance_by)]`).

Co-authored-by: jac3km4 <11986158+jac3km4@users.noreply.github.com>
- Updated `.github/workflows/ci.yml` to specify `--default` in the `rustup toolchain install nightly` steps to ensure `cargo test` and `cargo clippy` use the nightly compiler, fixing `#![feature]` errors.
- Formatted `saltwater/src/main.rs` and `saltwater/src/resolver.rs` by running `cargo +nightly fmt --all` to fix formatting failures in CI.

Co-authored-by: jac3km4 <11986158+jac3km4@users.noreply.github.com>
- Removed the invalid `--default` flag from the `rustup toolchain install` commands in `.github/workflows/ci.yml`.
- Replaced `cargo test`, `cargo clippy`, and `cargo fmt` with `cargo +nightly test`, `cargo +nightly clippy`, and `cargo +nightly fmt` in CI, to ensure the nightly compiler is used and `#![feature]` errors do not occur.

Co-authored-by: jac3km4 <11986158+jac3km4@users.noreply.github.com>
- Fixed `clippy::unnecessary-cast` by removing `as i64` from `spec.offset.unwrap_or(0)` in `core/src/symbols.rs`.
- Fixed `clippy::useless-conversion` by removing `.into_iter()` call in `core/src/spec.rs`.
- Fixed `clippy::suspicious-double-ref-op` by replacing `str.deref().to_owned()` with `(*str).to_owned()` in `core/src/spec.rs`.
- Fixed `clippy::map-entry` by replacing `.contains_key()` check followed by `.insert()` with `.entry().or_insert_with()` in `saltwater/src/resolver.rs`.
- Bypassed `clippy::collapsible-if` in `clang/src/main.rs` and `saltwater/src/main.rs` with `#[allow(clippy::collapsible_if)]` to avoid introducing the unstable `let_chains` feature, which previously caused compilation failures.

Co-authored-by: jac3km4 <11986158+jac3km4@users.noreply.github.com>
@jac3km4
jac3km4 merged commit 3b9cdbe into master Apr 30, 2026
3 checks passed
@jac3km4
jac3km4 deleted the upgrade-to-rust-2024-3859093713268396088 branch April 30, 2026 19:42
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