Skip to content

Commit 85b2fce

Browse files
committed
Rust: Undo another change to the consistency check queries.
1 parent 00d2976 commit 85b2fce

3 files changed

Lines changed: 5 additions & 3 deletions

File tree

rust/ql/lib/codeql/rust/internal/PathResolutionConsistency.qll

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@ private import PathResolution
88
/** Holds if `p` may resolve to multiple items including `i`. */
99
query predicate multiplePathResolutions(Path p, ItemNode i) {
1010
p.fromSource() and
11-
not p.(AstNode).isInMacroExpansion() and
12-
// exclude paths inside attributes (e.g. `#[tokio::main]`)
13-
not p.getParentNode*() instanceof Attr and
1411
i = resolvePath(p) and
1512
// `panic` is defined in both `std` and `core`; both are included in the prelude
1613
not p.getText() = "panic" and
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
multipleResolvedTargets
22
| test.rs:23:26:23:66 | ... .text() |
33
| test.rs:26:26:26:67 | ... .bytes() |
4+
multiplePathResolutions
5+
| test.rs:517:3:517:13 | ...::main |
6+
| test.rs:563:5:563:6 | ...::runtime |
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
multiplePathResolutions
2+
| request_forgery_tests.rs:60:7:60:17 | ...::main |
3+
| request_forgery_tests.rs:64:9:64:11 | ...::runtime |
24
| request_forgery_tests.rs:79:5:79:18 | ...::runtime |

0 commit comments

Comments
 (0)