Skip to content

Rust: Update Rust toolchain to 1.98 and fix clippy warnings - #22663

Merged
paldepind merged 11 commits into
mainfrom
rust/update-toolchain-1.98
Sep 24, 2026
Merged

paldepind merged 11 commits into
mainfrom
rust/update-toolchain-1.98

Conversation

@paldepind

@paldepind paldepind commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

This updates the Rust toolchain that we use to 1.98.

1.98 added a new lint rule to Clippy, so I asked Copilot to fix lint errors. It sorta went nuts and linted all our Rust code. But the fixes are good (to my eyes), so I left them in.

@paldepind paldepind changed the title Rust/update toolchain 1.98 Rust: Update Rust toolchain to 1.98 and fix clippy warnings Sep 23, 2026
Update rules_rust to 0.74.0.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@paldepind
paldepind force-pushed the rust/update-toolchain-1.98 branch from d07ce95 to 35d5678 Compare September 23, 2026 13:06
Update dependencies to address issues that showed up in CI. Updating cc
specifically fixed a Rust 1.98 Windows compilation error.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: aaf47101-2cb9-4d38-9f6a-e492c4da4135
Fixes the clippy::unnecessary_unwrap lint error reported by Clippy 1.98.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: aaf47101-2cb9-4d38-9f6a-e492c4da4135
Fixes the clippy::items_after_test_module lint error reported by Clippy 1.98.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: aaf47101-2cb9-4d38-9f6a-e492c4da4135
Fixes the clippy::needless_late_init lint error reported by Clippy 1.98.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: aaf47101-2cb9-4d38-9f6a-e492c4da4135
Fixes the clippy::needless_borrows_for_generic_args lint error reported by Clippy 1.98.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: aaf47101-2cb9-4d38-9f6a-e492c4da4135
Fixes the clippy::needless_borrows_for_generic_args lint errors reported by Clippy 1.98.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: aaf47101-2cb9-4d38-9f6a-e492c4da4135
Fixes the clippy::needless_borrows_for_generic_args lint error reported by Clippy 1.98.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: aaf47101-2cb9-4d38-9f6a-e492c4da4135
Fixes the all-targets compilation error exposed while running Clippy with Rust 1.98.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: aaf47101-2cb9-4d38-9f6a-e492c4da4135
Fixes the mismatched_lifetime_syntaxes lint error reported by Rust 1.98.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: aaf47101-2cb9-4d38-9f6a-e492c4da4135
Fixes the clippy::unwrap_or_default lint error reported by Clippy 1.98.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: aaf47101-2cb9-4d38-9f6a-e492c4da4135
@paldepind
paldepind force-pushed the rust/update-toolchain-1.98 branch from b76c17f to b3a77e4 Compare September 24, 2026 05:53
@paldepind
paldepind marked this pull request as ready for review September 24, 2026 05:53
Copilot AI balanced review requested due to automatic review settings September 24, 2026 05:53
@paldepind
paldepind requested review from a team as code owners September 24, 2026 05:53

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

Regenerate Bazel dependency outputs and update all fixed Rust toolchain references to 1.98.

Get a fresh assessment by requesting another Copilot review.

Review effort: Balanced
Findings: 1 High severity

Open (1)
What changed in this PR

Updates Rust tooling to 1.98, refreshes related dependencies, and applies Clippy-driven cleanups.

Changes:

  • Bumps Rust and Bazel Rust tooling.
  • Refreshes QL Cargo dependencies.
  • Simplifies Rust code and updates Tree-sitter usage.
File Summary
unified/​extractor/​tests/​corpus_tests.rs Removes an unnecessary borrow.
shared/​yeast/​src/​dump.rs Relocates a helper before tests.
shared/​yeast-schema/​src/​node_types_yaml.rs Simplifies optional-field handling.
rust-toolchain.toml Updates Rust to 1.98, but fixed extractor and test toolchains remain on 1.97.
ruby/​extractor/​src/​extractor.rs Refactors initialization and lifetime syntax.
ql/​Cargo.lock Refreshes locked dependencies.
ql/​buramu/​tree-sitter-blame/​bindings/​rust/​build.rs Simplifies path arguments.
ql/​buramu/​src/​main.rs Applies Clippy simplifications.
python/​extractor/​tsg-python/​tsp/​bindings/​rust/​lib.rs Fixes language borrowing in a test; the rustdoc example also needs updating.
MODULE.bazel Updates Bazel Rust tooling, but required crate-universe outputs were not regenerated.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread MODULE.bazel
@paldepind

Copy link
Copy Markdown
Contributor Author

/retry

@tausbn tausbn left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good to me. 👍

@paldepind
paldepind merged commit 1b20d54 into main Sep 24, 2026
122 checks passed
@paldepind
paldepind deleted the rust/update-toolchain-1.98 branch September 24, 2026 12:32
@geoffw0

geoffw0 commented Sep 25, 2026

Copy link
Copy Markdown
Contributor

Quick note that this PR should have had a DCA run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants