Skip to content

Conversation

@hvitved
Copy link
Contributor

@hvitved hvitved commented Jan 6, 2026

Fixes the TODO in that predicate.

DCA is uneventful.

@github-actions github-actions bot added the Rust Pull requests that update Rust code label Jan 6, 2026
@hvitved hvitved added the no-change-note-required This PR does not need a change note label Jan 6, 2026
@hvitved hvitved marked this pull request as ready for review January 6, 2026 10:00
@hvitved hvitved requested a review from a team as a code owner January 6, 2026 10:00
@hvitved hvitved requested review from Copilot and paldepind January 6, 2026 10:00
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 PR improves the TuplePositionContent.getAnAccess predicate by properly limiting field accesses to actual tuple types, addressing a TODO comment. The change eliminates spurious data flow steps that were previously generated for tuple struct field accesses.

Key Changes:

  • Fixed the getAnAccess() implementation to properly filter by tuple types instead of matching any numeric field identifier
  • Updated comment to correctly reference TuplePositionContent instead of TupleContent

Reviewed changes

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

File Description
rust/ql/lib/codeql/rust/dataflow/internal/Content.qll Replaces overly broad field access matching with proper tuple type filtering; fixes comment typo
rust/ql/test/library-tests/dataflow/local/DataFlowStep.expected Removes spurious readStep entries with invalid file locations that were incorrectly generated
rust/ql/test/library-tests/dataflow/collections/inline-flow.expected Removes spurious edges, nodes, and subpaths entries with tuple.0 content that were incorrectly generated

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

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.

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.

Makes sense!

@hvitved hvitved merged commit 5359b3d into github:main Jan 6, 2026
27 checks passed
@hvitved hvitved deleted the rust/fix-todo branch January 6, 2026 12:16
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.

3 participants