Merged
Conversation
| 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
| // 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
59bd9ba to
ac6b481
Compare
ac6b481 to
12a6dcc
Compare
Contributor
There was a problem hiding this comment.
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(), andgetNumberOfArgs() - Removes the
overridekeyword fromMethodCall.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.
paldepind
approved these changes
Dec 5, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#20863 follow-up.