-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Rust: Remove some predicates #20963
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
Rust: Remove some predicates #20963
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
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
in this argument
59bd9ba to
ac6b481
Compare
ac6b481 to
12a6dcc
Compare
There was a problem hiding this 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(), 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.
#20863 follow-up.