mirror of
https://github.com/github/codeql.git
synced 2025-12-17 01:03:14 +01:00
Update rust/ql/lib/codeql/rust/elements/internal/VariableImpl.qll
Co-authored-by: Simon Friis Vindum <paldepind@github.com>
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user