-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Rust: Make SummarizedCallable extend Function instead of string
#19268
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1522,8 +1522,8 @@ private module Debug { | |
| private Locatable getRelevantLocatable() { | ||
| exists(string filepath, int startline, int startcolumn, int endline, int endcolumn | | ||
| result.getLocation().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) and | ||
| filepath.matches("%/test.rs") and | ||
| startline = 74 | ||
| filepath.matches("%/main.rs") and | ||
| startline = 52 | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It would be nice not to commit these changes. For instance, when looking at the history of a file it's easier if the commits that show up actually make meaningful changes.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good point, I'll avoid that going forward. |
||
| ) | ||
| } | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1170,6 +1170,7 @@ final class MethodCall extends Call { | |
| * Holds if a method for `type` with the name `name` and the arity `arity` | ||
| * exists in `impl`. | ||
| */ | ||
| pragma[nomagic] | ||
| private predicate methodCandidate(Type type, string name, int arity, Impl impl) { | ||
| type = impl.getSelfTy().(TypeMention).resolveType() and | ||
| exists(Function f | | ||
|
|
@@ -1579,8 +1580,8 @@ private module Debug { | |
| private Locatable getRelevantLocatable() { | ||
| exists(string filepath, int startline, int startcolumn, int endline, int endcolumn | | ||
Check warningCode scanning / CodeQL Omittable 'exists' variable Warning
This exists variable can be omitted by using a don't-care expression
in this argument Error loading related location Loading Check warningCode scanning / CodeQL Omittable 'exists' variable Warning
This exists variable can be omitted by using a don't-care expression
in this argument Error loading related location Loading Check warningCode scanning / CodeQL Omittable 'exists' variable Warning
This exists variable can be omitted by using a don't-care expression
in this argument Error loading related location Loading |
||
| result.getLocation().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn) and | ||
| filepath.matches("%/main.rs") and | ||
| startline = 1718 | ||
| filepath.matches("%/sqlx.rs") and | ||
| startline = [56 .. 60] | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Save as above. |
||
| ) | ||
| } | ||
|
|
||
|
|
||
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.
I guess this is a key change? We now use
getStaticTargettarget in both cases, whereas we previously usedgetACallin the later case, which used extractor provided canonical paths internally.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.
Absolutely correct.