Skip to content

Conversation

@hvitved
Copy link
Contributor

@hvitved hvitved commented Feb 3, 2026

No description provided.

@github-actions github-actions bot added the Rust Pull requests that update Rust code label Feb 3, 2026
@hvitved hvitved added the no-change-note-required This PR does not need a change note label Feb 3, 2026
@hvitved hvitved marked this pull request as ready for review February 3, 2026 13:40
@hvitved hvitved requested a review from a team as a code owner February 3, 2026 13:40
@hvitved hvitved requested review from Copilot and paldepind February 3, 2026 13:40
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 pull request updates the path resolution tests to properly account for disambiguation when resolving function call paths in Rust. The changes use CallExpr.getResolvedTarget() instead of resolvePath() for paths that are function expressions in call sites, which provides more accurate resolution when multiple implementations are available.

Changes:

  • Modified the path resolution query and test utility to use getResolvedTarget() for call expression function paths
  • Updated test expectations to reflect the new, more accurate path resolutions
  • Updated test input comments to document expected vs. spurious resolutions

Reviewed changes

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

File Description
rust/ql/test/library-tests/path-resolution/path-resolution.ql Added logic to distinguish call expression paths and use getResolvedTarget() for disambiguation
rust/ql/lib/utils/test/PathResolutionInlineExpectationsTest.qll Applied the same disambiguation logic to the inline expectations test
rust/ql/test/library-tests/path-resolution/path-resolution.expected Updated expected test results to reflect the new resolution behavior
rust/ql/test/library-tests/path-resolution/main.rs Updated test comments to reflect which resolutions are now found vs. missing

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.

1 participant