We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
resolvePath
1 parent 16fd6f8 commit 53999b5Copy full SHA for 53999b5
rust/ql/lib/codeql/rust/internal/PathResolution.qll
@@ -831,7 +831,8 @@ ItemNode resolvePath(RelevantPath path) {
831
exists(Namespace ns | result = resolvePath0(path, ns) |
832
pathUsesNamespace(path, ns)
833
or
834
- not pathUsesNamespace(path, _)
+ not pathUsesNamespace(path, _) and
835
+ not path = any(MacroCall mc).getPath()
836
)
837
}
838
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