Skip to content

Conversation

@hvitved
Copy link
Contributor

@hvitved hvitved commented Dec 4, 2025

#20863 follow-up.

@github-actions github-actions bot added the Rust Pull requests that update Rust code label Dec 4, 2025
private import internal.MethodCallExprImpl
import codeql.rust.elements.CallExprBase
import codeql.rust.elements.ArgList
import codeql.rust.elements.Attr

Check warning

Code scanning / CodeQL

Redundant import Warning

Redundant import, the module is already imported inside
codeql.rust.elements.ArgList
.
// extract the algorithm name from the type of `ce` or its receiver.
exists(Type t, TypePath tp |
t = inferType([ce, ce.(MethodCallExpr).getReceiver()], tp) and
t = inferType([call, call.(MethodCall).getReceiver()], tp) and

Check warning

Code scanning / CodeQL

Omittable 'exists' variable Warning

This exists variable can be omitted by using a don't-care expression
in this argument
.
@hvitved hvitved force-pushed the rust/call-refactor-follow-up branch from 59bd9ba to ac6b481 Compare December 4, 2025 16:10
@hvitved hvitved force-pushed the rust/call-refactor-follow-up branch from ac6b481 to 12a6dcc Compare December 5, 2025 11:50
@hvitved hvitved added the no-change-note-required This PR does not need a change note label Dec 5, 2025
@hvitved hvitved marked this pull request as ready for review December 5, 2025 12:29
@hvitved hvitved requested a review from a team as a code owner December 5, 2025 12:29
Copilot AI review requested due to automatic review settings December 5, 2025 12:29
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 removes deprecated predicates from Rust QL library files that were marked with todo comments indicating they should be removed once an internal query was updated.

  • Removes four deprecated predicates: getReceiver(), getMethodName(), getArg(), and getNumberOfArgs()
  • Removes the override keyword from MethodCall.getReceiver() as it no longer overrides a parent predicate

Reviewed changes

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

File Description
rust/ql/lib/codeql/rust/elements/internal/CallImpl.qll Removes deprecated getReceiver() and getMethodName() predicates from the Call class, and removes override keyword from MethodCall.getReceiver()
rust/ql/lib/codeql/rust/elements/internal/CallExprImpl.qll Removes deprecated getArg() and getNumberOfArgs() predicates from the CallExpr class

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

@hvitved hvitved merged commit 9a95aca into github:main Dec 5, 2025
27 checks passed
@hvitved hvitved deleted the rust/call-refactor-follow-up branch December 5, 2025 13:38
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