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