File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
rust/ql/lib/codeql/rust/controlflow/internal Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ module CfgImpl = Make<Location, CfgInput>;
59
59
60
60
import CfgImpl
61
61
62
- /** A trivial pattern that is always guaranteed to match. */
62
+ /** Holds for a trivial pattern that is always guaranteed to match. */
63
63
predicate trivialPat ( Pat p ) { p instanceof WildcardPat or p instanceof IdentPat }
64
64
65
65
class AsmExprTree extends LeafTree instanceof AsmExpr { }
@@ -303,7 +303,7 @@ class LoopExprTree extends PostOrderTree instanceof LoopExpr {
303
303
304
304
override predicate first ( AstNode node ) { first ( super .getBody ( ) , node ) }
305
305
306
- /** Whether this `LoopExpr` captures a completion for a `break`/`continue` . */
306
+ /** Whether this `LoopExpr` captures the `c` completion . */
307
307
predicate capturesLoopJumpCompletion ( LoopJumpCompletion c ) {
308
308
not c .hasLabel ( )
309
309
or
@@ -379,7 +379,8 @@ class MatchExprTree extends PostOrderTree instanceof MatchExpr {
379
379
c .( ConditionalCompletion ) .failed ( )
380
380
)
381
381
or
382
- exists ( int i | last ( super .getBranch ( i ) , pred , c ) and succ = this and completionIsSimple ( c ) )
382
+ // Edge from the end of each arm to the match expression.
383
+ last ( super .getBranch ( _) , pred , c ) and succ = this and completionIsSimple ( c )
383
384
}
384
385
}
385
386
You can’t perform that action at this time.
0 commit comments