Skip to content

Commit 373a0a4

Browse files
committed
Rust: Add debug predicate for type mentions
1 parent 8e4ad58 commit 373a0a4

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
@@ -1468,6 +1468,11 @@ private module Debug {
14681468
result = resolveMethodCallTarget(mce)
14691469
}
14701470

1471+
predicate debugTypeMention(TypeMention tm, TypePath path, Type type) {
1472+
tm = getRelevantLocatable() and
1473+
tm.resolveTypeAt(path) = type
1474+
}
1475+
14711476
pragma[nomagic]
14721477
private int countTypes(AstNode n, TypePath path, Type t) {
14731478
t = inferType(n, path) and

0 commit comments

Comments
 (0)