File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed
lib/codeql/rust/controlflow/internal
test/library-tests/controlflow Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,12 @@ abstract class CfgScope extends AstNode {
1212}
1313
1414final class FunctionScope extends CfgScope , Function {
15+ FunctionScope ( ) {
16+ // A function without a body corresponds to a trait method signature and
17+ // should not have a CFG scope.
18+ this .hasBody ( )
19+ }
20+
1521 override predicate scopeFirst ( AstNode node ) {
1622 first ( this .( FunctionTree ) .getFirstChildNode ( ) , node )
1723 }
Original file line number Diff line number Diff line change @@ -796,8 +796,6 @@ edges
796796| test.rs:381:5:381:19 | ExprStmt | test.rs:381:5:381:10 | PathExpr | |
797797| test.rs:381:12:381:17 | RefExpr | test.rs:381:5:381:18 | CallExpr | |
798798| test.rs:381:17:381:17 | x | test.rs:381:12:381:17 | RefExpr | |
799- | test.rs:385:5:385:29 | enter my_from | test.rs:385:16:385:16 | x | |
800- | test.rs:385:16:385:16 | x | test.rs:385:16:385:19 | Param | match |
801799breakTarget
802800| test.rs:25:17:25:21 | BreakExpr | test.rs:19:9:31:9 | LoopExpr |
803801| test.rs:39:21:39:25 | BreakExpr | test.rs:37:13:44:13 | LoopExpr |
You can’t perform that action at this time.
0 commit comments