Skip to content

Commit f4aa360

Browse files
committed
Rust: Do not consider async blocks as lambda expressions
1 parent e377a0e commit f4aa360

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -843,8 +843,10 @@ module RustDataFlow implements InputSig<Location> {
843843

844844
/** Holds if `creation` is an expression that creates a lambda of kind `kind` for `c`. */
845845
predicate lambdaCreation(Node creation, LambdaCallKind kind, DataFlowCallable c) {
846-
exists(Expr cl | cl = creation.asExpr().getExpr() and cl = c.asCfgScope() |
847-
cl instanceof ClosureExpr or cl instanceof AsyncBlockExpr
846+
exists(Expr cl |
847+
cl = creation.asExpr().getExpr() and
848+
cl = c.asCfgScope() and
849+
cl instanceof ClosureExpr
848850
) and
849851
exists(kind)
850852
}

0 commit comments

Comments
 (0)