Skip to content

Commit 931f28a

Browse files
committed
wip
1 parent f8ec5cc commit 931f28a

File tree

4 files changed

+113
-166
lines changed

4 files changed

+113
-166
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ module SatisfiesBlanketConstraint<
134134
exists(ArgumentTypeAndBlanketOffset ato, Trait traitBound |
135135
ato = MkArgumentTypeAndBlanketOffset(at, _) and
136136
SatisfiesBlanketConstraintInput::relevantConstraint(ato, impl, traitBound) and
137-
SatisfiesBlanketConstraint::satisfiesConstraintType(ato, TTrait(traitBound), _, _)
137+
SatisfiesBlanketConstraint::satisfiesConstraint(ato, TTrait(traitBound), _, _)
138138
)
139139
or
140140
exists(TypeParam blanketTypeParam |

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2521,7 +2521,7 @@ private module AssocFunctionResolution {
25212521
) {
25222522
exists(CallDerefCand cdc, TypePath exprPath |
25232523
cdc = MkCallDerefCand(afc, selfPos, derefChain) and
2524-
CallSatisfiesDerefConstraint::satisfiesConstraintTypeThrough(cdc, impl, _, exprPath, result) and
2524+
CallSatisfiesDerefConstraint::satisfiesConstraintThrough(cdc, impl, _, exprPath, result) and
25252525
exprPath.isCons(getDerefTargetTypeParameter(), path)
25262526
)
25272527
}
@@ -3623,7 +3623,7 @@ private module AwaitSatisfiesType = SatisfiesType<AwaitTarget, AwaitSatisfiesTyp
36233623
pragma[nomagic]
36243624
private Type inferAwaitExprType(AstNode n, TypePath path) {
36253625
exists(TypePath exprPath |
3626-
AwaitSatisfiesType::satisfiesConstraintType(n.(AwaitExpr).getExpr(), _, exprPath, result) and
3626+
AwaitSatisfiesType::satisfiesConstraint(n.(AwaitExpr).getExpr(), _, exprPath, result) and
36273627
exprPath.isCons(getFutureOutputTypeParameter(), path)
36283628
)
36293629
}
@@ -3790,7 +3790,7 @@ private Type inferForLoopExprType(AstNode n, TypePath path) {
37903790
// type of iterable -> type of pattern (loop variable)
37913791
exists(ForExpr fe, TypePath exprPath, AssociatedTypeTypeParameter tp |
37923792
n = fe.getPat() and
3793-
ForIterableSatisfiesType::satisfiesConstraintType(fe.getIterable(), _, exprPath, result) and
3793+
ForIterableSatisfiesType::satisfiesConstraint(fe.getIterable(), _, exprPath, result) and
37943794
exprPath.isCons(tp, path)
37953795
|
37963796
tp = getIntoIteratorItemTypeParameter()

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -769,7 +769,7 @@ private Type getPathConcreteAssocTypeAt(Path path, TypePath typePath) {
769769
TypeAlias alias, TypePath path0
770770
|
771771
pathConcreteTypeAssocType(path, tm, trait, traitOrTmTrait, alias) and
772-
PathSatisfiesConstraint::satisfiesConstraintTypeThrough(tm, impl, traitOrTmTrait, path0, result) and
772+
PathSatisfiesConstraint::satisfiesConstraintThrough(tm, impl, traitOrTmTrait, path0, result) and
773773
path0.isCons(TAssociatedTypeTypeParameter(trait, alias), typePath)
774774
)
775775
}

0 commit comments

Comments
 (0)