Skip to content

Conversation

hvitved
Copy link
Contributor

@hvitved hvitved commented Aug 26, 2025

#20179 follow-up.

DCA looks OK.

@github-actions github-actions bot added the Rust Pull requests that update Rust code label Aug 26, 2025
@hvitved hvitved force-pushed the rust/type-inference-more-certain-types branch from 4358177 to 6453b71 Compare August 26, 2025 12:45
@hvitved hvitved added the no-change-note-required This PR does not need a change note label Aug 27, 2025
@hvitved hvitved marked this pull request as ready for review August 27, 2025 07:55
@hvitved hvitved requested a review from a team as a code owner August 27, 2025 07:55
@hvitved hvitved requested review from Copilot and paldepind and removed request for a team August 27, 2025 07:55
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 refactors type inference logic by moving several type inference methods from the general inference module to the more precise "certain type inference" module. This change improves the accuracy of type inference by handling cases where the type can be determined with certainty.

  • Move reference, tuple, async block, array, and cast type inference from general to certain type inference
  • Remove duplicate inference rules that were already present in both modules
  • Update expected test results to reflect improved precision

Reviewed Changes

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

File Description
rust/ql/lib/codeql/rust/internal/TypeInference.qll Moves type inference methods to CertainTypeInference module and removes duplicates from general inference
rust/ql/test/library-tests/type-inference/type-inference.expected Updates expected test results reflecting improved type inference precision

Copy link
Contributor

@paldepind paldepind left a comment

Choose a reason for hiding this comment

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

Looks good :)

@hvitved hvitved merged commit f232335 into github:main Aug 27, 2025
21 checks passed
@hvitved hvitved deleted the rust/type-inference-more-certain-types branch August 27, 2025 09:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-change-note-required This PR does not need a change note Rust Pull requests that update Rust code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants