Skip to content

Commit 38aacb0

Browse files
committed
Rust: Add debug predicate for type mentions
1 parent 1425bb8 commit 38aacb0

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1594,6 +1594,11 @@ private module Debug {
15941594
result = resolveMethodCallTarget(mce)
15951595
}
15961596

1597+
predicate debugTypeMention(TypeMention tm, TypePath path, Type type) {
1598+
tm = getRelevantLocatable() and
1599+
tm.resolveTypeAt(path) = type
1600+
}
1601+
15971602
pragma[nomagic]
15981603
private int countTypes(AstNode n, TypePath path, Type t) {
15991604
t = inferType(n, path) and

0 commit comments

Comments
 (0)