We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
resolvePath
1 parent 7c2bafe commit 8044b0dCopy full SHA for 8044b0d
rust/ql/lib/codeql/rust/internal/PathResolution.qll
@@ -822,7 +822,8 @@ ItemNode resolvePath(RelevantPath path) {
822
exists(Namespace ns | result = resolvePath0(path, ns) |
823
pathUsesNamespace(path, ns)
824
or
825
- not pathUsesNamespace(path, _)
+ not pathUsesNamespace(path, _) and
826
+ not path = any(MacroCall mc).getPath()
827
)
828
}
829
rust/ql/lib/codeql/rust/internal/PathResolutionConsistency.qll
@@ -7,6 +7,7 @@ private import PathResolution
7
8
/** Holds if `p` may resolve to multiple items including `i`. */
9
query predicate multiplePathResolutions(Path p, ItemNode i) {
10
+ p.fromSource() and
11
i = resolvePath(p) and
12
// `use foo::bar` may use both a type `bar` and a value `bar`
13
not p =
0 commit comments