From 18ce8be3024bfb79cea8571a1446d4401a20f20f Mon Sep 17 00:00:00 2001 From: Geoffrey White <40627776+geoffw0@users.noreply.github.com> Date: Wed, 6 Nov 2024 19:00:10 +0000 Subject: [PATCH] Update rust/ql/lib/codeql/rust/elements/internal/VariableImpl.qll Co-authored-by: Simon Friis Vindum --- rust/ql/lib/codeql/rust/elements/internal/VariableImpl.qll | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rust/ql/lib/codeql/rust/elements/internal/VariableImpl.qll b/rust/ql/lib/codeql/rust/elements/internal/VariableImpl.qll index d6fa101f40b3..10f079a4c5d6 100644 --- a/rust/ql/lib/codeql/rust/elements/internal/VariableImpl.qll +++ b/rust/ql/lib/codeql/rust/elements/internal/VariableImpl.qll @@ -88,7 +88,7 @@ module Impl { // exclude parameters from functions without a body as these are trait method declarations // without implementations not exists(Function f | not f.hasBody() and f.getParamList().getAParam().getPat() = p) and - // exclude parameters from function pointers as well, which also lack a body + // exclude parameters from function pointer types (e.g. `x` in `fn(x: i32) -> i32`) not exists(FnPtrType fp | fp.getParamList().getParam(_).getPat() = p) }