Skip to content

Commit c648aa6

Browse files
committed
Rust: Rename predicates
1 parent b189f1f commit c648aa6

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2024,7 +2024,7 @@ private module NonMethodResolution {
20242024
ImplItemNode impl, NonMethodFunction implFunction
20252025
) {
20262026
exists(TypePath path |
2027-
type = assocFunctionTypeAt(implFunction, impl, pos, path) and
2027+
type = getAssocFunctionTypeAt(implFunction, impl, pos, path) and
20282028
implFunction.implements(traitFunction) and
20292029
FunctionOverloading::traitTypeParameterOccurrence(trait, traitFunction, _, pos, path, _)
20302030
|

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ predicate traitTypeParameterOccurrence(
7979
TypeParameter tp
8080
) {
8181
f = trait.getASuccessor(functionName) and
82-
tp = assocFunctionTypeAt(f, trait, pos, path) and
82+
tp = getAssocFunctionTypeAt(f, trait, pos, path) and
8383
tp = trait.(TraitTypeAbstraction).getATypeParameter()
8484
}
8585

@@ -120,7 +120,7 @@ predicate functionResolutionDependsOnArgument(
120120
exists(TraitItemNode trait, string functionName |
121121
implHasSibling(impl, trait) and
122122
traitTypeParameterOccurrence(trait, _, functionName, pos, path, _) and
123-
type = assocFunctionTypeAt(f, impl, pos, path) and
123+
type = getAssocFunctionTypeAt(f, impl, pos, path) and
124124
f = impl.getASuccessor(functionName) and
125125
pos.isPosition()
126126
)

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ private newtype TAssocFunctionType =
7878
}
7979

8080
bindingset[condition, constraint, tp]
81-
private Type traitConstraintTypeAt(
81+
private Type getTraitConstraintTypeAt(
8282
TypeMention condition, TypeMention constraint, TypeParameter tp, TypePath path
8383
) {
8484
BaseTypes::conditionSatisfiesConstraintTypeAt(_, condition, constraint,
@@ -90,7 +90,7 @@ private Type traitConstraintTypeAt(
9090
* `pos` at path `path`
9191
*/
9292
pragma[nomagic]
93-
Type assocFunctionTypeAt(Function f, ImplOrTraitItemNode i, FunctionPosition pos, TypePath path) {
93+
Type getAssocFunctionTypeAt(Function f, ImplOrTraitItemNode i, FunctionPosition pos, TypePath path) {
9494
exists(MkAssocFunctionType(f, i, pos)) and
9595
(
9696
// No specialization needed when the function is directly in the trait or
@@ -109,7 +109,7 @@ Type assocFunctionTypeAt(Function f, ImplOrTraitItemNode i, FunctionPosition pos
109109
exists(TraitItemNode trait, TypeMention condition, TypeMention constraint |
110110
trait.getAnAssocItem() = f and
111111
BaseTypes::rootTypesSatisfaction(_, TTrait(trait), _, condition, constraint) and
112-
result = traitConstraintTypeAt(condition, constraint, tp, suffix)
112+
result = getTraitConstraintTypeAt(condition, constraint, tp, suffix)
113113
|
114114
condition = i.(Trait) or condition = i.(Impl).getSelfTy()
115115
)
@@ -173,7 +173,7 @@ class AssocFunctionType extends MkAssocFunctionType {
173173
Type getTypeAt(TypePath path) {
174174
exists(Function f, FunctionPosition pos, ImplOrTraitItemNode i, Type t |
175175
this.appliesTo(f, i, pos) and
176-
t = assocFunctionTypeAt(f, i, pos, path)
176+
t = getAssocFunctionTypeAt(f, i, pos, path)
177177
|
178178
not t instanceof SelfTypeParameter and
179179
result = t

0 commit comments

Comments
 (0)