Skip to content

Commit d50d6c7

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

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
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: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -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
@@ -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)