Update rust/ql/lib/codeql/rust/dataflow/internal/DataFlowImpl.qll

Co-authored-by: Tom Hvitved <hvitved@github.com>
This commit is contained in:
Simon Friis Vindum
2024-12-04 10:37:30 +01:00
committed by GitHub
parent bb015cf56d
commit 33fe51da4e

View File

@@ -1024,10 +1024,9 @@ module RustDataFlow implements InputSig<Location> {
/** Holds if `creation` is an expression that creates a lambda of kind `kind` for `c`. */
predicate lambdaCreation(Node creation, LambdaCallKind kind, DataFlowCallable c) {
exists(Expr cl |
exists(ClosureExpr cl |
cl = creation.asExpr().getExpr() and
cl = c.asCfgScope() and
cl instanceof ClosureExpr
cl = c.asCfgScope()
) and
exists(kind)
}