Skip to content

Commit 704c572

Browse files
committed
WIP
1 parent 44a958a commit 704c572

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

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

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4142,6 +4142,22 @@ private module Cached {
41424142
}
41434143
}
41444144

4145+
predicate getTpAssociatedTypeTypeMention(Function f, Path path, TypeParam tp, TypeAlias assoc) {
4146+
tp = f.(FunctionItemNode).getTypeParam(_) and
4147+
resolvePath(path.getQualifier()) = tp and
4148+
resolvePath(path) = assoc
4149+
}
4150+
4151+
predicate bingoBongo(TypeParam tp, TypeAlias assoc, Type type) {
4152+
exists(TypeBound tb |
4153+
tb = tp.getATypeBound() and
4154+
type =
4155+
tb.getTypeRepr()
4156+
.(TypeMention)
4157+
.getTypeAt(TypePath::singleton(TAssociatedTypeTypeParameter(_, assoc)))
4158+
)
4159+
}
4160+
41454161
import Cached
41464162

41474163
/**

0 commit comments

Comments
 (0)