mirror of
https://github.com/github/codeql.git
synced 2026-06-05 13:37:06 +02:00
Rust: Undo another change to the consistency check queries.
This commit is contained in:
@@ -8,9 +8,6 @@ private import PathResolution
|
||||
/** Holds if `p` may resolve to multiple items including `i`. */
|
||||
query predicate multiplePathResolutions(Path p, ItemNode i) {
|
||||
p.fromSource() and
|
||||
not p.(AstNode).isInMacroExpansion() and
|
||||
// exclude paths inside attributes (e.g. `#[tokio::main]`)
|
||||
not p.getParentNode*() instanceof Attr and
|
||||
i = resolvePath(p) and
|
||||
// `panic` is defined in both `std` and `core`; both are included in the prelude
|
||||
not p.getText() = "panic" and
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
multipleResolvedTargets
|
||||
| test.rs:23:26:23:66 | ... .text() |
|
||||
| test.rs:26:26:26:67 | ... .bytes() |
|
||||
multiplePathResolutions
|
||||
| test.rs:517:3:517:13 | ...::main |
|
||||
| test.rs:563:5:563:6 | ...::runtime |
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
multiplePathResolutions
|
||||
| request_forgery_tests.rs:60:7:60:17 | ...::main |
|
||||
| request_forgery_tests.rs:64:9:64:11 | ...::runtime |
|
||||
| request_forgery_tests.rs:79:5:79:18 | ...::runtime |
|
||||
|
||||
Reference in New Issue
Block a user