From f2a0724620371ebeb2043090f1cf0da256df2a8a Mon Sep 17 00:00:00 2001 From: Simon Friis Vindum Date: Wed, 18 Mar 2026 15:05:33 +0100 Subject: [PATCH] Rust: Use `getReturnType` --- .../ql/lib/codeql/rust/internal/typeinference/TypeInference.qll | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rust/ql/lib/codeql/rust/internal/typeinference/TypeInference.qll b/rust/ql/lib/codeql/rust/internal/typeinference/TypeInference.qll index e88a69e910f..da150a3ef39 100644 --- a/rust/ql/lib/codeql/rust/internal/typeinference/TypeInference.qll +++ b/rust/ql/lib/codeql/rust/internal/typeinference/TypeInference.qll @@ -2974,7 +2974,7 @@ private module ConstructionMatchingInput implements MatchingInputSig { exists(Declaration d, TypeParameter tp | d = this.getTarget() and pos.isReturn() and - tp = d.getDeclaredType(pos, path) and + tp = d.getReturnType(path) and not exists(FunctionPosition pos2 | not pos2.isReturn() and tp = d.getDeclaredType(pos2, _)) and // check that no explicit type arguments have been supplied for `tp` not exists(TypeArgumentPosition tapos |