Skip to content

Conversation

@paldepind
Copy link
Contributor

Adds some additional path resolution tests for paths that involve Self. These all work but we don't have any tests covering these cases.

@github-actions github-actions bot added the Rust Pull requests that update Rust code label Jan 23, 2026
@paldepind paldepind added the no-change-note-required This PR does not need a change note label Jan 23, 2026
@paldepind paldepind marked this pull request as ready for review January 23, 2026 08:30
@paldepind paldepind requested a review from a team as a code owner January 23, 2026 08:30
Copilot AI review requested due to automatic review settings January 23, 2026 08:30
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 adds test coverage for path resolution involving Self constructors in Rust. The tests verify that Self correctly resolves to the appropriate type (tuple structs, regular structs, and enum variants) in various contexts.

Changes:

  • Added new test module self_constructors with tests for Self constructor resolution in tuple structs, regular structs, and enums
  • Updated expected test outputs to account for the new tests and line number shifts

Reviewed changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated 1 comment.

File Description
rust/ql/test/library-tests/type-inference/main.rs Added a small test for Self constructor in a tuple struct implementing the Default trait
rust/ql/test/library-tests/type-inference/CONSISTENCY/PathResolutionConsistency.expected Updated line numbers due to code additions (shifted by 11 lines)
rust/ql/test/library-tests/path-resolution/main.rs Added comprehensive self_constructors module testing Self resolution in tuple structs, regular structs, and enum patterns
rust/ql/test/library-tests/path-resolution/path-resolution.expected Added expected path resolution entries for the new test cases, including line number updates for existing tests

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@paldepind paldepind merged commit 7bdf2ab into github:main Jan 23, 2026
15 checks passed
@paldepind paldepind deleted the rust/self-tests branch January 23, 2026 10:28
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