Rust: Undo another change to the consistency check queries.

This commit is contained in:
Geoffrey White
2026-06-02 17:15:18 +01:00
parent 00d297693c
commit 85b2fcedf4
3 changed files with 5 additions and 3 deletions

View File

@@ -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

View File

@@ -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 |

View File

@@ -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 |