Skip to content

Rust: Remove restriction in PathTypeMention #20173

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

Merged
merged 1 commit into from
Aug 6, 2025

Conversation

hvitved
Copy link
Contributor

@hvitved hvitved commented Aug 5, 2025

Addresses #20094 (comment).

DCA looks fine.

@github-actions github-actions bot added the Rust Pull requests that update Rust code label Aug 5, 2025
@hvitved hvitved added the no-change-note-required This PR does not need a change note label Aug 6, 2025
@hvitved hvitved marked this pull request as ready for review August 6, 2025 06:17
@hvitved hvitved requested a review from a team as a code owner August 6, 2025 06:17
@hvitved hvitved requested review from Copilot and geoffw0 August 6, 2025 06:17
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 removes a restriction in the PathTypeMention class by eliminating the relevantPathTypeMention predicate that limited which paths could be considered as type mentions during type inference. The change broadens the scope of paths that can be analyzed as type mentions.

Key changes:

  • Removed the relevantPathTypeMention predicate and its associated filtering logic
  • Simplified the PathTypeMention class to extend directly from TypeMention and Path
  • Added visibility modifiers to improve encapsulation

Reviewed Changes

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

File Description
TypeMention.qll Removed restriction predicate and simplified PathTypeMention class definition, added pragma and visibility modifiers
Type.qll Changed implTraitTypeParam predicate from public to private visibility

Copy link
Contributor

@geoffw0 geoffw0 left a comment

Choose a reason for hiding this comment

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

Agreed, DCA looks fine so this seems like a good simplification.

@hvitved hvitved merged commit 1f15fc8 into github:main Aug 6, 2025
21 checks passed
@hvitved hvitved deleted the rust/type-mention-remove-restriction branch August 6, 2025 08:13
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