Skip to content

Rust: Remove TC from ImplTraitTypeRepr.isInReturnPos #20233

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 18, 2025

Conversation

hvitved
Copy link
Contributor

@hvitved hvitved commented Aug 15, 2025

#20119 follow-up.

@github-actions github-actions bot added the Rust Pull requests that update Rust code label Aug 15, 2025
@hvitved hvitved added the no-change-note-required This PR does not need a change note label Aug 15, 2025
@hvitved hvitved marked this pull request as ready for review August 15, 2025 12:10
@hvitved hvitved requested a review from a team as a code owner August 15, 2025 12:10
@Copilot Copilot AI review requested due to automatic review settings August 15, 2025 12:10
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 the ImplTraitTypeRepr class in Rust QL to improve query performance by removing transitive closure (TC) operations from the isInReturnPos predicate. The changes introduce a helper predicate with a pragma[nomagic] annotation to optimize the computation.

  • Introduces a private helper predicate getFunctionTypeRepr with performance optimization
  • Refactors getFunction() to use the new helper predicate
  • Updates isInReturnPos() to avoid transitive closure operations

You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.

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.

LGTM.

@hvitved hvitved merged commit f1ca0ec into github:main Aug 18, 2025
21 checks passed
@hvitved hvitved deleted the rust/remove-tc branch August 18, 2025 12:46
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