Skip to content

Rust: extract declarations of builtin types #19421

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

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

Conversation

aibaars
Copy link
Contributor

@aibaars aibaars commented Apr 30, 2025

This pull request adds extraction of declarations of built-in types.

@github-actions github-actions bot added the Rust Pull requests that update Rust code label Apr 30, 2025
@aibaars aibaars force-pushed the aibaars/rust-builtin-types branch from 21aab9e to c4aa719 Compare April 30, 2025 11:26
@aibaars aibaars marked this pull request as ready for review April 30, 2025 11:40
@Copilot Copilot AI review requested due to automatic review settings April 30, 2025 11:40
@aibaars aibaars requested a review from a team as a code owner April 30, 2025 11:40
Copy link
Contributor

@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.

Pull Request Overview

This PR implements the extraction of built-in type declarations in Rust and updates related build configurations and the extractor.

  • Added a new file (types.rs) with declarations for built-in types.
  • Updated Bazel BUILD files to include the new builtins sources.
  • Extended the extractor to process the builtins directory during extraction.

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
rust/tools/builtins/types.rs Added declarations for built-in types.
rust/tools/builtins/BUILD.bazel Defined a Bazel target for built-ins sources.
rust/extractor/src/main.rs Enhanced extractor to include builtins in extraction.
rust/BUILD.bazel Updated tools file group to reference built-ins.

@@ -276,5 +277,13 @@ fn main() -> anyhow::Result<()> {
}
}
}
let builtins_dir = env::var("CODEQL_EXTRACTOR_RUST_ROOT")
Copy link
Preview

Copilot AI Apr 30, 2025

Choose a reason for hiding this comment

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

[nitpick] When iterating over the builtins directory, consider filtering for Rust source files (e.g., files ending with '.rs') to prevent the processing of unrelated files in case extra files are present.

Copilot uses AI. Check for mistakes.

@aibaars aibaars force-pushed the aibaars/rust-builtin-types branch 3 times, most recently from 8a02f98 to 050f949 Compare May 1, 2025 09:06
@aibaars aibaars force-pushed the aibaars/rust-builtin-types branch from 050f949 to 371e519 Compare May 1, 2025 09:18
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.

1 participant