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>;
5959
6060import CfgImpl
6161
62- /** A trivial pattern that is always guaranteed to match. */
62+ /** Holds for a trivial pattern that is always guaranteed to match. */
6363predicate trivialPat ( Pat p ) { p instanceof WildcardPat or p instanceof IdentPat }
6464
6565class AsmExprTree extends LeafTree instanceof AsmExpr { }
@@ -303,7 +303,7 @@ class LoopExprTree extends PostOrderTree instanceof LoopExpr {
303303
304304 override predicate first ( AstNode node ) { first ( super .getBody ( ) , node ) }
305305
306- /** Whether this `LoopExpr` captures a completion for a `break`/`continue` . */
306+ /** Whether this `LoopExpr` captures the `c` completion . */
307307 predicate capturesLoopJumpCompletion ( LoopJumpCompletion c ) {
308308 not c .hasLabel ( )
309309 or
@@ -379,7 +379,8 @@ class MatchExprTree extends PostOrderTree instanceof MatchExpr {
379379 c .( ConditionalCompletion ) .failed ( )
380380 )
381381 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 )
383384 }
384385}
385386
You can’t perform that action at this time.
0 commit comments