Skip to content

Commit 18ce8be

Browse files
geoffw0paldepind
andauthored
Update rust/ql/lib/codeql/rust/elements/internal/VariableImpl.qll
Co-authored-by: Simon Friis Vindum <[email protected]>
1 parent 8a35e15 commit 18ce8be

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

rust/ql/lib/codeql/rust/elements/internal/VariableImpl.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ module Impl {
8888
// exclude parameters from functions without a body as these are trait method declarations
8989
// without implementations
9090
not exists(Function f | not f.hasBody() and f.getParamList().getAParam().getPat() = p) and
91-
// exclude parameters from function pointers as well, which also lack a body
91+
// exclude parameters from function pointer types (e.g. `x` in `fn(x: i32) -> i32`)
9292
not exists(FnPtrType fp | fp.getParamList().getParam(_).getPat() = p)
9393
}
9494

0 commit comments

Comments
 (0)