File tree Expand file tree Collapse file tree 2 files changed +5
-6
lines changed
rust/ql/lib/codeql/rust/internal/typeinference Expand file tree Collapse file tree 2 files changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -20,13 +20,12 @@ 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 a type
24- * parameter at `path`.
23+ * Holds if the target type of the dereference implementation mentions type
24+ * parameter `tp` at `path`.
2525 */
2626 pragma [ nomagic]
27- predicate targetHasTypeParameterAt ( TypePath path ) {
28- this .getAssocItem ( "Target" ) .( TypeAlias ) .getTypeRepr ( ) .( TypeMention ) .getTypeAt ( path ) instanceof
29- TypeParameter
27+ predicate targetHasTypeParameterAt ( TypePath path , TypeParameter tp ) {
28+ tp = this .getAssocItem ( "Target" ) .( TypeAlias ) .getTypeRepr ( ) .( TypeMention ) .getTypeAt ( path )
3029 }
3130
3231 /** Gets the first type parameter of the type being implemented, if any. */
Original file line number Diff line number Diff line change @@ -2642,7 +2642,7 @@ private Type inferMethodCallTypeSelf(
26422642 not result instanceof TypeParameter
26432643 or
26442644 exists ( TypePath pathToTypeParam , TypePath suffix |
2645- impl .targetHasTypeParameterAt ( pathToTypeParam ) and
2645+ impl .targetHasTypeParameterAt ( pathToTypeParam , selfParamType ) and
26462646 path0 = pathToTypeParam .appendInverse ( suffix ) and
26472647 result = t0 and
26482648 path = selfPath .append ( suffix )
You can’t perform that action at this time.
0 commit comments