Skip to content

Commit 16dcc5c

Browse files
committed
Rust: Add variable capture consistency query
1 parent 9fe7bb3 commit 16dcc5c

File tree

3 files changed

+17
-0
lines changed

3 files changed

+17
-0
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
/**
2+
* @name Variable capture data flow inconsistencies
3+
* @description Lists the variable capture data flow inconsistencies in the database. This query is intended for internal use.
4+
* @kind table
5+
* @id rust/diagnostics/variable-capture-data-flow-consistency
6+
*/
7+
8+
import codeql.rust.dataflow.internal.DataFlowImpl::VariableCapture::Flow::ConsistencyChecks
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
variableAccessAstNesting
2+
| test.rs:396:26:396:26 | b | test.rs:409:28:414:9 | { ... } | CapturedVariable access is not nested in the defining callable |
3+
| test.rs:409:23:409:25 | foo | test.rs:409:28:414:9 | { ... } | CapturedVariable access is not nested in the defining callable |
4+
consistencyOverview
5+
| CapturedVariable access is not nested in the defining callable | 2 |
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
variableAccessAstNesting
2+
| variables.rs:436:13:436:13 | i | variables.rs:437:17:439:5 | { ... } | CapturedVariable access is not nested in the defining callable |
3+
consistencyOverview
4+
| CapturedVariable access is not nested in the defining callable | 1 |

0 commit comments

Comments
 (0)