Skip to content

Commit

Permalink
Update rust/ql/lib/codeql/rust/elements/internal/VariableImpl.qll
Browse files Browse the repository at this point in the history
Co-authored-by: Simon Friis Vindum <[email protected]>
  • Loading branch information
geoffw0 and paldepind authored Nov 6, 2024
1 parent 8a35e15 commit 18ce8be
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rust/ql/lib/codeql/rust/elements/internal/VariableImpl.qll
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down

0 comments on commit 18ce8be

Please sign in to comment.