Skip to content

Conversation

@redsun82
Copy link
Contributor

Also:

  • remove new warnings raised by the rust toolchain
  • run new formatting and linting
  • update the rust toolchain used by cargo

While we keep bazel builds using the same toolchain as internally (now a nightly one), I opted for using a stable toolchain for cargo. The nightly toolchain is only required internally for build reasons, we should keep not using any unstable rust features in our sources.

Finally, we aren't ready yet to update the rust toolchain used in rust language tests, so I've pulled that out in its own rust-toolchain file, keeping it at 1.86 for the time being.

Also:
* remove new warnings raised by the rust toolchain
* run new formatting and linting
* update the rust toolchain used by `cargo`

While we keep `bazel` builds using the same toolchain as internally
(now a nightly one), I opted for using a stable toolchain for `cargo`.
The nightly toolchain is only required internally for build reasons, we
should keep not using any unstable rust features in our sources.
@redsun82 redsun82 requested a review from a team as a code owner August 11, 2025 14:49
Copilot AI review requested due to automatic review settings August 11, 2025 14:49
@redsun82 redsun82 requested a review from a team as a code owner August 11, 2025 14:49
@github-actions github-actions bot added the Rust Pull requests that update Rust code label Aug 11, 2025
Copy link
Contributor

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.

Pull Request Overview

This PR aligns the Rust toolchain version with the internal repository by updating to a nightly toolchain for Bazel builds while using a stable toolchain for Cargo development. The changes include updating the Rust version from 1.86 to nightly/2025-08-01 for Bazel, creating a separate stable toolchain (1.88) for Cargo, and applying formatting and linting fixes required by the new toolchain.

Key changes:

  • Updated Rust toolchain from stable 1.86 to nightly 2025-08-01 for Bazel builds
  • Created separate toolchain configuration for Cargo using stable 1.88
  • Applied formatting improvements throughout Rust codebase

Reviewed Changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated no comments.

Show a summary per file
File Description
rust-toolchain.toml Updated to use stable Rust 1.88 for Cargo development
rust/rust-toolchain.toml Removed (consolidated into root toolchain file)
MODULE.bazel Updated to nightly Rust toolchain with new SHA256 hashes
.bazelrc Added nightly toolchain configuration and linker settings
shared/tree-sitter-extractor/src/generator/ql_gen.rs Applied lifetime annotations and formatting improvements
shared/tree-sitter-extractor/src/generator/mod.rs Applied formatting improvements
rust/extractor/src/trap.rs Updated string formatting to use inline syntax
rust/extractor/src/translate/base.rs Updated string formatting to use inline syntax
rust/extractor/src/rust_analyzer.rs Updated string formatting and added lifetime annotations
rust/ast-generator/src/main.rs Updated string formatting and error messages

navntoft
navntoft previously approved these changes Aug 12, 2025
@redsun82
Copy link
Contributor Author

@navntoft mind looking at this again? I hadn't noticed that a .gitignore rule was excluding a QL test rust-toolchain.toml that is required for Rust tests to succeed

@redsun82 redsun82 merged commit 2b92b83 into main Aug 12, 2025
54 checks passed
@redsun82 redsun82 deleted the redsun82/rust-toolchain branch August 12, 2025 09:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Rust Pull requests that update Rust code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants