Skip to content

Commit 5d2b819

Browse files
committed
Rust: Dont use constraint implementations for type parameters
1 parent 9aebc58 commit 5d2b819

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

shared/typeinference/codeql/typeinference/internal/TypeInference.qll

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -944,7 +944,8 @@ module Make1<LocationSig Location, InputSig1<Location> Input1> {
944944
not exists(countConstraintImplementations(type, constraint)) and
945945
conditionSatisfiesConstraintTypeAt(abs, sub, constraintMention, _, _) and
946946
resolveTypeMentionRoot(sub) = abs.getATypeParameter() and
947-
constraint = resolveTypeMentionRoot(constraintMention)
947+
constraint = resolveTypeMentionRoot(constraintMention) and
948+
none()
948949
or
949950
countConstraintImplementations(type, constraint) > 0 and
950951
rootTypesSatisfaction(type, constraint, abs, sub, constraintMention) and

0 commit comments

Comments
 (0)