File tree Expand file tree Collapse file tree 2 files changed +7
-6
lines changed
rust/ql/lib/codeql/rust/internal Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -2615,8 +2615,8 @@ private Type inferMethodCallTypeSelf(
26152615 path = selfPath and
26162616 not result instanceof TypeParameter
26172617 or
2618- exists ( TypeParameter tp , TypePath pathToTypeParam , TypePath suffix |
2619- impl .targetTypeParameterAt ( tp , pathToTypeParam ) and
2618+ exists ( TypePath pathToTypeParam , TypePath suffix |
2619+ impl .targetHasTypeParameterAt ( pathToTypeParam ) and
26202620 path0 = pathToTypeParam .appendInverse ( suffix ) and
26212621 result = t0 and
26222622 path = selfPath .append ( suffix )
Original file line number Diff line number Diff line change @@ -20,12 +20,13 @@ class DerefImplItemNode extends ImplItemNode {
2020 Type resolveSelfTypeAt ( TypePath path ) { result = resolveImplSelfTypeAt ( this , path ) }
2121
2222 /**
23- * Holds if the target type of the dereference implemention mentions type
24- * parameter `tp` at `path`.
23+ * Holds if the target type of the dereference implemention mentions a type
24+ * parameter at `path`.
2525 */
2626 pragma [ nomagic]
27- predicate targetTypeParameterAt ( TypeParameter tp , TypePath path ) {
28- tp = this .getAssocItem ( "Target" ) .( TypeAlias ) .getTypeRepr ( ) .( TypeMention ) .resolveTypeAt ( path )
27+ predicate targetHasTypeParameterAt ( TypePath path ) {
28+ this .getAssocItem ( "Target" ) .( TypeAlias ) .getTypeRepr ( ) .( TypeMention ) .resolveTypeAt ( path )
29+ instanceof TypeParameter
2930 }
3031
3132 /** Gets the first type parameter of the type being implemented, if any. */
You can’t perform that action at this time.
0 commit comments