mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
Merge pull request #19580 from hvitved/rust/path-resolution-prelude-in-core
Rust: Also include prelude path resolution in Core
This commit is contained in:
@@ -1413,7 +1413,7 @@ private predicate useImportEdge(Use use, string name, ItemNode item) {
|
||||
*/
|
||||
private predicate preludeEdge(SourceFile f, string name, ItemNode i) {
|
||||
exists(Crate core, ModuleLikeNode mod, ModuleItemNode prelude, ModuleItemNode rust |
|
||||
f = any(Crate c0 | core = c0.getDependency(_)).getASourceFile() and
|
||||
f = any(Crate c0 | core = c0.getDependency(_) or core = c0).getASourceFile() and
|
||||
core.getName() = "core" and
|
||||
mod = core.getSourceFile() and
|
||||
prelude = mod.getASuccessorRec("prelude") and
|
||||
@@ -1438,8 +1438,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("%/term.rs") and
|
||||
startline = [71]
|
||||
filepath.matches("%/test.rs") and
|
||||
startline = 74
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user