mirror of
https://github.com/github/codeql.git
synced 2026-04-30 03:05:15 +02:00
Merge branch 'main' into rust-rusqlite
This commit is contained in:
@@ -130,7 +130,7 @@ TypeParam/gen_type_param.rs 31c02d18020b305f1c37fdeb97656dd5b1e49e6b9a072329c2f0
|
||||
UnderscoreExpr/gen_underscore_expr.rs fe34e99d322bf86c0f5509c9b5fd6e1e8abbdf63dbe7e01687344a41e9aabe52 fe34e99d322bf86c0f5509c9b5fd6e1e8abbdf63dbe7e01687344a41e9aabe52
|
||||
Union/gen_union.rs d5e814688e93dcb105f29a392159c1b995ee15a74720167219f9431db8ef70a3 d5e814688e93dcb105f29a392159c1b995ee15a74720167219f9431db8ef70a3
|
||||
Use/gen_use.rs 2a0ea9fa34d844fda63e8f605f6a951e8b272d63ebfb0ae501fc734559a83a6b 2a0ea9fa34d844fda63e8f605f6a951e8b272d63ebfb0ae501fc734559a83a6b
|
||||
UseTree/gen_use_tree.rs 0a310eb8ce7abf481df813464dabac528a8f70d64d541409c66f957dfdd068d0 0a310eb8ce7abf481df813464dabac528a8f70d64d541409c66f957dfdd068d0
|
||||
UseTree/gen_use_tree.rs bf7525e8641a5a90a7e07214e7480b6507737cf60f9bd4d8b82bc71a8b9d7e8d bf7525e8641a5a90a7e07214e7480b6507737cf60f9bd4d8b82bc71a8b9d7e8d
|
||||
UseTreeList/gen_use_tree_list.rs ba450699782e51b1d3139148709827e35f2e57235849fb26a073e2786dfc53e3 ba450699782e51b1d3139148709827e35f2e57235849fb26a073e2786dfc53e3
|
||||
Variant/gen_variant.rs 036566793ee468418f915974e2925d8bafaec3c93c2463212f222e6a5f290f24 036566793ee468418f915974e2925d8bafaec3c93c2463212f222e6a5f290f24
|
||||
VariantList/gen_variant_list.rs 932b67564c5ef4116d84db6945e098f6d7438755d99fc198fde8f4527979bf00 932b67564c5ef4116d84db6945e098f6d7438755d99fc198fde8f4527979bf00
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
| gen_record_pat_field.rs:5:15:5:18 | RecordPatField | getNumberOfAttrs: | 0 | hasNameRef: | yes | hasPat: | yes |
|
||||
| gen_record_pat_field.rs:5:21:5:24 | RecordPatField | getNumberOfAttrs: | 0 | hasNameRef: | yes | hasPat: | yes |
|
||||
| gen_record_pat_field.rs:5:15:5:18 | a: 1 | getNumberOfAttrs: | 0 | hasNameRef: | yes | hasPat: | yes |
|
||||
| gen_record_pat_field.rs:5:21:5:24 | b: 2 | getNumberOfAttrs: | 0 | hasNameRef: | yes | hasPat: | yes |
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
| gen_record_pat_field.rs:5:15:5:18 | RecordPatField | gen_record_pat_field.rs:5:15:5:15 | a |
|
||||
| gen_record_pat_field.rs:5:21:5:24 | RecordPatField | gen_record_pat_field.rs:5:21:5:21 | b |
|
||||
| gen_record_pat_field.rs:5:15:5:18 | a: 1 | gen_record_pat_field.rs:5:15:5:15 | a |
|
||||
| gen_record_pat_field.rs:5:21:5:24 | b: 2 | gen_record_pat_field.rs:5:21:5:21 | b |
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
| gen_record_pat_field.rs:5:15:5:18 | RecordPatField | gen_record_pat_field.rs:5:18:5:18 | 1 |
|
||||
| gen_record_pat_field.rs:5:21:5:24 | RecordPatField | gen_record_pat_field.rs:5:24:5:24 | 2 |
|
||||
| gen_record_pat_field.rs:5:15:5:18 | a: 1 | gen_record_pat_field.rs:5:18:5:18 | 1 |
|
||||
| gen_record_pat_field.rs:5:21:5:24 | b: 2 | gen_record_pat_field.rs:5:24:5:24 | 2 |
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
| gen_use_tree.rs:5:9:5:33 | UseTree | isGlob: | no | hasPath: | yes | hasRename: | no | hasUseTreeList: | no |
|
||||
| gen_use_tree.rs:6:9:6:27 | UseTree | isGlob: | yes | hasPath: | yes | hasRename: | no | hasUseTreeList: | no |
|
||||
| gen_use_tree.rs:7:9:7:46 | UseTree | isGlob: | no | hasPath: | yes | hasRename: | yes | hasUseTreeList: | no |
|
||||
| gen_use_tree.rs:8:9:8:50 | UseTree | isGlob: | no | hasPath: | yes | hasRename: | no | hasUseTreeList: | yes |
|
||||
| gen_use_tree.rs:8:28:8:31 | UseTree | isGlob: | no | hasPath: | yes | hasRename: | no | hasUseTreeList: | no |
|
||||
| gen_use_tree.rs:8:34:8:40 | UseTree | isGlob: | no | hasPath: | yes | hasRename: | no | hasUseTreeList: | no |
|
||||
| gen_use_tree.rs:8:43:8:49 | UseTree | isGlob: | no | hasPath: | yes | hasRename: | no | hasUseTreeList: | no |
|
||||
|
||||
@@ -2,11 +2,13 @@
|
||||
import codeql.rust.elements
|
||||
import TestUtils
|
||||
|
||||
from UseTree x, string hasPath, string hasRename, string hasUseTreeList
|
||||
from UseTree x, string isGlob, string hasPath, string hasRename, string hasUseTreeList
|
||||
where
|
||||
toBeTested(x) and
|
||||
not x.isUnknown() and
|
||||
(if x.isGlob() then isGlob = "yes" else isGlob = "no") and
|
||||
(if x.hasPath() then hasPath = "yes" else hasPath = "no") and
|
||||
(if x.hasRename() then hasRename = "yes" else hasRename = "no") and
|
||||
if x.hasUseTreeList() then hasUseTreeList = "yes" else hasUseTreeList = "no"
|
||||
select x, "hasPath:", hasPath, "hasRename:", hasRename, "hasUseTreeList:", hasUseTreeList
|
||||
select x, "isGlob:", isGlob, "hasPath:", hasPath, "hasRename:", hasRename, "hasUseTreeList:",
|
||||
hasUseTreeList
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
| gen_use_tree.rs:5:9:5:33 | UseTree | gen_use_tree.rs:5:9:5:33 | ...::HashMap |
|
||||
| gen_use_tree.rs:6:9:6:27 | UseTree | gen_use_tree.rs:6:9:6:24 | ...::collections |
|
||||
| gen_use_tree.rs:7:9:7:46 | UseTree | gen_use_tree.rs:7:9:7:33 | ...::HashMap |
|
||||
| gen_use_tree.rs:8:9:8:50 | UseTree | gen_use_tree.rs:8:9:8:24 | ...::collections |
|
||||
| gen_use_tree.rs:8:28:8:31 | UseTree | gen_use_tree.rs:8:28:8:31 | self |
|
||||
| gen_use_tree.rs:8:34:8:40 | UseTree | gen_use_tree.rs:8:34:8:40 | HashMap |
|
||||
| gen_use_tree.rs:8:43:8:49 | UseTree | gen_use_tree.rs:8:43:8:49 | HashSet |
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
| gen_use_tree.rs:7:9:7:46 | UseTree | gen_use_tree.rs:7:35:7:46 | Rename |
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
| gen_use_tree.rs:8:9:8:50 | UseTree | gen_use_tree.rs:8:27:8:50 | UseTreeList |
|
||||
|
||||
@@ -2,5 +2,8 @@
|
||||
|
||||
fn test_use_tree() -> () {
|
||||
// A UseTree. For example:
|
||||
todo!()
|
||||
use std::collections::HashMap;
|
||||
use std::collections::*;
|
||||
use std::collections::HashMap as MyHashMap;
|
||||
use std::collections::{self, HashMap, HashSet};
|
||||
}
|
||||
|
||||
1964
rust/ql/test/library-tests/controlflow/BasicBlocks.expected
Normal file
1964
rust/ql/test/library-tests/controlflow/BasicBlocks.expected
Normal file
File diff suppressed because it is too large
Load Diff
23
rust/ql/test/library-tests/controlflow/BasicBlocks.ql
Normal file
23
rust/ql/test/library-tests/controlflow/BasicBlocks.ql
Normal file
@@ -0,0 +1,23 @@
|
||||
import rust
|
||||
import codeql.rust.controlflow.ControlFlowGraph
|
||||
import codeql.rust.controlflow.BasicBlocks
|
||||
|
||||
query predicate dominates(BasicBlock bb1, BasicBlock bb2) { bb1.dominates(bb2) }
|
||||
|
||||
query predicate postDominance(BasicBlock bb1, BasicBlock bb2) { bb1.postDominates(bb2) }
|
||||
|
||||
query predicate immediateDominator(BasicBlock bb1, BasicBlock bb2) {
|
||||
bb1.getImmediateDominator() = bb2
|
||||
}
|
||||
|
||||
query predicate controls(ConditionBasicBlock bb1, BasicBlock bb2, SuccessorType t) {
|
||||
bb1.controls(bb2, t)
|
||||
}
|
||||
|
||||
query predicate successor(ConditionBasicBlock bb1, BasicBlock bb2, SuccessorType t) {
|
||||
bb1.getASuccessor(t) = bb2
|
||||
}
|
||||
|
||||
query predicate joinBlockPredecessor(JoinBasicBlock bb1, BasicBlock bb2, int i) {
|
||||
bb1.getJoinBlockPredecessor(i) = bb2
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -134,6 +134,14 @@ mod if_expression {
|
||||
}
|
||||
}
|
||||
|
||||
fn test_if_without_else(b: bool) -> i64 {
|
||||
let mut i = 3;
|
||||
if b {
|
||||
i += 1;
|
||||
}
|
||||
i
|
||||
}
|
||||
|
||||
fn test_if_let_else(a: Option<i64>) -> i64 {
|
||||
if let Some(n) = a {
|
||||
n
|
||||
@@ -157,6 +165,17 @@ mod if_expression {
|
||||
}
|
||||
}
|
||||
|
||||
fn test_nested_if_2(cond1: bool, cond2: bool) -> () {
|
||||
if cond1 {
|
||||
if cond2 {
|
||||
println!("1");
|
||||
} else {
|
||||
println!("2");
|
||||
}
|
||||
println!("3");
|
||||
};
|
||||
}
|
||||
|
||||
fn test_nested_if_match(a: i64) -> i64 {
|
||||
if (match a {
|
||||
0 => true,
|
||||
|
||||
@@ -20,21 +20,28 @@ edges
|
||||
| main.rs:41:26:44:5 | { ... } | main.rs:30:17:30:22 | ...: i64 | provenance | |
|
||||
| main.rs:41:26:44:5 | { ... } | main.rs:41:13:44:6 | pass_through(...) | provenance | |
|
||||
| main.rs:43:9:43:18 | source(...) | main.rs:41:26:44:5 | { ... } | provenance | |
|
||||
| main.rs:56:23:56:28 | ...: i64 | main.rs:57:14:57:14 | n | provenance | |
|
||||
| main.rs:59:31:65:5 | { ... } | main.rs:77:13:77:25 | mn.get_data(...) | provenance | |
|
||||
| main.rs:63:13:63:21 | source(...) | main.rs:59:31:65:5 | { ... } | provenance | |
|
||||
| main.rs:66:28:66:33 | ...: i64 | main.rs:66:43:72:5 | { ... } | provenance | |
|
||||
| main.rs:77:9:77:9 | a | main.rs:78:10:78:10 | a | provenance | |
|
||||
| main.rs:77:13:77:25 | mn.get_data(...) | main.rs:77:9:77:9 | a | provenance | |
|
||||
| main.rs:83:9:83:9 | a | main.rs:84:16:84:16 | a | provenance | |
|
||||
| main.rs:83:13:83:21 | source(...) | main.rs:83:9:83:9 | a | provenance | |
|
||||
| main.rs:84:16:84:16 | a | main.rs:56:23:56:28 | ...: i64 | provenance | |
|
||||
| main.rs:89:9:89:9 | a | main.rs:90:29:90:29 | a | provenance | |
|
||||
| main.rs:89:13:89:21 | source(...) | main.rs:89:9:89:9 | a | provenance | |
|
||||
| main.rs:90:9:90:9 | b | main.rs:91:10:91:10 | b | provenance | |
|
||||
| main.rs:90:13:90:30 | mn.data_through(...) | main.rs:90:9:90:9 | b | provenance | |
|
||||
| main.rs:90:29:90:29 | a | main.rs:66:28:66:33 | ...: i64 | provenance | |
|
||||
| main.rs:90:29:90:29 | a | main.rs:90:13:90:30 | mn.data_through(...) | provenance | |
|
||||
| main.rs:49:9:49:9 | a | main.rs:55:26:55:26 | a | provenance | |
|
||||
| main.rs:49:13:49:22 | source(...) | main.rs:49:9:49:9 | a | provenance | |
|
||||
| main.rs:51:21:51:26 | ...: i64 | main.rs:51:36:53:5 | { ... } | provenance | |
|
||||
| main.rs:55:9:55:9 | b | main.rs:56:10:56:10 | b | provenance | |
|
||||
| main.rs:55:13:55:27 | pass_through(...) | main.rs:55:9:55:9 | b | provenance | |
|
||||
| main.rs:55:26:55:26 | a | main.rs:51:21:51:26 | ...: i64 | provenance | |
|
||||
| main.rs:55:26:55:26 | a | main.rs:55:13:55:27 | pass_through(...) | provenance | |
|
||||
| main.rs:67:23:67:28 | ...: i64 | main.rs:68:14:68:14 | n | provenance | |
|
||||
| main.rs:70:31:76:5 | { ... } | main.rs:88:13:88:25 | mn.get_data(...) | provenance | |
|
||||
| main.rs:74:13:74:21 | source(...) | main.rs:70:31:76:5 | { ... } | provenance | |
|
||||
| main.rs:77:28:77:33 | ...: i64 | main.rs:77:43:83:5 | { ... } | provenance | |
|
||||
| main.rs:88:9:88:9 | a | main.rs:89:10:89:10 | a | provenance | |
|
||||
| main.rs:88:13:88:25 | mn.get_data(...) | main.rs:88:9:88:9 | a | provenance | |
|
||||
| main.rs:94:9:94:9 | a | main.rs:95:16:95:16 | a | provenance | |
|
||||
| main.rs:94:13:94:21 | source(...) | main.rs:94:9:94:9 | a | provenance | |
|
||||
| main.rs:95:16:95:16 | a | main.rs:67:23:67:28 | ...: i64 | provenance | |
|
||||
| main.rs:100:9:100:9 | a | main.rs:101:29:101:29 | a | provenance | |
|
||||
| main.rs:100:13:100:21 | source(...) | main.rs:100:9:100:9 | a | provenance | |
|
||||
| main.rs:101:9:101:9 | b | main.rs:102:10:102:10 | b | provenance | |
|
||||
| main.rs:101:13:101:30 | mn.data_through(...) | main.rs:101:9:101:9 | b | provenance | |
|
||||
| main.rs:101:29:101:29 | a | main.rs:77:28:77:33 | ...: i64 | provenance | |
|
||||
| main.rs:101:29:101:29 | a | main.rs:101:13:101:30 | mn.data_through(...) | provenance | |
|
||||
nodes
|
||||
| main.rs:12:28:14:1 | { ... } | semmle.label | { ... } |
|
||||
| main.rs:13:5:13:13 | source(...) | semmle.label | source(...) |
|
||||
@@ -59,34 +66,44 @@ nodes
|
||||
| main.rs:41:26:44:5 | { ... } | semmle.label | { ... } |
|
||||
| main.rs:43:9:43:18 | source(...) | semmle.label | source(...) |
|
||||
| main.rs:45:10:45:10 | a | semmle.label | a |
|
||||
| main.rs:56:23:56:28 | ...: i64 | semmle.label | ...: i64 |
|
||||
| main.rs:57:14:57:14 | n | semmle.label | n |
|
||||
| main.rs:59:31:65:5 | { ... } | semmle.label | { ... } |
|
||||
| main.rs:63:13:63:21 | source(...) | semmle.label | source(...) |
|
||||
| main.rs:66:28:66:33 | ...: i64 | semmle.label | ...: i64 |
|
||||
| main.rs:66:43:72:5 | { ... } | semmle.label | { ... } |
|
||||
| main.rs:77:9:77:9 | a | semmle.label | a |
|
||||
| main.rs:77:13:77:25 | mn.get_data(...) | semmle.label | mn.get_data(...) |
|
||||
| main.rs:78:10:78:10 | a | semmle.label | a |
|
||||
| main.rs:83:9:83:9 | a | semmle.label | a |
|
||||
| main.rs:83:13:83:21 | source(...) | semmle.label | source(...) |
|
||||
| main.rs:84:16:84:16 | a | semmle.label | a |
|
||||
| main.rs:89:9:89:9 | a | semmle.label | a |
|
||||
| main.rs:89:13:89:21 | source(...) | semmle.label | source(...) |
|
||||
| main.rs:90:9:90:9 | b | semmle.label | b |
|
||||
| main.rs:90:13:90:30 | mn.data_through(...) | semmle.label | mn.data_through(...) |
|
||||
| main.rs:90:29:90:29 | a | semmle.label | a |
|
||||
| main.rs:91:10:91:10 | b | semmle.label | b |
|
||||
| main.rs:49:9:49:9 | a | semmle.label | a |
|
||||
| main.rs:49:13:49:22 | source(...) | semmle.label | source(...) |
|
||||
| main.rs:51:21:51:26 | ...: i64 | semmle.label | ...: i64 |
|
||||
| main.rs:51:36:53:5 | { ... } | semmle.label | { ... } |
|
||||
| main.rs:55:9:55:9 | b | semmle.label | b |
|
||||
| main.rs:55:13:55:27 | pass_through(...) | semmle.label | pass_through(...) |
|
||||
| main.rs:55:26:55:26 | a | semmle.label | a |
|
||||
| main.rs:56:10:56:10 | b | semmle.label | b |
|
||||
| main.rs:67:23:67:28 | ...: i64 | semmle.label | ...: i64 |
|
||||
| main.rs:68:14:68:14 | n | semmle.label | n |
|
||||
| main.rs:70:31:76:5 | { ... } | semmle.label | { ... } |
|
||||
| main.rs:74:13:74:21 | source(...) | semmle.label | source(...) |
|
||||
| main.rs:77:28:77:33 | ...: i64 | semmle.label | ...: i64 |
|
||||
| main.rs:77:43:83:5 | { ... } | semmle.label | { ... } |
|
||||
| main.rs:88:9:88:9 | a | semmle.label | a |
|
||||
| main.rs:88:13:88:25 | mn.get_data(...) | semmle.label | mn.get_data(...) |
|
||||
| main.rs:89:10:89:10 | a | semmle.label | a |
|
||||
| main.rs:94:9:94:9 | a | semmle.label | a |
|
||||
| main.rs:94:13:94:21 | source(...) | semmle.label | source(...) |
|
||||
| main.rs:95:16:95:16 | a | semmle.label | a |
|
||||
| main.rs:100:9:100:9 | a | semmle.label | a |
|
||||
| main.rs:100:13:100:21 | source(...) | semmle.label | source(...) |
|
||||
| main.rs:101:9:101:9 | b | semmle.label | b |
|
||||
| main.rs:101:13:101:30 | mn.data_through(...) | semmle.label | mn.data_through(...) |
|
||||
| main.rs:101:29:101:29 | a | semmle.label | a |
|
||||
| main.rs:102:10:102:10 | b | semmle.label | b |
|
||||
subpaths
|
||||
| main.rs:36:26:36:26 | a | main.rs:30:17:30:22 | ...: i64 | main.rs:30:32:32:1 | { ... } | main.rs:36:13:36:27 | pass_through(...) |
|
||||
| main.rs:41:26:44:5 | { ... } | main.rs:30:17:30:22 | ...: i64 | main.rs:30:32:32:1 | { ... } | main.rs:41:13:44:6 | pass_through(...) |
|
||||
| main.rs:90:29:90:29 | a | main.rs:66:28:66:33 | ...: i64 | main.rs:66:43:72:5 | { ... } | main.rs:90:13:90:30 | mn.data_through(...) |
|
||||
| main.rs:55:26:55:26 | a | main.rs:51:21:51:26 | ...: i64 | main.rs:51:36:53:5 | { ... } | main.rs:55:13:55:27 | pass_through(...) |
|
||||
| main.rs:101:29:101:29 | a | main.rs:77:28:77:33 | ...: i64 | main.rs:77:43:83:5 | { ... } | main.rs:101:13:101:30 | mn.data_through(...) |
|
||||
testFailures
|
||||
#select
|
||||
| main.rs:18:10:18:10 | a | main.rs:13:5:13:13 | source(...) | main.rs:18:10:18:10 | a | $@ | main.rs:13:5:13:13 | source(...) | source(...) |
|
||||
| main.rs:22:10:22:10 | n | main.rs:26:13:26:21 | source(...) | main.rs:22:10:22:10 | n | $@ | main.rs:26:13:26:21 | source(...) | source(...) |
|
||||
| main.rs:37:10:37:10 | b | main.rs:35:13:35:21 | source(...) | main.rs:37:10:37:10 | b | $@ | main.rs:35:13:35:21 | source(...) | source(...) |
|
||||
| main.rs:45:10:45:10 | a | main.rs:43:9:43:18 | source(...) | main.rs:45:10:45:10 | a | $@ | main.rs:43:9:43:18 | source(...) | source(...) |
|
||||
| main.rs:57:14:57:14 | n | main.rs:83:13:83:21 | source(...) | main.rs:57:14:57:14 | n | $@ | main.rs:83:13:83:21 | source(...) | source(...) |
|
||||
| main.rs:78:10:78:10 | a | main.rs:63:13:63:21 | source(...) | main.rs:78:10:78:10 | a | $@ | main.rs:63:13:63:21 | source(...) | source(...) |
|
||||
| main.rs:91:10:91:10 | b | main.rs:89:13:89:21 | source(...) | main.rs:91:10:91:10 | b | $@ | main.rs:89:13:89:21 | source(...) | source(...) |
|
||||
| main.rs:56:10:56:10 | b | main.rs:49:13:49:22 | source(...) | main.rs:56:10:56:10 | b | $@ | main.rs:49:13:49:22 | source(...) | source(...) |
|
||||
| main.rs:68:14:68:14 | n | main.rs:94:13:94:21 | source(...) | main.rs:68:14:68:14 | n | $@ | main.rs:94:13:94:21 | source(...) | source(...) |
|
||||
| main.rs:89:10:89:10 | a | main.rs:74:13:74:21 | source(...) | main.rs:89:10:89:10 | a | $@ | main.rs:74:13:74:21 | source(...) | source(...) |
|
||||
| main.rs:102:10:102:10 | b | main.rs:100:13:100:21 | source(...) | main.rs:102:10:102:10 | b | $@ | main.rs:100:13:100:21 | source(...) | source(...) |
|
||||
|
||||
@@ -45,6 +45,17 @@ fn block_expression_as_argument() {
|
||||
sink(a); // $ hasValueFlow=14
|
||||
}
|
||||
|
||||
fn data_through_nested_function() {
|
||||
let a = source(15);
|
||||
|
||||
fn pass_through(i: i64) -> i64 {
|
||||
i
|
||||
}
|
||||
|
||||
let b = pass_through(a);
|
||||
sink(b); // $ hasValueFlow=15
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Data flow in, out, and through method.
|
||||
|
||||
@@ -127,6 +138,7 @@ fn main() {
|
||||
data_out_of_call();
|
||||
data_in_to_call();
|
||||
data_through_call();
|
||||
data_through_nested_function();
|
||||
|
||||
data_out_of_method();
|
||||
data_in_to_method_call();
|
||||
|
||||
@@ -10,26 +10,30 @@
|
||||
| main.rs:41:13:44:6 | pass_through(...) | main.rs:30:1:32:1 | fn pass_through |
|
||||
| main.rs:43:9:43:18 | source(...) | main.rs:1:1:3:1 | fn source |
|
||||
| main.rs:45:5:45:11 | sink(...) | main.rs:5:1:7:1 | fn sink |
|
||||
| main.rs:57:9:57:15 | sink(...) | main.rs:5:1:7:1 | fn sink |
|
||||
| main.rs:63:13:63:21 | source(...) | main.rs:1:1:3:1 | fn source |
|
||||
| main.rs:77:13:77:25 | mn.get_data(...) | main.rs:59:5:65:5 | fn get_data |
|
||||
| main.rs:78:5:78:11 | sink(...) | main.rs:5:1:7:1 | fn sink |
|
||||
| main.rs:83:13:83:21 | source(...) | main.rs:1:1:3:1 | fn source |
|
||||
| main.rs:84:5:84:17 | mn.data_in(...) | main.rs:56:5:58:5 | fn data_in |
|
||||
| main.rs:89:13:89:21 | source(...) | main.rs:1:1:3:1 | fn source |
|
||||
| main.rs:90:13:90:30 | mn.data_through(...) | main.rs:66:5:72:5 | fn data_through |
|
||||
| main.rs:91:5:91:11 | sink(...) | main.rs:5:1:7:1 | fn sink |
|
||||
| main.rs:110:28:110:36 | source(...) | main.rs:1:1:3:1 | fn source |
|
||||
| main.rs:113:5:113:17 | sink(...) | main.rs:5:1:7:1 | fn sink |
|
||||
| main.rs:116:28:116:36 | source(...) | main.rs:1:1:3:1 | fn source |
|
||||
| main.rs:118:5:118:17 | sink(...) | main.rs:5:1:7:1 | fn sink |
|
||||
| main.rs:120:28:120:36 | source(...) | main.rs:1:1:3:1 | fn source |
|
||||
| main.rs:122:13:122:20 | a.add(...) | main.rs:103:5:106:5 | fn add |
|
||||
| main.rs:123:5:123:17 | sink(...) | main.rs:5:1:7:1 | fn sink |
|
||||
| main.rs:127:5:127:22 | data_out_of_call(...) | main.rs:16:1:19:1 | fn data_out_of_call |
|
||||
| main.rs:128:5:128:21 | data_in_to_call(...) | main.rs:25:1:28:1 | fn data_in_to_call |
|
||||
| main.rs:129:5:129:23 | data_through_call(...) | main.rs:34:1:38:1 | fn data_through_call |
|
||||
| main.rs:131:5:131:24 | data_out_of_method(...) | main.rs:75:1:79:1 | fn data_out_of_method |
|
||||
| main.rs:132:5:132:28 | data_in_to_method_call(...) | main.rs:81:1:85:1 | fn data_in_to_method_call |
|
||||
| main.rs:133:5:133:25 | data_through_method(...) | main.rs:87:1:92:1 | fn data_through_method |
|
||||
| main.rs:135:5:135:31 | test_operator_overloading(...) | main.rs:109:1:124:1 | fn test_operator_overloading |
|
||||
| main.rs:49:13:49:22 | source(...) | main.rs:1:1:3:1 | fn source |
|
||||
| main.rs:55:13:55:27 | pass_through(...) | main.rs:51:5:53:5 | fn pass_through |
|
||||
| main.rs:56:5:56:11 | sink(...) | main.rs:5:1:7:1 | fn sink |
|
||||
| main.rs:68:9:68:15 | sink(...) | main.rs:5:1:7:1 | fn sink |
|
||||
| main.rs:74:13:74:21 | source(...) | main.rs:1:1:3:1 | fn source |
|
||||
| main.rs:88:13:88:25 | mn.get_data(...) | main.rs:70:5:76:5 | fn get_data |
|
||||
| main.rs:89:5:89:11 | sink(...) | main.rs:5:1:7:1 | fn sink |
|
||||
| main.rs:94:13:94:21 | source(...) | main.rs:1:1:3:1 | fn source |
|
||||
| main.rs:95:5:95:17 | mn.data_in(...) | main.rs:67:5:69:5 | fn data_in |
|
||||
| main.rs:100:13:100:21 | source(...) | main.rs:1:1:3:1 | fn source |
|
||||
| main.rs:101:13:101:30 | mn.data_through(...) | main.rs:77:5:83:5 | fn data_through |
|
||||
| main.rs:102:5:102:11 | sink(...) | main.rs:5:1:7:1 | fn sink |
|
||||
| main.rs:121:28:121:36 | source(...) | main.rs:1:1:3:1 | fn source |
|
||||
| main.rs:124:5:124:17 | sink(...) | main.rs:5:1:7:1 | fn sink |
|
||||
| main.rs:127:28:127:36 | source(...) | main.rs:1:1:3:1 | fn source |
|
||||
| main.rs:129:5:129:17 | sink(...) | main.rs:5:1:7:1 | fn sink |
|
||||
| main.rs:131:28:131:36 | source(...) | main.rs:1:1:3:1 | fn source |
|
||||
| main.rs:133:13:133:20 | a.add(...) | main.rs:114:5:117:5 | fn add |
|
||||
| main.rs:134:5:134:17 | sink(...) | main.rs:5:1:7:1 | fn sink |
|
||||
| main.rs:138:5:138:22 | data_out_of_call(...) | main.rs:16:1:19:1 | fn data_out_of_call |
|
||||
| main.rs:139:5:139:21 | data_in_to_call(...) | main.rs:25:1:28:1 | fn data_in_to_call |
|
||||
| main.rs:140:5:140:23 | data_through_call(...) | main.rs:34:1:38:1 | fn data_through_call |
|
||||
| main.rs:141:5:141:34 | data_through_nested_function(...) | main.rs:48:1:57:1 | fn data_through_nested_function |
|
||||
| main.rs:143:5:143:24 | data_out_of_method(...) | main.rs:86:1:90:1 | fn data_out_of_method |
|
||||
| main.rs:144:5:144:28 | data_in_to_method_call(...) | main.rs:92:1:96:1 | fn data_in_to_method_call |
|
||||
| main.rs:145:5:145:25 | data_through_method(...) | main.rs:98:1:103:1 | fn data_through_method |
|
||||
| main.rs:147:5:147:31 | test_operator_overloading(...) | main.rs:120:1:135:1 | fn test_operator_overloading |
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
identityLocalStep
|
||||
| main.rs:394:7:394:18 | phi(default_name) | Node steps to itself |
|
||||
| main.rs:425:9:425:20 | phi(default_name) | Node steps to itself |
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,7 +1,19 @@
|
||||
import codeql.rust.dataflow.DataFlow
|
||||
import codeql.rust.dataflow.internal.DataFlowImpl
|
||||
import utils.test.TranslateModels
|
||||
|
||||
query predicate localStep = DataFlow::localFlowStep/2;
|
||||
private predicate provenance(string model) { RustDataFlow::simpleLocalFlowStep(_, _, model) }
|
||||
|
||||
private module Tm = TranslateModels<provenance/1>;
|
||||
|
||||
query predicate models = Tm::models/2;
|
||||
|
||||
query predicate localStep(Node nodeFrom, Node nodeTo, string model) {
|
||||
exists(string madId |
|
||||
RustDataFlow::simpleLocalFlowStep(nodeFrom, nodeTo, madId) and
|
||||
Tm::translateModels(madId, model)
|
||||
)
|
||||
}
|
||||
|
||||
query predicate storeStep = RustDataFlow::storeStep/3;
|
||||
|
||||
|
||||
@@ -2,6 +2,10 @@ models
|
||||
| 1 | Summary: lang:core; <crate::option::Option>::unwrap; Argument[self].Variant[crate::option::Option::Some(0)]; ReturnValue; value |
|
||||
| 2 | Summary: lang:core; <crate::option::Option>::unwrap_or; Argument[0]; ReturnValue; value |
|
||||
| 3 | Summary: lang:core; <crate::option::Option>::unwrap_or; Argument[self].Variant[crate::option::Option::Some(0)]; ReturnValue; value |
|
||||
| 4 | Summary: lang:core; <crate::option::Option>::unwrap_or_else; Argument[0].ReturnValue; ReturnValue; value |
|
||||
| 5 | Summary: lang:core; <crate::option::Option>::unwrap_or_else; Argument[self].Variant[crate::option::Option::Some(0)]; ReturnValue; value |
|
||||
| 6 | Summary: lang:core; <crate::result::Result>::expect; Argument[self].Variant[crate::result::Result::Ok(0)]; ReturnValue; value |
|
||||
| 7 | Summary: lang:core; <crate::result::Result>::expect_err; Argument[self].Variant[crate::result::Result::Err(0)]; ReturnValue; value |
|
||||
edges
|
||||
| main.rs:19:9:19:9 | s | main.rs:20:10:20:10 | s | provenance | |
|
||||
| main.rs:19:13:19:21 | source(...) | main.rs:19:9:19:9 | s | provenance | |
|
||||
@@ -45,115 +49,144 @@ edges
|
||||
| main.rs:148:12:148:21 | source(...) | main.rs:147:13:150:5 | Point {...} [Point.x] | provenance | |
|
||||
| main.rs:151:9:151:28 | Point {...} [Point.x] | main.rs:151:20:151:20 | a | provenance | |
|
||||
| main.rs:151:20:151:20 | a | main.rs:152:10:152:10 | a | provenance | |
|
||||
| main.rs:198:9:198:10 | s1 [Some] | main.rs:200:11:200:12 | s1 [Some] | provenance | |
|
||||
| main.rs:198:14:198:37 | ...::Some(...) [Some] | main.rs:198:9:198:10 | s1 [Some] | provenance | |
|
||||
| main.rs:198:27:198:36 | source(...) | main.rs:198:14:198:37 | ...::Some(...) [Some] | provenance | |
|
||||
| main.rs:200:11:200:12 | s1 [Some] | main.rs:201:9:201:23 | ...::Some(...) [Some] | provenance | |
|
||||
| main.rs:201:9:201:23 | ...::Some(...) [Some] | main.rs:201:22:201:22 | n | provenance | |
|
||||
| main.rs:201:22:201:22 | n | main.rs:201:33:201:33 | n | provenance | |
|
||||
| main.rs:175:9:175:9 | y | main.rs:177:30:177:30 | y | provenance | |
|
||||
| main.rs:175:13:175:22 | source(...) | main.rs:175:9:175:9 | y | provenance | |
|
||||
| main.rs:176:9:176:9 | p [Point3D.plane, Point.y] | main.rs:180:11:180:11 | p [Point3D.plane, Point.y] | provenance | |
|
||||
| main.rs:176:13:179:5 | Point3D {...} [Point3D.plane, Point.y] | main.rs:176:9:176:9 | p [Point3D.plane, Point.y] | provenance | |
|
||||
| main.rs:177:16:177:32 | Point {...} [Point.y] | main.rs:176:13:179:5 | Point3D {...} [Point3D.plane, Point.y] | provenance | |
|
||||
| main.rs:177:30:177:30 | y | main.rs:177:16:177:32 | Point {...} [Point.y] | provenance | |
|
||||
| main.rs:180:11:180:11 | p [Point3D.plane, Point.y] | main.rs:181:9:184:9 | Point3D {...} [Point3D.plane, Point.y] | provenance | |
|
||||
| main.rs:181:9:184:9 | Point3D {...} [Point3D.plane, Point.y] | main.rs:182:20:182:33 | Point {...} [Point.y] | provenance | |
|
||||
| main.rs:182:20:182:33 | Point {...} [Point.y] | main.rs:182:31:182:31 | y | provenance | |
|
||||
| main.rs:182:31:182:31 | y | main.rs:186:18:186:18 | y | provenance | |
|
||||
| main.rs:195:9:195:9 | s [MyTupleStruct(0)] | main.rs:199:11:199:11 | s [MyTupleStruct(0)] | provenance | |
|
||||
| main.rs:195:13:195:40 | MyTupleStruct(...) [MyTupleStruct(0)] | main.rs:195:9:195:9 | s [MyTupleStruct(0)] | provenance | |
|
||||
| main.rs:195:27:195:36 | source(...) | main.rs:195:13:195:40 | MyTupleStruct(...) [MyTupleStruct(0)] | provenance | |
|
||||
| main.rs:199:11:199:11 | s [MyTupleStruct(0)] | main.rs:200:9:200:27 | MyTupleStruct(...) [MyTupleStruct(0)] | provenance | |
|
||||
| main.rs:200:9:200:27 | MyTupleStruct(...) [MyTupleStruct(0)] | main.rs:200:23:200:23 | x | provenance | |
|
||||
| main.rs:200:23:200:23 | x | main.rs:201:18:201:18 | x | provenance | |
|
||||
| main.rs:211:9:211:10 | s1 [Some] | main.rs:213:11:213:12 | s1 [Some] | provenance | |
|
||||
| main.rs:211:14:211:29 | Some(...) [Some] | main.rs:211:9:211:10 | s1 [Some] | provenance | |
|
||||
| main.rs:211:19:211:28 | source(...) | main.rs:211:14:211:29 | Some(...) [Some] | provenance | |
|
||||
| main.rs:213:11:213:12 | s1 [Some] | main.rs:214:9:214:15 | Some(...) [Some] | provenance | |
|
||||
| main.rs:214:9:214:15 | Some(...) [Some] | main.rs:214:14:214:14 | n | provenance | |
|
||||
| main.rs:214:14:214:14 | n | main.rs:214:25:214:25 | n | provenance | |
|
||||
| main.rs:224:9:224:10 | s1 [Some] | main.rs:225:10:225:11 | s1 [Some] | provenance | |
|
||||
| main.rs:211:14:211:37 | ...::Some(...) [Some] | main.rs:211:9:211:10 | s1 [Some] | provenance | |
|
||||
| main.rs:211:27:211:36 | source(...) | main.rs:211:14:211:37 | ...::Some(...) [Some] | provenance | |
|
||||
| main.rs:213:11:213:12 | s1 [Some] | main.rs:214:9:214:23 | ...::Some(...) [Some] | provenance | |
|
||||
| main.rs:214:9:214:23 | ...::Some(...) [Some] | main.rs:214:22:214:22 | n | provenance | |
|
||||
| main.rs:214:22:214:22 | n | main.rs:214:33:214:33 | n | provenance | |
|
||||
| main.rs:224:9:224:10 | s1 [Some] | main.rs:226:11:226:12 | s1 [Some] | provenance | |
|
||||
| main.rs:224:14:224:29 | Some(...) [Some] | main.rs:224:9:224:10 | s1 [Some] | provenance | |
|
||||
| main.rs:224:19:224:28 | source(...) | main.rs:224:14:224:29 | Some(...) [Some] | provenance | |
|
||||
| main.rs:225:10:225:11 | s1 [Some] | main.rs:225:10:225:20 | s1.unwrap(...) | provenance | MaD:1 |
|
||||
| main.rs:229:9:229:10 | s1 [Some] | main.rs:230:10:230:11 | s1 [Some] | provenance | |
|
||||
| main.rs:229:14:229:29 | Some(...) [Some] | main.rs:229:9:229:10 | s1 [Some] | provenance | |
|
||||
| main.rs:229:19:229:28 | source(...) | main.rs:229:14:229:29 | Some(...) [Some] | provenance | |
|
||||
| main.rs:230:10:230:11 | s1 [Some] | main.rs:230:10:230:24 | s1.unwrap_or(...) | provenance | MaD:3 |
|
||||
| main.rs:233:23:233:32 | source(...) | main.rs:233:10:233:33 | s2.unwrap_or(...) | provenance | MaD:2 |
|
||||
| main.rs:237:9:237:10 | s1 [Some] | main.rs:239:14:239:15 | s1 [Some] | provenance | |
|
||||
| main.rs:226:11:226:12 | s1 [Some] | main.rs:227:9:227:15 | Some(...) [Some] | provenance | |
|
||||
| main.rs:227:9:227:15 | Some(...) [Some] | main.rs:227:14:227:14 | n | provenance | |
|
||||
| main.rs:227:14:227:14 | n | main.rs:227:25:227:25 | n | provenance | |
|
||||
| main.rs:237:9:237:10 | s1 [Some] | main.rs:238:10:238:11 | s1 [Some] | provenance | |
|
||||
| main.rs:237:14:237:29 | Some(...) [Some] | main.rs:237:9:237:10 | s1 [Some] | provenance | |
|
||||
| main.rs:237:19:237:28 | source(...) | main.rs:237:14:237:29 | Some(...) [Some] | provenance | |
|
||||
| main.rs:239:9:239:10 | i1 | main.rs:240:10:240:11 | i1 | provenance | |
|
||||
| main.rs:239:14:239:15 | s1 [Some] | main.rs:239:14:239:16 | TryExpr | provenance | |
|
||||
| main.rs:239:14:239:16 | TryExpr | main.rs:239:9:239:10 | i1 | provenance | |
|
||||
| main.rs:246:9:246:10 | s1 [Ok] | main.rs:249:14:249:15 | s1 [Ok] | provenance | |
|
||||
| main.rs:246:32:246:45 | Ok(...) [Ok] | main.rs:246:9:246:10 | s1 [Ok] | provenance | |
|
||||
| main.rs:246:35:246:44 | source(...) | main.rs:246:32:246:45 | Ok(...) [Ok] | provenance | |
|
||||
| main.rs:249:9:249:10 | i1 | main.rs:251:10:251:11 | i1 | provenance | |
|
||||
| main.rs:249:14:249:15 | s1 [Ok] | main.rs:249:14:249:16 | TryExpr | provenance | |
|
||||
| main.rs:249:14:249:16 | TryExpr | main.rs:249:9:249:10 | i1 | provenance | |
|
||||
| main.rs:264:9:264:10 | s1 [A] | main.rs:266:11:266:12 | s1 [A] | provenance | |
|
||||
| main.rs:264:14:264:39 | ...::A(...) [A] | main.rs:264:9:264:10 | s1 [A] | provenance | |
|
||||
| main.rs:264:29:264:38 | source(...) | main.rs:264:14:264:39 | ...::A(...) [A] | provenance | |
|
||||
| main.rs:266:11:266:12 | s1 [A] | main.rs:267:9:267:25 | ...::A(...) [A] | provenance | |
|
||||
| main.rs:266:11:266:12 | s1 [A] | main.rs:270:11:270:12 | s1 [A] | provenance | |
|
||||
| main.rs:267:9:267:25 | ...::A(...) [A] | main.rs:267:24:267:24 | n | provenance | |
|
||||
| main.rs:267:24:267:24 | n | main.rs:267:35:267:35 | n | provenance | |
|
||||
| main.rs:270:11:270:12 | s1 [A] | main.rs:271:9:271:25 | ...::A(...) [A] | provenance | |
|
||||
| main.rs:271:9:271:25 | ...::A(...) [A] | main.rs:271:24:271:24 | n | provenance | |
|
||||
| main.rs:271:24:271:24 | n | main.rs:271:55:271:55 | n | provenance | |
|
||||
| main.rs:282:9:282:10 | s1 [A] | main.rs:284:11:284:12 | s1 [A] | provenance | |
|
||||
| main.rs:282:14:282:26 | A(...) [A] | main.rs:282:9:282:10 | s1 [A] | provenance | |
|
||||
| main.rs:282:16:282:25 | source(...) | main.rs:282:14:282:26 | A(...) [A] | provenance | |
|
||||
| main.rs:284:11:284:12 | s1 [A] | main.rs:285:9:285:12 | A(...) [A] | provenance | |
|
||||
| main.rs:284:11:284:12 | s1 [A] | main.rs:288:11:288:12 | s1 [A] | provenance | |
|
||||
| main.rs:285:9:285:12 | A(...) [A] | main.rs:285:11:285:11 | n | provenance | |
|
||||
| main.rs:285:11:285:11 | n | main.rs:285:22:285:22 | n | provenance | |
|
||||
| main.rs:288:11:288:12 | s1 [A] | main.rs:289:9:289:12 | A(...) [A] | provenance | |
|
||||
| main.rs:289:9:289:12 | A(...) [A] | main.rs:289:11:289:11 | n | provenance | |
|
||||
| main.rs:289:11:289:11 | n | main.rs:289:29:289:29 | n | provenance | |
|
||||
| main.rs:303:9:303:10 | s1 [C] | main.rs:307:11:307:12 | s1 [C] | provenance | |
|
||||
| main.rs:303:14:305:5 | ...::C {...} [C] | main.rs:303:9:303:10 | s1 [C] | provenance | |
|
||||
| main.rs:304:18:304:27 | source(...) | main.rs:303:14:305:5 | ...::C {...} [C] | provenance | |
|
||||
| main.rs:307:11:307:12 | s1 [C] | main.rs:308:9:308:38 | ...::C {...} [C] | provenance | |
|
||||
| main.rs:307:11:307:12 | s1 [C] | main.rs:311:11:311:12 | s1 [C] | provenance | |
|
||||
| main.rs:308:9:308:38 | ...::C {...} [C] | main.rs:308:36:308:36 | n | provenance | |
|
||||
| main.rs:308:36:308:36 | n | main.rs:308:48:308:48 | n | provenance | |
|
||||
| main.rs:311:11:311:12 | s1 [C] | main.rs:312:9:312:38 | ...::C {...} [C] | provenance | |
|
||||
| main.rs:312:9:312:38 | ...::C {...} [C] | main.rs:312:36:312:36 | n | provenance | |
|
||||
| main.rs:312:36:312:36 | n | main.rs:312:81:312:81 | n | provenance | |
|
||||
| main.rs:323:9:323:10 | s1 [C] | main.rs:327:11:327:12 | s1 [C] | provenance | |
|
||||
| main.rs:323:14:325:5 | C {...} [C] | main.rs:323:9:323:10 | s1 [C] | provenance | |
|
||||
| main.rs:324:18:324:27 | source(...) | main.rs:323:14:325:5 | C {...} [C] | provenance | |
|
||||
| main.rs:327:11:327:12 | s1 [C] | main.rs:328:9:328:24 | C {...} [C] | provenance | |
|
||||
| main.rs:327:11:327:12 | s1 [C] | main.rs:331:11:331:12 | s1 [C] | provenance | |
|
||||
| main.rs:328:9:328:24 | C {...} [C] | main.rs:328:22:328:22 | n | provenance | |
|
||||
| main.rs:328:22:328:22 | n | main.rs:328:34:328:34 | n | provenance | |
|
||||
| main.rs:331:11:331:12 | s1 [C] | main.rs:332:9:332:24 | C {...} [C] | provenance | |
|
||||
| main.rs:332:9:332:24 | C {...} [C] | main.rs:332:22:332:22 | n | provenance | |
|
||||
| main.rs:332:22:332:22 | n | main.rs:332:53:332:53 | n | provenance | |
|
||||
| main.rs:344:9:344:12 | arr1 [array[]] | main.rs:345:14:345:17 | arr1 [array[]] | provenance | |
|
||||
| main.rs:344:16:344:33 | [...] [array[]] | main.rs:344:9:344:12 | arr1 [array[]] | provenance | |
|
||||
| main.rs:344:23:344:32 | source(...) | main.rs:344:16:344:33 | [...] [array[]] | provenance | |
|
||||
| main.rs:345:9:345:10 | n1 | main.rs:346:10:346:11 | n1 | provenance | |
|
||||
| main.rs:345:14:345:17 | arr1 [array[]] | main.rs:345:14:345:20 | arr1[2] | provenance | |
|
||||
| main.rs:345:14:345:20 | arr1[2] | main.rs:345:9:345:10 | n1 | provenance | |
|
||||
| main.rs:348:9:348:12 | arr2 [array[]] | main.rs:349:14:349:17 | arr2 [array[]] | provenance | |
|
||||
| main.rs:348:16:348:31 | [...; 10] [array[]] | main.rs:348:9:348:12 | arr2 [array[]] | provenance | |
|
||||
| main.rs:348:17:348:26 | source(...) | main.rs:348:16:348:31 | [...; 10] [array[]] | provenance | |
|
||||
| main.rs:349:9:349:10 | n2 | main.rs:350:10:350:11 | n2 | provenance | |
|
||||
| main.rs:349:14:349:17 | arr2 [array[]] | main.rs:349:14:349:20 | arr2[4] | provenance | |
|
||||
| main.rs:349:14:349:20 | arr2[4] | main.rs:349:9:349:10 | n2 | provenance | |
|
||||
| main.rs:358:9:358:12 | arr1 [array[]] | main.rs:359:15:359:18 | arr1 [array[]] | provenance | |
|
||||
| main.rs:358:16:358:33 | [...] [array[]] | main.rs:358:9:358:12 | arr1 [array[]] | provenance | |
|
||||
| main.rs:358:23:358:32 | source(...) | main.rs:358:16:358:33 | [...] [array[]] | provenance | |
|
||||
| main.rs:359:9:359:10 | n1 | main.rs:360:14:360:15 | n1 | provenance | |
|
||||
| main.rs:359:15:359:18 | arr1 [array[]] | main.rs:359:9:359:10 | n1 | provenance | |
|
||||
| main.rs:370:9:370:12 | arr1 [array[]] | main.rs:371:11:371:14 | arr1 [array[]] | provenance | |
|
||||
| main.rs:370:16:370:33 | [...] [array[]] | main.rs:370:9:370:12 | arr1 [array[]] | provenance | |
|
||||
| main.rs:370:23:370:32 | source(...) | main.rs:370:16:370:33 | [...] [array[]] | provenance | |
|
||||
| main.rs:371:11:371:14 | arr1 [array[]] | main.rs:372:9:372:17 | SlicePat [array[]] | provenance | |
|
||||
| main.rs:372:9:372:17 | SlicePat [array[]] | main.rs:372:10:372:10 | a | provenance | |
|
||||
| main.rs:372:9:372:17 | SlicePat [array[]] | main.rs:372:13:372:13 | b | provenance | |
|
||||
| main.rs:372:9:372:17 | SlicePat [array[]] | main.rs:372:16:372:16 | c | provenance | |
|
||||
| main.rs:372:10:372:10 | a | main.rs:373:18:373:18 | a | provenance | |
|
||||
| main.rs:372:13:372:13 | b | main.rs:374:18:374:18 | b | provenance | |
|
||||
| main.rs:372:16:372:16 | c | main.rs:375:18:375:18 | c | provenance | |
|
||||
| main.rs:384:5:384:11 | [post] mut_arr [array[]] | main.rs:385:13:385:19 | mut_arr [array[]] | provenance | |
|
||||
| main.rs:384:5:384:11 | [post] mut_arr [array[]] | main.rs:387:10:387:16 | mut_arr [array[]] | provenance | |
|
||||
| main.rs:384:18:384:27 | source(...) | main.rs:384:5:384:11 | [post] mut_arr [array[]] | provenance | |
|
||||
| main.rs:385:9:385:9 | d | main.rs:386:10:386:10 | d | provenance | |
|
||||
| main.rs:385:13:385:19 | mut_arr [array[]] | main.rs:385:13:385:22 | mut_arr[1] | provenance | |
|
||||
| main.rs:385:13:385:22 | mut_arr[1] | main.rs:385:9:385:9 | d | provenance | |
|
||||
| main.rs:387:10:387:16 | mut_arr [array[]] | main.rs:387:10:387:19 | mut_arr[0] | provenance | |
|
||||
| main.rs:410:9:410:9 | s | main.rs:411:10:411:10 | s | provenance | |
|
||||
| main.rs:410:25:410:26 | source(...) | main.rs:410:9:410:9 | s | provenance | |
|
||||
| main.rs:238:10:238:11 | s1 [Some] | main.rs:238:10:238:20 | s1.unwrap(...) | provenance | MaD:1 |
|
||||
| main.rs:242:9:242:10 | s1 [Some] | main.rs:243:10:243:11 | s1 [Some] | provenance | |
|
||||
| main.rs:242:14:242:29 | Some(...) [Some] | main.rs:242:9:242:10 | s1 [Some] | provenance | |
|
||||
| main.rs:242:19:242:28 | source(...) | main.rs:242:14:242:29 | Some(...) [Some] | provenance | |
|
||||
| main.rs:243:10:243:11 | s1 [Some] | main.rs:243:10:243:24 | s1.unwrap_or(...) | provenance | MaD:3 |
|
||||
| main.rs:246:23:246:32 | source(...) | main.rs:246:10:246:33 | s2.unwrap_or(...) | provenance | MaD:2 |
|
||||
| main.rs:250:9:250:10 | s1 [Some] | main.rs:251:10:251:11 | s1 [Some] | provenance | |
|
||||
| main.rs:250:14:250:29 | Some(...) [Some] | main.rs:250:9:250:10 | s1 [Some] | provenance | |
|
||||
| main.rs:250:19:250:28 | source(...) | main.rs:250:14:250:29 | Some(...) [Some] | provenance | |
|
||||
| main.rs:251:10:251:11 | s1 [Some] | main.rs:251:10:251:32 | s1.unwrap_or_else(...) | provenance | MaD:5 |
|
||||
| main.rs:254:31:254:40 | source(...) | main.rs:254:10:254:41 | s2.unwrap_or_else(...) | provenance | MaD:4 |
|
||||
| main.rs:258:9:258:10 | s1 [Some] | main.rs:260:14:260:15 | s1 [Some] | provenance | |
|
||||
| main.rs:258:14:258:29 | Some(...) [Some] | main.rs:258:9:258:10 | s1 [Some] | provenance | |
|
||||
| main.rs:258:19:258:28 | source(...) | main.rs:258:14:258:29 | Some(...) [Some] | provenance | |
|
||||
| main.rs:260:9:260:10 | i1 | main.rs:261:10:261:11 | i1 | provenance | |
|
||||
| main.rs:260:14:260:15 | s1 [Some] | main.rs:260:14:260:16 | TryExpr | provenance | |
|
||||
| main.rs:260:14:260:16 | TryExpr | main.rs:260:9:260:10 | i1 | provenance | |
|
||||
| main.rs:267:9:267:10 | s1 [Ok] | main.rs:270:14:270:15 | s1 [Ok] | provenance | |
|
||||
| main.rs:267:32:267:45 | Ok(...) [Ok] | main.rs:267:9:267:10 | s1 [Ok] | provenance | |
|
||||
| main.rs:267:35:267:44 | source(...) | main.rs:267:32:267:45 | Ok(...) [Ok] | provenance | |
|
||||
| main.rs:270:9:270:10 | i1 | main.rs:272:10:272:11 | i1 | provenance | |
|
||||
| main.rs:270:14:270:15 | s1 [Ok] | main.rs:270:14:270:16 | TryExpr | provenance | |
|
||||
| main.rs:270:14:270:16 | TryExpr | main.rs:270:9:270:10 | i1 | provenance | |
|
||||
| main.rs:280:9:280:10 | s1 [Ok] | main.rs:281:10:281:11 | s1 [Ok] | provenance | |
|
||||
| main.rs:280:32:280:45 | Ok(...) [Ok] | main.rs:280:9:280:10 | s1 [Ok] | provenance | |
|
||||
| main.rs:280:35:280:44 | source(...) | main.rs:280:32:280:45 | Ok(...) [Ok] | provenance | |
|
||||
| main.rs:281:10:281:11 | s1 [Ok] | main.rs:281:10:281:22 | s1.expect(...) | provenance | MaD:6 |
|
||||
| main.rs:284:9:284:10 | s2 [Err] | main.rs:286:10:286:11 | s2 [Err] | provenance | |
|
||||
| main.rs:284:32:284:46 | Err(...) [Err] | main.rs:284:9:284:10 | s2 [Err] | provenance | |
|
||||
| main.rs:284:36:284:45 | source(...) | main.rs:284:32:284:46 | Err(...) [Err] | provenance | |
|
||||
| main.rs:286:10:286:11 | s2 [Err] | main.rs:286:10:286:26 | s2.expect_err(...) | provenance | MaD:7 |
|
||||
| main.rs:295:9:295:10 | s1 [A] | main.rs:297:11:297:12 | s1 [A] | provenance | |
|
||||
| main.rs:295:14:295:39 | ...::A(...) [A] | main.rs:295:9:295:10 | s1 [A] | provenance | |
|
||||
| main.rs:295:29:295:38 | source(...) | main.rs:295:14:295:39 | ...::A(...) [A] | provenance | |
|
||||
| main.rs:297:11:297:12 | s1 [A] | main.rs:298:9:298:25 | ...::A(...) [A] | provenance | |
|
||||
| main.rs:297:11:297:12 | s1 [A] | main.rs:301:11:301:12 | s1 [A] | provenance | |
|
||||
| main.rs:298:9:298:25 | ...::A(...) [A] | main.rs:298:24:298:24 | n | provenance | |
|
||||
| main.rs:298:24:298:24 | n | main.rs:298:35:298:35 | n | provenance | |
|
||||
| main.rs:301:11:301:12 | s1 [A] | main.rs:302:9:302:25 | ...::A(...) [A] | provenance | |
|
||||
| main.rs:302:9:302:25 | ...::A(...) [A] | main.rs:302:24:302:24 | n | provenance | |
|
||||
| main.rs:302:24:302:24 | n | main.rs:302:55:302:55 | n | provenance | |
|
||||
| main.rs:313:9:313:10 | s1 [A] | main.rs:315:11:315:12 | s1 [A] | provenance | |
|
||||
| main.rs:313:14:313:26 | A(...) [A] | main.rs:313:9:313:10 | s1 [A] | provenance | |
|
||||
| main.rs:313:16:313:25 | source(...) | main.rs:313:14:313:26 | A(...) [A] | provenance | |
|
||||
| main.rs:315:11:315:12 | s1 [A] | main.rs:316:9:316:12 | A(...) [A] | provenance | |
|
||||
| main.rs:315:11:315:12 | s1 [A] | main.rs:319:11:319:12 | s1 [A] | provenance | |
|
||||
| main.rs:316:9:316:12 | A(...) [A] | main.rs:316:11:316:11 | n | provenance | |
|
||||
| main.rs:316:11:316:11 | n | main.rs:316:22:316:22 | n | provenance | |
|
||||
| main.rs:319:11:319:12 | s1 [A] | main.rs:320:9:320:12 | A(...) [A] | provenance | |
|
||||
| main.rs:320:9:320:12 | A(...) [A] | main.rs:320:11:320:11 | n | provenance | |
|
||||
| main.rs:320:11:320:11 | n | main.rs:320:29:320:29 | n | provenance | |
|
||||
| main.rs:334:9:334:10 | s1 [C] | main.rs:338:11:338:12 | s1 [C] | provenance | |
|
||||
| main.rs:334:14:336:5 | ...::C {...} [C] | main.rs:334:9:334:10 | s1 [C] | provenance | |
|
||||
| main.rs:335:18:335:27 | source(...) | main.rs:334:14:336:5 | ...::C {...} [C] | provenance | |
|
||||
| main.rs:338:11:338:12 | s1 [C] | main.rs:339:9:339:38 | ...::C {...} [C] | provenance | |
|
||||
| main.rs:338:11:338:12 | s1 [C] | main.rs:342:11:342:12 | s1 [C] | provenance | |
|
||||
| main.rs:339:9:339:38 | ...::C {...} [C] | main.rs:339:36:339:36 | n | provenance | |
|
||||
| main.rs:339:36:339:36 | n | main.rs:339:48:339:48 | n | provenance | |
|
||||
| main.rs:342:11:342:12 | s1 [C] | main.rs:343:9:343:38 | ...::C {...} [C] | provenance | |
|
||||
| main.rs:343:9:343:38 | ...::C {...} [C] | main.rs:343:36:343:36 | n | provenance | |
|
||||
| main.rs:343:36:343:36 | n | main.rs:343:81:343:81 | n | provenance | |
|
||||
| main.rs:354:9:354:10 | s1 [C] | main.rs:358:11:358:12 | s1 [C] | provenance | |
|
||||
| main.rs:354:14:356:5 | C {...} [C] | main.rs:354:9:354:10 | s1 [C] | provenance | |
|
||||
| main.rs:355:18:355:27 | source(...) | main.rs:354:14:356:5 | C {...} [C] | provenance | |
|
||||
| main.rs:358:11:358:12 | s1 [C] | main.rs:359:9:359:24 | C {...} [C] | provenance | |
|
||||
| main.rs:358:11:358:12 | s1 [C] | main.rs:362:11:362:12 | s1 [C] | provenance | |
|
||||
| main.rs:359:9:359:24 | C {...} [C] | main.rs:359:22:359:22 | n | provenance | |
|
||||
| main.rs:359:22:359:22 | n | main.rs:359:34:359:34 | n | provenance | |
|
||||
| main.rs:362:11:362:12 | s1 [C] | main.rs:363:9:363:24 | C {...} [C] | provenance | |
|
||||
| main.rs:363:9:363:24 | C {...} [C] | main.rs:363:22:363:22 | n | provenance | |
|
||||
| main.rs:363:22:363:22 | n | main.rs:363:53:363:53 | n | provenance | |
|
||||
| main.rs:375:9:375:12 | arr1 [element] | main.rs:376:14:376:17 | arr1 [element] | provenance | |
|
||||
| main.rs:375:16:375:33 | [...] [element] | main.rs:375:9:375:12 | arr1 [element] | provenance | |
|
||||
| main.rs:375:23:375:32 | source(...) | main.rs:375:16:375:33 | [...] [element] | provenance | |
|
||||
| main.rs:376:9:376:10 | n1 | main.rs:377:10:377:11 | n1 | provenance | |
|
||||
| main.rs:376:14:376:17 | arr1 [element] | main.rs:376:14:376:20 | arr1[2] | provenance | |
|
||||
| main.rs:376:14:376:20 | arr1[2] | main.rs:376:9:376:10 | n1 | provenance | |
|
||||
| main.rs:379:9:379:12 | arr2 [element] | main.rs:380:14:380:17 | arr2 [element] | provenance | |
|
||||
| main.rs:379:16:379:31 | [...; 10] [element] | main.rs:379:9:379:12 | arr2 [element] | provenance | |
|
||||
| main.rs:379:17:379:26 | source(...) | main.rs:379:16:379:31 | [...; 10] [element] | provenance | |
|
||||
| main.rs:380:9:380:10 | n2 | main.rs:381:10:381:11 | n2 | provenance | |
|
||||
| main.rs:380:14:380:17 | arr2 [element] | main.rs:380:14:380:20 | arr2[4] | provenance | |
|
||||
| main.rs:380:14:380:20 | arr2[4] | main.rs:380:9:380:10 | n2 | provenance | |
|
||||
| main.rs:389:9:389:12 | arr1 [element] | main.rs:390:15:390:18 | arr1 [element] | provenance | |
|
||||
| main.rs:389:16:389:33 | [...] [element] | main.rs:389:9:389:12 | arr1 [element] | provenance | |
|
||||
| main.rs:389:23:389:32 | source(...) | main.rs:389:16:389:33 | [...] [element] | provenance | |
|
||||
| main.rs:390:9:390:10 | n1 | main.rs:391:14:391:15 | n1 | provenance | |
|
||||
| main.rs:390:15:390:18 | arr1 [element] | main.rs:390:9:390:10 | n1 | provenance | |
|
||||
| main.rs:401:9:401:12 | arr1 [element] | main.rs:402:11:402:14 | arr1 [element] | provenance | |
|
||||
| main.rs:401:16:401:33 | [...] [element] | main.rs:401:9:401:12 | arr1 [element] | provenance | |
|
||||
| main.rs:401:23:401:32 | source(...) | main.rs:401:16:401:33 | [...] [element] | provenance | |
|
||||
| main.rs:402:11:402:14 | arr1 [element] | main.rs:403:9:403:17 | SlicePat [element] | provenance | |
|
||||
| main.rs:403:9:403:17 | SlicePat [element] | main.rs:403:10:403:10 | a | provenance | |
|
||||
| main.rs:403:9:403:17 | SlicePat [element] | main.rs:403:13:403:13 | b | provenance | |
|
||||
| main.rs:403:9:403:17 | SlicePat [element] | main.rs:403:16:403:16 | c | provenance | |
|
||||
| main.rs:403:10:403:10 | a | main.rs:404:18:404:18 | a | provenance | |
|
||||
| main.rs:403:13:403:13 | b | main.rs:405:18:405:18 | b | provenance | |
|
||||
| main.rs:403:16:403:16 | c | main.rs:406:18:406:18 | c | provenance | |
|
||||
| main.rs:415:5:415:11 | [post] mut_arr [element] | main.rs:416:13:416:19 | mut_arr [element] | provenance | |
|
||||
| main.rs:415:5:415:11 | [post] mut_arr [element] | main.rs:418:10:418:16 | mut_arr [element] | provenance | |
|
||||
| main.rs:415:18:415:27 | source(...) | main.rs:415:5:415:11 | [post] mut_arr [element] | provenance | |
|
||||
| main.rs:416:9:416:9 | d | main.rs:417:10:417:10 | d | provenance | |
|
||||
| main.rs:416:13:416:19 | mut_arr [element] | main.rs:416:13:416:22 | mut_arr[1] | provenance | |
|
||||
| main.rs:416:13:416:22 | mut_arr[1] | main.rs:416:9:416:9 | d | provenance | |
|
||||
| main.rs:418:10:418:16 | mut_arr [element] | main.rs:418:10:418:19 | mut_arr[0] | provenance | |
|
||||
| main.rs:441:9:441:9 | s | main.rs:442:10:442:10 | s | provenance | |
|
||||
| main.rs:441:25:441:26 | source(...) | main.rs:441:9:441:9 | s | provenance | |
|
||||
nodes
|
||||
| main.rs:15:10:15:18 | source(...) | semmle.label | source(...) |
|
||||
| main.rs:19:9:19:9 | s | semmle.label | s |
|
||||
@@ -209,132 +242,167 @@ nodes
|
||||
| main.rs:151:9:151:28 | Point {...} [Point.x] | semmle.label | Point {...} [Point.x] |
|
||||
| main.rs:151:20:151:20 | a | semmle.label | a |
|
||||
| main.rs:152:10:152:10 | a | semmle.label | a |
|
||||
| main.rs:198:9:198:10 | s1 [Some] | semmle.label | s1 [Some] |
|
||||
| main.rs:198:14:198:37 | ...::Some(...) [Some] | semmle.label | ...::Some(...) [Some] |
|
||||
| main.rs:198:27:198:36 | source(...) | semmle.label | source(...) |
|
||||
| main.rs:200:11:200:12 | s1 [Some] | semmle.label | s1 [Some] |
|
||||
| main.rs:201:9:201:23 | ...::Some(...) [Some] | semmle.label | ...::Some(...) [Some] |
|
||||
| main.rs:201:22:201:22 | n | semmle.label | n |
|
||||
| main.rs:201:33:201:33 | n | semmle.label | n |
|
||||
| main.rs:175:9:175:9 | y | semmle.label | y |
|
||||
| main.rs:175:13:175:22 | source(...) | semmle.label | source(...) |
|
||||
| main.rs:176:9:176:9 | p [Point3D.plane, Point.y] | semmle.label | p [Point3D.plane, Point.y] |
|
||||
| main.rs:176:13:179:5 | Point3D {...} [Point3D.plane, Point.y] | semmle.label | Point3D {...} [Point3D.plane, Point.y] |
|
||||
| main.rs:177:16:177:32 | Point {...} [Point.y] | semmle.label | Point {...} [Point.y] |
|
||||
| main.rs:177:30:177:30 | y | semmle.label | y |
|
||||
| main.rs:180:11:180:11 | p [Point3D.plane, Point.y] | semmle.label | p [Point3D.plane, Point.y] |
|
||||
| main.rs:181:9:184:9 | Point3D {...} [Point3D.plane, Point.y] | semmle.label | Point3D {...} [Point3D.plane, Point.y] |
|
||||
| main.rs:182:20:182:33 | Point {...} [Point.y] | semmle.label | Point {...} [Point.y] |
|
||||
| main.rs:182:31:182:31 | y | semmle.label | y |
|
||||
| main.rs:186:18:186:18 | y | semmle.label | y |
|
||||
| main.rs:195:9:195:9 | s [MyTupleStruct(0)] | semmle.label | s [MyTupleStruct(0)] |
|
||||
| main.rs:195:13:195:40 | MyTupleStruct(...) [MyTupleStruct(0)] | semmle.label | MyTupleStruct(...) [MyTupleStruct(0)] |
|
||||
| main.rs:195:27:195:36 | source(...) | semmle.label | source(...) |
|
||||
| main.rs:199:11:199:11 | s [MyTupleStruct(0)] | semmle.label | s [MyTupleStruct(0)] |
|
||||
| main.rs:200:9:200:27 | MyTupleStruct(...) [MyTupleStruct(0)] | semmle.label | MyTupleStruct(...) [MyTupleStruct(0)] |
|
||||
| main.rs:200:23:200:23 | x | semmle.label | x |
|
||||
| main.rs:201:18:201:18 | x | semmle.label | x |
|
||||
| main.rs:211:9:211:10 | s1 [Some] | semmle.label | s1 [Some] |
|
||||
| main.rs:211:14:211:29 | Some(...) [Some] | semmle.label | Some(...) [Some] |
|
||||
| main.rs:211:19:211:28 | source(...) | semmle.label | source(...) |
|
||||
| main.rs:211:14:211:37 | ...::Some(...) [Some] | semmle.label | ...::Some(...) [Some] |
|
||||
| main.rs:211:27:211:36 | source(...) | semmle.label | source(...) |
|
||||
| main.rs:213:11:213:12 | s1 [Some] | semmle.label | s1 [Some] |
|
||||
| main.rs:214:9:214:15 | Some(...) [Some] | semmle.label | Some(...) [Some] |
|
||||
| main.rs:214:14:214:14 | n | semmle.label | n |
|
||||
| main.rs:214:25:214:25 | n | semmle.label | n |
|
||||
| main.rs:214:9:214:23 | ...::Some(...) [Some] | semmle.label | ...::Some(...) [Some] |
|
||||
| main.rs:214:22:214:22 | n | semmle.label | n |
|
||||
| main.rs:214:33:214:33 | n | semmle.label | n |
|
||||
| main.rs:224:9:224:10 | s1 [Some] | semmle.label | s1 [Some] |
|
||||
| main.rs:224:14:224:29 | Some(...) [Some] | semmle.label | Some(...) [Some] |
|
||||
| main.rs:224:19:224:28 | source(...) | semmle.label | source(...) |
|
||||
| main.rs:225:10:225:11 | s1 [Some] | semmle.label | s1 [Some] |
|
||||
| main.rs:225:10:225:20 | s1.unwrap(...) | semmle.label | s1.unwrap(...) |
|
||||
| main.rs:229:9:229:10 | s1 [Some] | semmle.label | s1 [Some] |
|
||||
| main.rs:229:14:229:29 | Some(...) [Some] | semmle.label | Some(...) [Some] |
|
||||
| main.rs:229:19:229:28 | source(...) | semmle.label | source(...) |
|
||||
| main.rs:230:10:230:11 | s1 [Some] | semmle.label | s1 [Some] |
|
||||
| main.rs:230:10:230:24 | s1.unwrap_or(...) | semmle.label | s1.unwrap_or(...) |
|
||||
| main.rs:233:10:233:33 | s2.unwrap_or(...) | semmle.label | s2.unwrap_or(...) |
|
||||
| main.rs:233:23:233:32 | source(...) | semmle.label | source(...) |
|
||||
| main.rs:226:11:226:12 | s1 [Some] | semmle.label | s1 [Some] |
|
||||
| main.rs:227:9:227:15 | Some(...) [Some] | semmle.label | Some(...) [Some] |
|
||||
| main.rs:227:14:227:14 | n | semmle.label | n |
|
||||
| main.rs:227:25:227:25 | n | semmle.label | n |
|
||||
| main.rs:237:9:237:10 | s1 [Some] | semmle.label | s1 [Some] |
|
||||
| main.rs:237:14:237:29 | Some(...) [Some] | semmle.label | Some(...) [Some] |
|
||||
| main.rs:237:19:237:28 | source(...) | semmle.label | source(...) |
|
||||
| main.rs:239:9:239:10 | i1 | semmle.label | i1 |
|
||||
| main.rs:239:14:239:15 | s1 [Some] | semmle.label | s1 [Some] |
|
||||
| main.rs:239:14:239:16 | TryExpr | semmle.label | TryExpr |
|
||||
| main.rs:240:10:240:11 | i1 | semmle.label | i1 |
|
||||
| main.rs:246:9:246:10 | s1 [Ok] | semmle.label | s1 [Ok] |
|
||||
| main.rs:246:32:246:45 | Ok(...) [Ok] | semmle.label | Ok(...) [Ok] |
|
||||
| main.rs:246:35:246:44 | source(...) | semmle.label | source(...) |
|
||||
| main.rs:249:9:249:10 | i1 | semmle.label | i1 |
|
||||
| main.rs:249:14:249:15 | s1 [Ok] | semmle.label | s1 [Ok] |
|
||||
| main.rs:249:14:249:16 | TryExpr | semmle.label | TryExpr |
|
||||
| main.rs:251:10:251:11 | i1 | semmle.label | i1 |
|
||||
| main.rs:264:9:264:10 | s1 [A] | semmle.label | s1 [A] |
|
||||
| main.rs:264:14:264:39 | ...::A(...) [A] | semmle.label | ...::A(...) [A] |
|
||||
| main.rs:264:29:264:38 | source(...) | semmle.label | source(...) |
|
||||
| main.rs:266:11:266:12 | s1 [A] | semmle.label | s1 [A] |
|
||||
| main.rs:267:9:267:25 | ...::A(...) [A] | semmle.label | ...::A(...) [A] |
|
||||
| main.rs:267:24:267:24 | n | semmle.label | n |
|
||||
| main.rs:267:35:267:35 | n | semmle.label | n |
|
||||
| main.rs:270:11:270:12 | s1 [A] | semmle.label | s1 [A] |
|
||||
| main.rs:271:9:271:25 | ...::A(...) [A] | semmle.label | ...::A(...) [A] |
|
||||
| main.rs:271:24:271:24 | n | semmle.label | n |
|
||||
| main.rs:271:55:271:55 | n | semmle.label | n |
|
||||
| main.rs:282:9:282:10 | s1 [A] | semmle.label | s1 [A] |
|
||||
| main.rs:282:14:282:26 | A(...) [A] | semmle.label | A(...) [A] |
|
||||
| main.rs:282:16:282:25 | source(...) | semmle.label | source(...) |
|
||||
| main.rs:284:11:284:12 | s1 [A] | semmle.label | s1 [A] |
|
||||
| main.rs:285:9:285:12 | A(...) [A] | semmle.label | A(...) [A] |
|
||||
| main.rs:285:11:285:11 | n | semmle.label | n |
|
||||
| main.rs:285:22:285:22 | n | semmle.label | n |
|
||||
| main.rs:288:11:288:12 | s1 [A] | semmle.label | s1 [A] |
|
||||
| main.rs:289:9:289:12 | A(...) [A] | semmle.label | A(...) [A] |
|
||||
| main.rs:289:11:289:11 | n | semmle.label | n |
|
||||
| main.rs:289:29:289:29 | n | semmle.label | n |
|
||||
| main.rs:303:9:303:10 | s1 [C] | semmle.label | s1 [C] |
|
||||
| main.rs:303:14:305:5 | ...::C {...} [C] | semmle.label | ...::C {...} [C] |
|
||||
| main.rs:304:18:304:27 | source(...) | semmle.label | source(...) |
|
||||
| main.rs:307:11:307:12 | s1 [C] | semmle.label | s1 [C] |
|
||||
| main.rs:308:9:308:38 | ...::C {...} [C] | semmle.label | ...::C {...} [C] |
|
||||
| main.rs:308:36:308:36 | n | semmle.label | n |
|
||||
| main.rs:308:48:308:48 | n | semmle.label | n |
|
||||
| main.rs:311:11:311:12 | s1 [C] | semmle.label | s1 [C] |
|
||||
| main.rs:312:9:312:38 | ...::C {...} [C] | semmle.label | ...::C {...} [C] |
|
||||
| main.rs:312:36:312:36 | n | semmle.label | n |
|
||||
| main.rs:312:81:312:81 | n | semmle.label | n |
|
||||
| main.rs:323:9:323:10 | s1 [C] | semmle.label | s1 [C] |
|
||||
| main.rs:323:14:325:5 | C {...} [C] | semmle.label | C {...} [C] |
|
||||
| main.rs:324:18:324:27 | source(...) | semmle.label | source(...) |
|
||||
| main.rs:327:11:327:12 | s1 [C] | semmle.label | s1 [C] |
|
||||
| main.rs:328:9:328:24 | C {...} [C] | semmle.label | C {...} [C] |
|
||||
| main.rs:328:22:328:22 | n | semmle.label | n |
|
||||
| main.rs:328:34:328:34 | n | semmle.label | n |
|
||||
| main.rs:331:11:331:12 | s1 [C] | semmle.label | s1 [C] |
|
||||
| main.rs:332:9:332:24 | C {...} [C] | semmle.label | C {...} [C] |
|
||||
| main.rs:332:22:332:22 | n | semmle.label | n |
|
||||
| main.rs:332:53:332:53 | n | semmle.label | n |
|
||||
| main.rs:344:9:344:12 | arr1 [array[]] | semmle.label | arr1 [array[]] |
|
||||
| main.rs:344:16:344:33 | [...] [array[]] | semmle.label | [...] [array[]] |
|
||||
| main.rs:344:23:344:32 | source(...) | semmle.label | source(...) |
|
||||
| main.rs:345:9:345:10 | n1 | semmle.label | n1 |
|
||||
| main.rs:345:14:345:17 | arr1 [array[]] | semmle.label | arr1 [array[]] |
|
||||
| main.rs:345:14:345:20 | arr1[2] | semmle.label | arr1[2] |
|
||||
| main.rs:346:10:346:11 | n1 | semmle.label | n1 |
|
||||
| main.rs:348:9:348:12 | arr2 [array[]] | semmle.label | arr2 [array[]] |
|
||||
| main.rs:348:16:348:31 | [...; 10] [array[]] | semmle.label | [...; 10] [array[]] |
|
||||
| main.rs:348:17:348:26 | source(...) | semmle.label | source(...) |
|
||||
| main.rs:349:9:349:10 | n2 | semmle.label | n2 |
|
||||
| main.rs:349:14:349:17 | arr2 [array[]] | semmle.label | arr2 [array[]] |
|
||||
| main.rs:349:14:349:20 | arr2[4] | semmle.label | arr2[4] |
|
||||
| main.rs:350:10:350:11 | n2 | semmle.label | n2 |
|
||||
| main.rs:358:9:358:12 | arr1 [array[]] | semmle.label | arr1 [array[]] |
|
||||
| main.rs:358:16:358:33 | [...] [array[]] | semmle.label | [...] [array[]] |
|
||||
| main.rs:358:23:358:32 | source(...) | semmle.label | source(...) |
|
||||
| main.rs:359:9:359:10 | n1 | semmle.label | n1 |
|
||||
| main.rs:359:15:359:18 | arr1 [array[]] | semmle.label | arr1 [array[]] |
|
||||
| main.rs:360:14:360:15 | n1 | semmle.label | n1 |
|
||||
| main.rs:370:9:370:12 | arr1 [array[]] | semmle.label | arr1 [array[]] |
|
||||
| main.rs:370:16:370:33 | [...] [array[]] | semmle.label | [...] [array[]] |
|
||||
| main.rs:370:23:370:32 | source(...) | semmle.label | source(...) |
|
||||
| main.rs:371:11:371:14 | arr1 [array[]] | semmle.label | arr1 [array[]] |
|
||||
| main.rs:372:9:372:17 | SlicePat [array[]] | semmle.label | SlicePat [array[]] |
|
||||
| main.rs:372:10:372:10 | a | semmle.label | a |
|
||||
| main.rs:372:13:372:13 | b | semmle.label | b |
|
||||
| main.rs:372:16:372:16 | c | semmle.label | c |
|
||||
| main.rs:373:18:373:18 | a | semmle.label | a |
|
||||
| main.rs:374:18:374:18 | b | semmle.label | b |
|
||||
| main.rs:375:18:375:18 | c | semmle.label | c |
|
||||
| main.rs:384:5:384:11 | [post] mut_arr [array[]] | semmle.label | [post] mut_arr [array[]] |
|
||||
| main.rs:384:18:384:27 | source(...) | semmle.label | source(...) |
|
||||
| main.rs:385:9:385:9 | d | semmle.label | d |
|
||||
| main.rs:385:13:385:19 | mut_arr [array[]] | semmle.label | mut_arr [array[]] |
|
||||
| main.rs:385:13:385:22 | mut_arr[1] | semmle.label | mut_arr[1] |
|
||||
| main.rs:386:10:386:10 | d | semmle.label | d |
|
||||
| main.rs:387:10:387:16 | mut_arr [array[]] | semmle.label | mut_arr [array[]] |
|
||||
| main.rs:387:10:387:19 | mut_arr[0] | semmle.label | mut_arr[0] |
|
||||
| main.rs:410:9:410:9 | s | semmle.label | s |
|
||||
| main.rs:410:25:410:26 | source(...) | semmle.label | source(...) |
|
||||
| main.rs:411:10:411:10 | s | semmle.label | s |
|
||||
| main.rs:238:10:238:11 | s1 [Some] | semmle.label | s1 [Some] |
|
||||
| main.rs:238:10:238:20 | s1.unwrap(...) | semmle.label | s1.unwrap(...) |
|
||||
| main.rs:242:9:242:10 | s1 [Some] | semmle.label | s1 [Some] |
|
||||
| main.rs:242:14:242:29 | Some(...) [Some] | semmle.label | Some(...) [Some] |
|
||||
| main.rs:242:19:242:28 | source(...) | semmle.label | source(...) |
|
||||
| main.rs:243:10:243:11 | s1 [Some] | semmle.label | s1 [Some] |
|
||||
| main.rs:243:10:243:24 | s1.unwrap_or(...) | semmle.label | s1.unwrap_or(...) |
|
||||
| main.rs:246:10:246:33 | s2.unwrap_or(...) | semmle.label | s2.unwrap_or(...) |
|
||||
| main.rs:246:23:246:32 | source(...) | semmle.label | source(...) |
|
||||
| main.rs:250:9:250:10 | s1 [Some] | semmle.label | s1 [Some] |
|
||||
| main.rs:250:14:250:29 | Some(...) [Some] | semmle.label | Some(...) [Some] |
|
||||
| main.rs:250:19:250:28 | source(...) | semmle.label | source(...) |
|
||||
| main.rs:251:10:251:11 | s1 [Some] | semmle.label | s1 [Some] |
|
||||
| main.rs:251:10:251:32 | s1.unwrap_or_else(...) | semmle.label | s1.unwrap_or_else(...) |
|
||||
| main.rs:254:10:254:41 | s2.unwrap_or_else(...) | semmle.label | s2.unwrap_or_else(...) |
|
||||
| main.rs:254:31:254:40 | source(...) | semmle.label | source(...) |
|
||||
| main.rs:258:9:258:10 | s1 [Some] | semmle.label | s1 [Some] |
|
||||
| main.rs:258:14:258:29 | Some(...) [Some] | semmle.label | Some(...) [Some] |
|
||||
| main.rs:258:19:258:28 | source(...) | semmle.label | source(...) |
|
||||
| main.rs:260:9:260:10 | i1 | semmle.label | i1 |
|
||||
| main.rs:260:14:260:15 | s1 [Some] | semmle.label | s1 [Some] |
|
||||
| main.rs:260:14:260:16 | TryExpr | semmle.label | TryExpr |
|
||||
| main.rs:261:10:261:11 | i1 | semmle.label | i1 |
|
||||
| main.rs:267:9:267:10 | s1 [Ok] | semmle.label | s1 [Ok] |
|
||||
| main.rs:267:32:267:45 | Ok(...) [Ok] | semmle.label | Ok(...) [Ok] |
|
||||
| main.rs:267:35:267:44 | source(...) | semmle.label | source(...) |
|
||||
| main.rs:270:9:270:10 | i1 | semmle.label | i1 |
|
||||
| main.rs:270:14:270:15 | s1 [Ok] | semmle.label | s1 [Ok] |
|
||||
| main.rs:270:14:270:16 | TryExpr | semmle.label | TryExpr |
|
||||
| main.rs:272:10:272:11 | i1 | semmle.label | i1 |
|
||||
| main.rs:280:9:280:10 | s1 [Ok] | semmle.label | s1 [Ok] |
|
||||
| main.rs:280:32:280:45 | Ok(...) [Ok] | semmle.label | Ok(...) [Ok] |
|
||||
| main.rs:280:35:280:44 | source(...) | semmle.label | source(...) |
|
||||
| main.rs:281:10:281:11 | s1 [Ok] | semmle.label | s1 [Ok] |
|
||||
| main.rs:281:10:281:22 | s1.expect(...) | semmle.label | s1.expect(...) |
|
||||
| main.rs:284:9:284:10 | s2 [Err] | semmle.label | s2 [Err] |
|
||||
| main.rs:284:32:284:46 | Err(...) [Err] | semmle.label | Err(...) [Err] |
|
||||
| main.rs:284:36:284:45 | source(...) | semmle.label | source(...) |
|
||||
| main.rs:286:10:286:11 | s2 [Err] | semmle.label | s2 [Err] |
|
||||
| main.rs:286:10:286:26 | s2.expect_err(...) | semmle.label | s2.expect_err(...) |
|
||||
| main.rs:295:9:295:10 | s1 [A] | semmle.label | s1 [A] |
|
||||
| main.rs:295:14:295:39 | ...::A(...) [A] | semmle.label | ...::A(...) [A] |
|
||||
| main.rs:295:29:295:38 | source(...) | semmle.label | source(...) |
|
||||
| main.rs:297:11:297:12 | s1 [A] | semmle.label | s1 [A] |
|
||||
| main.rs:298:9:298:25 | ...::A(...) [A] | semmle.label | ...::A(...) [A] |
|
||||
| main.rs:298:24:298:24 | n | semmle.label | n |
|
||||
| main.rs:298:35:298:35 | n | semmle.label | n |
|
||||
| main.rs:301:11:301:12 | s1 [A] | semmle.label | s1 [A] |
|
||||
| main.rs:302:9:302:25 | ...::A(...) [A] | semmle.label | ...::A(...) [A] |
|
||||
| main.rs:302:24:302:24 | n | semmle.label | n |
|
||||
| main.rs:302:55:302:55 | n | semmle.label | n |
|
||||
| main.rs:313:9:313:10 | s1 [A] | semmle.label | s1 [A] |
|
||||
| main.rs:313:14:313:26 | A(...) [A] | semmle.label | A(...) [A] |
|
||||
| main.rs:313:16:313:25 | source(...) | semmle.label | source(...) |
|
||||
| main.rs:315:11:315:12 | s1 [A] | semmle.label | s1 [A] |
|
||||
| main.rs:316:9:316:12 | A(...) [A] | semmle.label | A(...) [A] |
|
||||
| main.rs:316:11:316:11 | n | semmle.label | n |
|
||||
| main.rs:316:22:316:22 | n | semmle.label | n |
|
||||
| main.rs:319:11:319:12 | s1 [A] | semmle.label | s1 [A] |
|
||||
| main.rs:320:9:320:12 | A(...) [A] | semmle.label | A(...) [A] |
|
||||
| main.rs:320:11:320:11 | n | semmle.label | n |
|
||||
| main.rs:320:29:320:29 | n | semmle.label | n |
|
||||
| main.rs:334:9:334:10 | s1 [C] | semmle.label | s1 [C] |
|
||||
| main.rs:334:14:336:5 | ...::C {...} [C] | semmle.label | ...::C {...} [C] |
|
||||
| main.rs:335:18:335:27 | source(...) | semmle.label | source(...) |
|
||||
| main.rs:338:11:338:12 | s1 [C] | semmle.label | s1 [C] |
|
||||
| main.rs:339:9:339:38 | ...::C {...} [C] | semmle.label | ...::C {...} [C] |
|
||||
| main.rs:339:36:339:36 | n | semmle.label | n |
|
||||
| main.rs:339:48:339:48 | n | semmle.label | n |
|
||||
| main.rs:342:11:342:12 | s1 [C] | semmle.label | s1 [C] |
|
||||
| main.rs:343:9:343:38 | ...::C {...} [C] | semmle.label | ...::C {...} [C] |
|
||||
| main.rs:343:36:343:36 | n | semmle.label | n |
|
||||
| main.rs:343:81:343:81 | n | semmle.label | n |
|
||||
| main.rs:354:9:354:10 | s1 [C] | semmle.label | s1 [C] |
|
||||
| main.rs:354:14:356:5 | C {...} [C] | semmle.label | C {...} [C] |
|
||||
| main.rs:355:18:355:27 | source(...) | semmle.label | source(...) |
|
||||
| main.rs:358:11:358:12 | s1 [C] | semmle.label | s1 [C] |
|
||||
| main.rs:359:9:359:24 | C {...} [C] | semmle.label | C {...} [C] |
|
||||
| main.rs:359:22:359:22 | n | semmle.label | n |
|
||||
| main.rs:359:34:359:34 | n | semmle.label | n |
|
||||
| main.rs:362:11:362:12 | s1 [C] | semmle.label | s1 [C] |
|
||||
| main.rs:363:9:363:24 | C {...} [C] | semmle.label | C {...} [C] |
|
||||
| main.rs:363:22:363:22 | n | semmle.label | n |
|
||||
| main.rs:363:53:363:53 | n | semmle.label | n |
|
||||
| main.rs:375:9:375:12 | arr1 [element] | semmle.label | arr1 [element] |
|
||||
| main.rs:375:16:375:33 | [...] [element] | semmle.label | [...] [element] |
|
||||
| main.rs:375:23:375:32 | source(...) | semmle.label | source(...) |
|
||||
| main.rs:376:9:376:10 | n1 | semmle.label | n1 |
|
||||
| main.rs:376:14:376:17 | arr1 [element] | semmle.label | arr1 [element] |
|
||||
| main.rs:376:14:376:20 | arr1[2] | semmle.label | arr1[2] |
|
||||
| main.rs:377:10:377:11 | n1 | semmle.label | n1 |
|
||||
| main.rs:379:9:379:12 | arr2 [element] | semmle.label | arr2 [element] |
|
||||
| main.rs:379:16:379:31 | [...; 10] [element] | semmle.label | [...; 10] [element] |
|
||||
| main.rs:379:17:379:26 | source(...) | semmle.label | source(...) |
|
||||
| main.rs:380:9:380:10 | n2 | semmle.label | n2 |
|
||||
| main.rs:380:14:380:17 | arr2 [element] | semmle.label | arr2 [element] |
|
||||
| main.rs:380:14:380:20 | arr2[4] | semmle.label | arr2[4] |
|
||||
| main.rs:381:10:381:11 | n2 | semmle.label | n2 |
|
||||
| main.rs:389:9:389:12 | arr1 [element] | semmle.label | arr1 [element] |
|
||||
| main.rs:389:16:389:33 | [...] [element] | semmle.label | [...] [element] |
|
||||
| main.rs:389:23:389:32 | source(...) | semmle.label | source(...) |
|
||||
| main.rs:390:9:390:10 | n1 | semmle.label | n1 |
|
||||
| main.rs:390:15:390:18 | arr1 [element] | semmle.label | arr1 [element] |
|
||||
| main.rs:391:14:391:15 | n1 | semmle.label | n1 |
|
||||
| main.rs:401:9:401:12 | arr1 [element] | semmle.label | arr1 [element] |
|
||||
| main.rs:401:16:401:33 | [...] [element] | semmle.label | [...] [element] |
|
||||
| main.rs:401:23:401:32 | source(...) | semmle.label | source(...) |
|
||||
| main.rs:402:11:402:14 | arr1 [element] | semmle.label | arr1 [element] |
|
||||
| main.rs:403:9:403:17 | SlicePat [element] | semmle.label | SlicePat [element] |
|
||||
| main.rs:403:10:403:10 | a | semmle.label | a |
|
||||
| main.rs:403:13:403:13 | b | semmle.label | b |
|
||||
| main.rs:403:16:403:16 | c | semmle.label | c |
|
||||
| main.rs:404:18:404:18 | a | semmle.label | a |
|
||||
| main.rs:405:18:405:18 | b | semmle.label | b |
|
||||
| main.rs:406:18:406:18 | c | semmle.label | c |
|
||||
| main.rs:415:5:415:11 | [post] mut_arr [element] | semmle.label | [post] mut_arr [element] |
|
||||
| main.rs:415:18:415:27 | source(...) | semmle.label | source(...) |
|
||||
| main.rs:416:9:416:9 | d | semmle.label | d |
|
||||
| main.rs:416:13:416:19 | mut_arr [element] | semmle.label | mut_arr [element] |
|
||||
| main.rs:416:13:416:22 | mut_arr[1] | semmle.label | mut_arr[1] |
|
||||
| main.rs:417:10:417:10 | d | semmle.label | d |
|
||||
| main.rs:418:10:418:16 | mut_arr [element] | semmle.label | mut_arr [element] |
|
||||
| main.rs:418:10:418:19 | mut_arr[0] | semmle.label | mut_arr[0] |
|
||||
| main.rs:441:9:441:9 | s | semmle.label | s |
|
||||
| main.rs:441:25:441:26 | source(...) | semmle.label | source(...) |
|
||||
| main.rs:442:10:442:10 | s | semmle.label | s |
|
||||
subpaths
|
||||
testFailures
|
||||
#select
|
||||
@@ -350,27 +418,33 @@ testFailures
|
||||
| main.rs:113:10:113:12 | a.0 | main.rs:111:11:111:20 | source(...) | main.rs:113:10:113:12 | a.0 | $@ | main.rs:111:11:111:20 | source(...) | source(...) |
|
||||
| main.rs:121:10:121:15 | ... .1 | main.rs:118:17:118:26 | source(...) | main.rs:121:10:121:15 | ... .1 | $@ | main.rs:118:17:118:26 | source(...) | source(...) |
|
||||
| main.rs:152:10:152:10 | a | main.rs:148:12:148:21 | source(...) | main.rs:152:10:152:10 | a | $@ | main.rs:148:12:148:21 | source(...) | source(...) |
|
||||
| main.rs:201:33:201:33 | n | main.rs:198:27:198:36 | source(...) | main.rs:201:33:201:33 | n | $@ | main.rs:198:27:198:36 | source(...) | source(...) |
|
||||
| main.rs:214:25:214:25 | n | main.rs:211:19:211:28 | source(...) | main.rs:214:25:214:25 | n | $@ | main.rs:211:19:211:28 | source(...) | source(...) |
|
||||
| main.rs:225:10:225:20 | s1.unwrap(...) | main.rs:224:19:224:28 | source(...) | main.rs:225:10:225:20 | s1.unwrap(...) | $@ | main.rs:224:19:224:28 | source(...) | source(...) |
|
||||
| main.rs:230:10:230:24 | s1.unwrap_or(...) | main.rs:229:19:229:28 | source(...) | main.rs:230:10:230:24 | s1.unwrap_or(...) | $@ | main.rs:229:19:229:28 | source(...) | source(...) |
|
||||
| main.rs:233:10:233:33 | s2.unwrap_or(...) | main.rs:233:23:233:32 | source(...) | main.rs:233:10:233:33 | s2.unwrap_or(...) | $@ | main.rs:233:23:233:32 | source(...) | source(...) |
|
||||
| main.rs:240:10:240:11 | i1 | main.rs:237:19:237:28 | source(...) | main.rs:240:10:240:11 | i1 | $@ | main.rs:237:19:237:28 | source(...) | source(...) |
|
||||
| main.rs:251:10:251:11 | i1 | main.rs:246:35:246:44 | source(...) | main.rs:251:10:251:11 | i1 | $@ | main.rs:246:35:246:44 | source(...) | source(...) |
|
||||
| main.rs:267:35:267:35 | n | main.rs:264:29:264:38 | source(...) | main.rs:267:35:267:35 | n | $@ | main.rs:264:29:264:38 | source(...) | source(...) |
|
||||
| main.rs:271:55:271:55 | n | main.rs:264:29:264:38 | source(...) | main.rs:271:55:271:55 | n | $@ | main.rs:264:29:264:38 | source(...) | source(...) |
|
||||
| main.rs:285:22:285:22 | n | main.rs:282:16:282:25 | source(...) | main.rs:285:22:285:22 | n | $@ | main.rs:282:16:282:25 | source(...) | source(...) |
|
||||
| main.rs:289:29:289:29 | n | main.rs:282:16:282:25 | source(...) | main.rs:289:29:289:29 | n | $@ | main.rs:282:16:282:25 | source(...) | source(...) |
|
||||
| main.rs:308:48:308:48 | n | main.rs:304:18:304:27 | source(...) | main.rs:308:48:308:48 | n | $@ | main.rs:304:18:304:27 | source(...) | source(...) |
|
||||
| main.rs:312:81:312:81 | n | main.rs:304:18:304:27 | source(...) | main.rs:312:81:312:81 | n | $@ | main.rs:304:18:304:27 | source(...) | source(...) |
|
||||
| main.rs:328:34:328:34 | n | main.rs:324:18:324:27 | source(...) | main.rs:328:34:328:34 | n | $@ | main.rs:324:18:324:27 | source(...) | source(...) |
|
||||
| main.rs:332:53:332:53 | n | main.rs:324:18:324:27 | source(...) | main.rs:332:53:332:53 | n | $@ | main.rs:324:18:324:27 | source(...) | source(...) |
|
||||
| main.rs:346:10:346:11 | n1 | main.rs:344:23:344:32 | source(...) | main.rs:346:10:346:11 | n1 | $@ | main.rs:344:23:344:32 | source(...) | source(...) |
|
||||
| main.rs:350:10:350:11 | n2 | main.rs:348:17:348:26 | source(...) | main.rs:350:10:350:11 | n2 | $@ | main.rs:348:17:348:26 | source(...) | source(...) |
|
||||
| main.rs:360:14:360:15 | n1 | main.rs:358:23:358:32 | source(...) | main.rs:360:14:360:15 | n1 | $@ | main.rs:358:23:358:32 | source(...) | source(...) |
|
||||
| main.rs:373:18:373:18 | a | main.rs:370:23:370:32 | source(...) | main.rs:373:18:373:18 | a | $@ | main.rs:370:23:370:32 | source(...) | source(...) |
|
||||
| main.rs:374:18:374:18 | b | main.rs:370:23:370:32 | source(...) | main.rs:374:18:374:18 | b | $@ | main.rs:370:23:370:32 | source(...) | source(...) |
|
||||
| main.rs:375:18:375:18 | c | main.rs:370:23:370:32 | source(...) | main.rs:375:18:375:18 | c | $@ | main.rs:370:23:370:32 | source(...) | source(...) |
|
||||
| main.rs:386:10:386:10 | d | main.rs:384:18:384:27 | source(...) | main.rs:386:10:386:10 | d | $@ | main.rs:384:18:384:27 | source(...) | source(...) |
|
||||
| main.rs:387:10:387:19 | mut_arr[0] | main.rs:384:18:384:27 | source(...) | main.rs:387:10:387:19 | mut_arr[0] | $@ | main.rs:384:18:384:27 | source(...) | source(...) |
|
||||
| main.rs:411:10:411:10 | s | main.rs:410:25:410:26 | source(...) | main.rs:411:10:411:10 | s | $@ | main.rs:410:25:410:26 | source(...) | source(...) |
|
||||
| main.rs:186:18:186:18 | y | main.rs:175:13:175:22 | source(...) | main.rs:186:18:186:18 | y | $@ | main.rs:175:13:175:22 | source(...) | source(...) |
|
||||
| main.rs:201:18:201:18 | x | main.rs:195:27:195:36 | source(...) | main.rs:201:18:201:18 | x | $@ | main.rs:195:27:195:36 | source(...) | source(...) |
|
||||
| main.rs:214:33:214:33 | n | main.rs:211:27:211:36 | source(...) | main.rs:214:33:214:33 | n | $@ | main.rs:211:27:211:36 | source(...) | source(...) |
|
||||
| main.rs:227:25:227:25 | n | main.rs:224:19:224:28 | source(...) | main.rs:227:25:227:25 | n | $@ | main.rs:224:19:224:28 | source(...) | source(...) |
|
||||
| main.rs:238:10:238:20 | s1.unwrap(...) | main.rs:237:19:237:28 | source(...) | main.rs:238:10:238:20 | s1.unwrap(...) | $@ | main.rs:237:19:237:28 | source(...) | source(...) |
|
||||
| main.rs:243:10:243:24 | s1.unwrap_or(...) | main.rs:242:19:242:28 | source(...) | main.rs:243:10:243:24 | s1.unwrap_or(...) | $@ | main.rs:242:19:242:28 | source(...) | source(...) |
|
||||
| main.rs:246:10:246:33 | s2.unwrap_or(...) | main.rs:246:23:246:32 | source(...) | main.rs:246:10:246:33 | s2.unwrap_or(...) | $@ | main.rs:246:23:246:32 | source(...) | source(...) |
|
||||
| main.rs:251:10:251:32 | s1.unwrap_or_else(...) | main.rs:250:19:250:28 | source(...) | main.rs:251:10:251:32 | s1.unwrap_or_else(...) | $@ | main.rs:250:19:250:28 | source(...) | source(...) |
|
||||
| main.rs:254:10:254:41 | s2.unwrap_or_else(...) | main.rs:254:31:254:40 | source(...) | main.rs:254:10:254:41 | s2.unwrap_or_else(...) | $@ | main.rs:254:31:254:40 | source(...) | source(...) |
|
||||
| main.rs:261:10:261:11 | i1 | main.rs:258:19:258:28 | source(...) | main.rs:261:10:261:11 | i1 | $@ | main.rs:258:19:258:28 | source(...) | source(...) |
|
||||
| main.rs:272:10:272:11 | i1 | main.rs:267:35:267:44 | source(...) | main.rs:272:10:272:11 | i1 | $@ | main.rs:267:35:267:44 | source(...) | source(...) |
|
||||
| main.rs:281:10:281:22 | s1.expect(...) | main.rs:280:35:280:44 | source(...) | main.rs:281:10:281:22 | s1.expect(...) | $@ | main.rs:280:35:280:44 | source(...) | source(...) |
|
||||
| main.rs:286:10:286:26 | s2.expect_err(...) | main.rs:284:36:284:45 | source(...) | main.rs:286:10:286:26 | s2.expect_err(...) | $@ | main.rs:284:36:284:45 | source(...) | source(...) |
|
||||
| main.rs:298:35:298:35 | n | main.rs:295:29:295:38 | source(...) | main.rs:298:35:298:35 | n | $@ | main.rs:295:29:295:38 | source(...) | source(...) |
|
||||
| main.rs:302:55:302:55 | n | main.rs:295:29:295:38 | source(...) | main.rs:302:55:302:55 | n | $@ | main.rs:295:29:295:38 | source(...) | source(...) |
|
||||
| main.rs:316:22:316:22 | n | main.rs:313:16:313:25 | source(...) | main.rs:316:22:316:22 | n | $@ | main.rs:313:16:313:25 | source(...) | source(...) |
|
||||
| main.rs:320:29:320:29 | n | main.rs:313:16:313:25 | source(...) | main.rs:320:29:320:29 | n | $@ | main.rs:313:16:313:25 | source(...) | source(...) |
|
||||
| main.rs:339:48:339:48 | n | main.rs:335:18:335:27 | source(...) | main.rs:339:48:339:48 | n | $@ | main.rs:335:18:335:27 | source(...) | source(...) |
|
||||
| main.rs:343:81:343:81 | n | main.rs:335:18:335:27 | source(...) | main.rs:343:81:343:81 | n | $@ | main.rs:335:18:335:27 | source(...) | source(...) |
|
||||
| main.rs:359:34:359:34 | n | main.rs:355:18:355:27 | source(...) | main.rs:359:34:359:34 | n | $@ | main.rs:355:18:355:27 | source(...) | source(...) |
|
||||
| main.rs:363:53:363:53 | n | main.rs:355:18:355:27 | source(...) | main.rs:363:53:363:53 | n | $@ | main.rs:355:18:355:27 | source(...) | source(...) |
|
||||
| main.rs:377:10:377:11 | n1 | main.rs:375:23:375:32 | source(...) | main.rs:377:10:377:11 | n1 | $@ | main.rs:375:23:375:32 | source(...) | source(...) |
|
||||
| main.rs:381:10:381:11 | n2 | main.rs:379:17:379:26 | source(...) | main.rs:381:10:381:11 | n2 | $@ | main.rs:379:17:379:26 | source(...) | source(...) |
|
||||
| main.rs:391:14:391:15 | n1 | main.rs:389:23:389:32 | source(...) | main.rs:391:14:391:15 | n1 | $@ | main.rs:389:23:389:32 | source(...) | source(...) |
|
||||
| main.rs:404:18:404:18 | a | main.rs:401:23:401:32 | source(...) | main.rs:404:18:404:18 | a | $@ | main.rs:401:23:401:32 | source(...) | source(...) |
|
||||
| main.rs:405:18:405:18 | b | main.rs:401:23:401:32 | source(...) | main.rs:405:18:405:18 | b | $@ | main.rs:401:23:401:32 | source(...) | source(...) |
|
||||
| main.rs:406:18:406:18 | c | main.rs:401:23:401:32 | source(...) | main.rs:406:18:406:18 | c | $@ | main.rs:401:23:401:32 | source(...) | source(...) |
|
||||
| main.rs:417:10:417:10 | d | main.rs:415:18:415:27 | source(...) | main.rs:417:10:417:10 | d | $@ | main.rs:415:18:415:27 | source(...) | source(...) |
|
||||
| main.rs:418:10:418:19 | mut_arr[0] | main.rs:415:18:415:27 | source(...) | main.rs:418:10:418:19 | mut_arr[0] | $@ | main.rs:415:18:415:27 | source(...) | source(...) |
|
||||
| main.rs:442:10:442:10 | s | main.rs:441:25:441:26 | source(...) | main.rs:442:10:442:10 | s | $@ | main.rs:441:25:441:26 | source(...) | source(...) |
|
||||
|
||||
@@ -172,11 +172,9 @@ fn struct_nested_field() {
|
||||
}
|
||||
|
||||
fn struct_nested_match() {
|
||||
let y = source(93);
|
||||
let p = Point3D {
|
||||
plane: Point {
|
||||
x: 2,
|
||||
y: source(93),
|
||||
},
|
||||
plane: Point { x: 2, y },
|
||||
z: 4,
|
||||
};
|
||||
match p {
|
||||
@@ -185,12 +183,27 @@ fn struct_nested_match() {
|
||||
z,
|
||||
} => {
|
||||
sink(x);
|
||||
sink(y); // MISSING: hasValueFlow=93
|
||||
sink(y); // $ hasValueFlow=93
|
||||
sink(z);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
struct MyTupleStruct(i64, i64);
|
||||
|
||||
fn tuple_struct() {
|
||||
let s = MyTupleStruct(source(94), 2);
|
||||
sink(s.0); // $ MISSING: hasValueFlow=94
|
||||
sink(s.1);
|
||||
|
||||
match s {
|
||||
MyTupleStruct(x, y) => {
|
||||
sink(x); // $ hasValueFlow=94
|
||||
sink(y);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Data flow through enums
|
||||
|
||||
@@ -233,6 +246,14 @@ fn option_unwrap_or() {
|
||||
sink(s2.unwrap_or(source(47))); // $ hasValueFlow=47
|
||||
}
|
||||
|
||||
fn option_unwrap_or_else() {
|
||||
let s1 = Some(source(47));
|
||||
sink(s1.unwrap_or_else(|| 0)); // $ hasValueFlow=47
|
||||
|
||||
let s2 = None;
|
||||
sink(s2.unwrap_or_else(|| source(48))); // $ hasValueFlow=48
|
||||
}
|
||||
|
||||
fn option_questionmark() -> Option<i64> {
|
||||
let s1 = Some(source(20));
|
||||
let s2 = Some(2);
|
||||
@@ -255,6 +276,16 @@ fn result_questionmark() -> Result<i64, i64> {
|
||||
Ok(0)
|
||||
}
|
||||
|
||||
fn result_expect() {
|
||||
let s1: Result<i64, i64> = Ok(source(78));
|
||||
sink(s1.expect("")); // $ hasValueFlow=78
|
||||
sink(s1.expect_err(""));
|
||||
|
||||
let s2: Result<i64, i64> = Err(source(79));
|
||||
sink(s2.expect(""));
|
||||
sink(s2.expect_err("")); // $ hasValueFlow=79
|
||||
}
|
||||
|
||||
enum MyTupleEnum {
|
||||
A(i64),
|
||||
B(i64),
|
||||
@@ -390,14 +421,14 @@ fn array_assignment() {
|
||||
// Test data flow inconsistency occuring with captured variables and `continue`
|
||||
// in a loop.
|
||||
pub fn captured_variable_and_continue(names: Vec<(bool, Option<String>)>) {
|
||||
let default_name = source(83).to_string();
|
||||
for (cond, name) in names {
|
||||
if cond {
|
||||
let n = name.unwrap_or_else(|| default_name.to_string());
|
||||
sink(n.len() as i64);
|
||||
continue;
|
||||
let default_name = source(83).to_string();
|
||||
for (cond, name) in names {
|
||||
if cond {
|
||||
let n = name.unwrap_or_else(|| default_name.to_string());
|
||||
sink(n.len() as i64);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
macro_rules! get_source {
|
||||
@@ -424,6 +455,7 @@ fn main() {
|
||||
tuple_mutation();
|
||||
tuple_nested();
|
||||
struct_field();
|
||||
tuple_struct();
|
||||
struct_mutation();
|
||||
struct_pattern_match();
|
||||
struct_nested_field();
|
||||
|
||||
@@ -0,0 +1,94 @@
|
||||
models
|
||||
| 1 | Summary: lang:core; <crate::option::Option>::unwrap; Argument[self].Variant[crate::option::Option::Some(0)]; ReturnValue; value |
|
||||
| 2 | Summary: lang:core; <crate::result::Result>::unwrap; Argument[self].Variant[crate::result::Result::Ok(0)]; ReturnValue; value |
|
||||
edges
|
||||
| main.rs:13:9:13:9 | a [Some] | main.rs:14:10:14:10 | a [Some] | provenance | |
|
||||
| main.rs:13:9:13:9 | a [Some] | main.rs:15:13:15:13 | a [Some] | provenance | |
|
||||
| main.rs:13:13:13:28 | Some(...) [Some] | main.rs:13:9:13:9 | a [Some] | provenance | |
|
||||
| main.rs:13:18:13:27 | source(...) | main.rs:13:13:13:28 | Some(...) [Some] | provenance | |
|
||||
| main.rs:14:10:14:10 | a [Some] | main.rs:14:10:14:19 | a.unwrap(...) | provenance | MaD:1 |
|
||||
| main.rs:15:9:15:9 | b [Some] | main.rs:16:10:16:10 | b [Some] | provenance | |
|
||||
| main.rs:15:13:15:13 | a [Some] | main.rs:15:13:15:21 | a.clone(...) [Some] | provenance | |
|
||||
| main.rs:15:13:15:21 | a.clone(...) [Some] | main.rs:15:9:15:9 | b [Some] | provenance | |
|
||||
| main.rs:16:10:16:10 | b [Some] | main.rs:16:10:16:19 | b.unwrap(...) | provenance | MaD:1 |
|
||||
| main.rs:20:9:20:9 | a [Ok] | main.rs:21:10:21:10 | a [Ok] | provenance | |
|
||||
| main.rs:20:9:20:9 | a [Ok] | main.rs:22:13:22:13 | a [Ok] | provenance | |
|
||||
| main.rs:20:31:20:44 | Ok(...) [Ok] | main.rs:20:9:20:9 | a [Ok] | provenance | |
|
||||
| main.rs:20:34:20:43 | source(...) | main.rs:20:31:20:44 | Ok(...) [Ok] | provenance | |
|
||||
| main.rs:21:10:21:10 | a [Ok] | main.rs:21:10:21:19 | a.unwrap(...) | provenance | MaD:2 |
|
||||
| main.rs:22:9:22:9 | b [Ok] | main.rs:23:10:23:10 | b [Ok] | provenance | |
|
||||
| main.rs:22:13:22:13 | a [Ok] | main.rs:22:13:22:21 | a.clone(...) [Ok] | provenance | |
|
||||
| main.rs:22:13:22:21 | a.clone(...) [Ok] | main.rs:22:9:22:9 | b [Ok] | provenance | |
|
||||
| main.rs:23:10:23:10 | b [Ok] | main.rs:23:10:23:19 | b.unwrap(...) | provenance | MaD:2 |
|
||||
| main.rs:27:9:27:9 | a | main.rs:28:10:28:10 | a | provenance | |
|
||||
| main.rs:27:9:27:9 | a | main.rs:29:13:29:13 | a | provenance | |
|
||||
| main.rs:27:13:27:22 | source(...) | main.rs:27:9:27:9 | a | provenance | |
|
||||
| main.rs:29:9:29:9 | b | main.rs:30:10:30:10 | b | provenance | |
|
||||
| main.rs:29:13:29:13 | a | main.rs:29:13:29:21 | a.clone(...) | provenance | |
|
||||
| main.rs:29:13:29:21 | a.clone(...) | main.rs:29:9:29:9 | b | provenance | |
|
||||
| main.rs:42:13:42:13 | w [Wrapper] | main.rs:43:15:43:15 | w [Wrapper] | provenance | |
|
||||
| main.rs:42:17:42:41 | Wrapper {...} [Wrapper] | main.rs:42:13:42:13 | w [Wrapper] | provenance | |
|
||||
| main.rs:42:30:42:39 | source(...) | main.rs:42:17:42:41 | Wrapper {...} [Wrapper] | provenance | |
|
||||
| main.rs:43:15:43:15 | w [Wrapper] | main.rs:44:13:44:28 | Wrapper {...} [Wrapper] | provenance | |
|
||||
| main.rs:43:15:43:15 | w [Wrapper] | main.rs:46:17:46:17 | w [Wrapper] | provenance | |
|
||||
| main.rs:44:13:44:28 | Wrapper {...} [Wrapper] | main.rs:44:26:44:26 | n | provenance | |
|
||||
| main.rs:44:26:44:26 | n | main.rs:44:38:44:38 | n | provenance | |
|
||||
| main.rs:46:13:46:13 | u [Wrapper] | main.rs:47:15:47:15 | u [Wrapper] | provenance | |
|
||||
| main.rs:46:17:46:17 | w [Wrapper] | main.rs:46:17:46:25 | w.clone(...) [Wrapper] | provenance | |
|
||||
| main.rs:46:17:46:25 | w.clone(...) [Wrapper] | main.rs:46:13:46:13 | u [Wrapper] | provenance | |
|
||||
| main.rs:47:15:47:15 | u [Wrapper] | main.rs:48:13:48:28 | Wrapper {...} [Wrapper] | provenance | |
|
||||
| main.rs:48:13:48:28 | Wrapper {...} [Wrapper] | main.rs:48:26:48:26 | n | provenance | |
|
||||
| main.rs:48:26:48:26 | n | main.rs:48:38:48:38 | n | provenance | |
|
||||
nodes
|
||||
| main.rs:13:9:13:9 | a [Some] | semmle.label | a [Some] |
|
||||
| main.rs:13:13:13:28 | Some(...) [Some] | semmle.label | Some(...) [Some] |
|
||||
| main.rs:13:18:13:27 | source(...) | semmle.label | source(...) |
|
||||
| main.rs:14:10:14:10 | a [Some] | semmle.label | a [Some] |
|
||||
| main.rs:14:10:14:19 | a.unwrap(...) | semmle.label | a.unwrap(...) |
|
||||
| main.rs:15:9:15:9 | b [Some] | semmle.label | b [Some] |
|
||||
| main.rs:15:13:15:13 | a [Some] | semmle.label | a [Some] |
|
||||
| main.rs:15:13:15:21 | a.clone(...) [Some] | semmle.label | a.clone(...) [Some] |
|
||||
| main.rs:16:10:16:10 | b [Some] | semmle.label | b [Some] |
|
||||
| main.rs:16:10:16:19 | b.unwrap(...) | semmle.label | b.unwrap(...) |
|
||||
| main.rs:20:9:20:9 | a [Ok] | semmle.label | a [Ok] |
|
||||
| main.rs:20:31:20:44 | Ok(...) [Ok] | semmle.label | Ok(...) [Ok] |
|
||||
| main.rs:20:34:20:43 | source(...) | semmle.label | source(...) |
|
||||
| main.rs:21:10:21:10 | a [Ok] | semmle.label | a [Ok] |
|
||||
| main.rs:21:10:21:19 | a.unwrap(...) | semmle.label | a.unwrap(...) |
|
||||
| main.rs:22:9:22:9 | b [Ok] | semmle.label | b [Ok] |
|
||||
| main.rs:22:13:22:13 | a [Ok] | semmle.label | a [Ok] |
|
||||
| main.rs:22:13:22:21 | a.clone(...) [Ok] | semmle.label | a.clone(...) [Ok] |
|
||||
| main.rs:23:10:23:10 | b [Ok] | semmle.label | b [Ok] |
|
||||
| main.rs:23:10:23:19 | b.unwrap(...) | semmle.label | b.unwrap(...) |
|
||||
| main.rs:27:9:27:9 | a | semmle.label | a |
|
||||
| main.rs:27:13:27:22 | source(...) | semmle.label | source(...) |
|
||||
| main.rs:28:10:28:10 | a | semmle.label | a |
|
||||
| main.rs:29:9:29:9 | b | semmle.label | b |
|
||||
| main.rs:29:13:29:13 | a | semmle.label | a |
|
||||
| main.rs:29:13:29:21 | a.clone(...) | semmle.label | a.clone(...) |
|
||||
| main.rs:30:10:30:10 | b | semmle.label | b |
|
||||
| main.rs:42:13:42:13 | w [Wrapper] | semmle.label | w [Wrapper] |
|
||||
| main.rs:42:17:42:41 | Wrapper {...} [Wrapper] | semmle.label | Wrapper {...} [Wrapper] |
|
||||
| main.rs:42:30:42:39 | source(...) | semmle.label | source(...) |
|
||||
| main.rs:43:15:43:15 | w [Wrapper] | semmle.label | w [Wrapper] |
|
||||
| main.rs:44:13:44:28 | Wrapper {...} [Wrapper] | semmle.label | Wrapper {...} [Wrapper] |
|
||||
| main.rs:44:26:44:26 | n | semmle.label | n |
|
||||
| main.rs:44:38:44:38 | n | semmle.label | n |
|
||||
| main.rs:46:13:46:13 | u [Wrapper] | semmle.label | u [Wrapper] |
|
||||
| main.rs:46:17:46:17 | w [Wrapper] | semmle.label | w [Wrapper] |
|
||||
| main.rs:46:17:46:25 | w.clone(...) [Wrapper] | semmle.label | w.clone(...) [Wrapper] |
|
||||
| main.rs:47:15:47:15 | u [Wrapper] | semmle.label | u [Wrapper] |
|
||||
| main.rs:48:13:48:28 | Wrapper {...} [Wrapper] | semmle.label | Wrapper {...} [Wrapper] |
|
||||
| main.rs:48:26:48:26 | n | semmle.label | n |
|
||||
| main.rs:48:38:48:38 | n | semmle.label | n |
|
||||
subpaths
|
||||
testFailures
|
||||
#select
|
||||
| main.rs:14:10:14:19 | a.unwrap(...) | main.rs:13:18:13:27 | source(...) | main.rs:14:10:14:19 | a.unwrap(...) | $@ | main.rs:13:18:13:27 | source(...) | source(...) |
|
||||
| main.rs:16:10:16:19 | b.unwrap(...) | main.rs:13:18:13:27 | source(...) | main.rs:16:10:16:19 | b.unwrap(...) | $@ | main.rs:13:18:13:27 | source(...) | source(...) |
|
||||
| main.rs:21:10:21:19 | a.unwrap(...) | main.rs:20:34:20:43 | source(...) | main.rs:21:10:21:19 | a.unwrap(...) | $@ | main.rs:20:34:20:43 | source(...) | source(...) |
|
||||
| main.rs:23:10:23:19 | b.unwrap(...) | main.rs:20:34:20:43 | source(...) | main.rs:23:10:23:19 | b.unwrap(...) | $@ | main.rs:20:34:20:43 | source(...) | source(...) |
|
||||
| main.rs:28:10:28:10 | a | main.rs:27:13:27:22 | source(...) | main.rs:28:10:28:10 | a | $@ | main.rs:27:13:27:22 | source(...) | source(...) |
|
||||
| main.rs:30:10:30:10 | b | main.rs:27:13:27:22 | source(...) | main.rs:30:10:30:10 | b | $@ | main.rs:27:13:27:22 | source(...) | source(...) |
|
||||
| main.rs:44:38:44:38 | n | main.rs:42:30:42:39 | source(...) | main.rs:44:38:44:38 | n | $@ | main.rs:42:30:42:39 | source(...) | source(...) |
|
||||
| main.rs:48:38:48:38 | n | main.rs:42:30:42:39 | source(...) | main.rs:48:38:48:38 | n | $@ | main.rs:42:30:42:39 | source(...) | source(...) |
|
||||
12
rust/ql/test/library-tests/dataflow/modeled/inline-flow.ql
Normal file
12
rust/ql/test/library-tests/dataflow/modeled/inline-flow.ql
Normal file
@@ -0,0 +1,12 @@
|
||||
/**
|
||||
* @kind path-problem
|
||||
*/
|
||||
|
||||
import rust
|
||||
import utils.test.InlineFlowTest
|
||||
import DefaultFlowTest
|
||||
import ValueFlow::PathGraph
|
||||
|
||||
from ValueFlow::PathNode source, ValueFlow::PathNode sink
|
||||
where ValueFlow::flowPath(source, sink)
|
||||
select sink, source, sink, "$@", source, source.toString()
|
||||
58
rust/ql/test/library-tests/dataflow/modeled/main.rs
Normal file
58
rust/ql/test/library-tests/dataflow/modeled/main.rs
Normal file
@@ -0,0 +1,58 @@
|
||||
|
||||
fn source(i: i64) -> i64 {
|
||||
1000 + i
|
||||
}
|
||||
|
||||
fn sink(s: i64) {
|
||||
println!("{}", s);
|
||||
}
|
||||
|
||||
// Flow through `clone` methods
|
||||
|
||||
fn option_clone() {
|
||||
let a = Some(source(88));
|
||||
sink(a.unwrap()); // $ hasValueFlow=88
|
||||
let b = a.clone();
|
||||
sink(b.unwrap()); // $ hasValueFlow=88
|
||||
}
|
||||
|
||||
fn result_clone() {
|
||||
let a: Result<i64, i64> = Ok(source(37));
|
||||
sink(a.unwrap()); // $ hasValueFlow=37
|
||||
let b = a.clone();
|
||||
sink(b.unwrap()); // $ hasValueFlow=37
|
||||
}
|
||||
|
||||
fn i64_clone() {
|
||||
let a = source(12);
|
||||
sink(a); // $ hasValueFlow=12
|
||||
let b = a.clone();
|
||||
sink(b); // $ hasValueFlow=12
|
||||
}
|
||||
|
||||
mod my_clone {
|
||||
use super::{source, sink};
|
||||
|
||||
#[derive(Clone)]
|
||||
struct Wrapper {
|
||||
n: i64
|
||||
}
|
||||
|
||||
pub fn wrapper_clone() {
|
||||
let w = Wrapper { n: source(73) };
|
||||
match w {
|
||||
Wrapper { n: n } => sink(n) // $ hasValueFlow=73
|
||||
}
|
||||
let u = w.clone();
|
||||
match u {
|
||||
Wrapper { n: n } => sink(n) // $ hasValueFlow=73
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn main() {
|
||||
option_clone();
|
||||
result_clone();
|
||||
i64_clone();
|
||||
my_clone::wrapper_clone();
|
||||
}
|
||||
@@ -175,6 +175,34 @@ fn test_set_tuple_element() {
|
||||
sink(t.1); // $ hasValueFlow=11
|
||||
}
|
||||
|
||||
// has a flow model
|
||||
pub fn apply<F>(n: i64, f: F) -> i64 where F : FnOnce(i64) -> i64 {
|
||||
0
|
||||
}
|
||||
|
||||
fn test_apply_flow_in() {
|
||||
let s = source(83);
|
||||
let f = |n| {
|
||||
sink(n); // $ hasValueFlow=83
|
||||
n + 3
|
||||
};
|
||||
apply(s, f);
|
||||
}
|
||||
|
||||
fn test_apply_flow_out() {
|
||||
let s = source(86);
|
||||
let f = |n| if n != 0 { n } else { s };
|
||||
let t = apply(34, f);
|
||||
sink(t); // $ hasValueFlow=86
|
||||
}
|
||||
|
||||
fn test_apply_flow_through() {
|
||||
let s = source(33);
|
||||
let f = |n| if n != 0 { n } else { 0 };
|
||||
let t = apply(s, f);
|
||||
sink(t); // $ hasValueFlow=33
|
||||
}
|
||||
|
||||
impl MyFieldEnum {
|
||||
// has a source model
|
||||
fn source(&self, i: i64) -> MyFieldEnum {
|
||||
|
||||
@@ -5,16 +5,18 @@ models
|
||||
| 4 | Source: repo::test; <crate::MyFieldEnum>::source; test-source; ReturnValue.Variant[crate::MyFieldEnum::C::field_c] |
|
||||
| 5 | Source: repo::test; crate::enum_source; test-source; ReturnValue.Variant[crate::MyFieldEnum::D::field_d] |
|
||||
| 6 | Source: repo::test; crate::simple_source; test-source; ReturnValue |
|
||||
| 7 | Summary: repo::test; crate::coerce; Argument[0]; ReturnValue; taint |
|
||||
| 8 | Summary: repo::test; crate::get_array_element; Argument[0].ArrayElement; ReturnValue; value |
|
||||
| 9 | Summary: repo::test; crate::get_struct_field; Argument[0].Struct[crate::MyStruct::field1]; ReturnValue; value |
|
||||
| 10 | Summary: repo::test; crate::get_tuple_element; Argument[0].Tuple[0]; ReturnValue; value |
|
||||
| 11 | Summary: repo::test; crate::get_var_field; Argument[0].Variant[crate::MyFieldEnum::C::field_c]; ReturnValue; value |
|
||||
| 12 | Summary: repo::test; crate::get_var_pos; Argument[0].Variant[crate::MyPosEnum::A(0)]; ReturnValue; value |
|
||||
| 13 | Summary: repo::test; crate::set_array_element; Argument[0]; ReturnValue.ArrayElement; value |
|
||||
| 14 | Summary: repo::test; crate::set_tuple_element; Argument[0]; ReturnValue.Tuple[1]; value |
|
||||
| 15 | Summary: repo::test; crate::set_var_field; Argument[0]; ReturnValue.Variant[crate::MyFieldEnum::D::field_d]; value |
|
||||
| 16 | Summary: repo::test; crate::set_var_pos; Argument[0]; ReturnValue.Variant[crate::MyPosEnum::B(0)]; value |
|
||||
| 7 | Summary: repo::test; crate::apply; Argument[0]; Argument[1].Parameter[0]; value |
|
||||
| 8 | Summary: repo::test; crate::apply; Argument[1].ReturnValue; ReturnValue; value |
|
||||
| 9 | Summary: repo::test; crate::coerce; Argument[0]; ReturnValue; taint |
|
||||
| 10 | Summary: repo::test; crate::get_array_element; Argument[0].Element; ReturnValue; value |
|
||||
| 11 | Summary: repo::test; crate::get_struct_field; Argument[0].Struct[crate::MyStruct::field1]; ReturnValue; value |
|
||||
| 12 | Summary: repo::test; crate::get_tuple_element; Argument[0].Tuple[0]; ReturnValue; value |
|
||||
| 13 | Summary: repo::test; crate::get_var_field; Argument[0].Variant[crate::MyFieldEnum::C::field_c]; ReturnValue; value |
|
||||
| 14 | Summary: repo::test; crate::get_var_pos; Argument[0].Variant[crate::MyPosEnum::A(0)]; ReturnValue; value |
|
||||
| 15 | Summary: repo::test; crate::set_array_element; Argument[0]; ReturnValue.Element; value |
|
||||
| 16 | Summary: repo::test; crate::set_tuple_element; Argument[0]; ReturnValue.Tuple[1]; value |
|
||||
| 17 | Summary: repo::test; crate::set_var_field; Argument[0]; ReturnValue.Variant[crate::MyFieldEnum::D::field_d]; value |
|
||||
| 18 | Summary: repo::test; crate::set_var_pos; Argument[0]; ReturnValue.Variant[crate::MyPosEnum::B(0)]; value |
|
||||
edges
|
||||
| main.rs:15:9:15:9 | s | main.rs:16:19:16:19 | s | provenance | |
|
||||
| main.rs:15:9:15:9 | s | main.rs:16:19:16:19 | s | provenance | |
|
||||
@@ -24,7 +26,7 @@ edges
|
||||
| main.rs:16:19:16:19 | s | main.rs:16:10:16:20 | identity(...) | provenance | QL |
|
||||
| main.rs:25:9:25:9 | s | main.rs:26:17:26:17 | s | provenance | |
|
||||
| main.rs:25:13:25:22 | source(...) | main.rs:25:9:25:9 | s | provenance | |
|
||||
| main.rs:26:17:26:17 | s | main.rs:26:10:26:18 | coerce(...) | provenance | MaD:7 |
|
||||
| main.rs:26:17:26:17 | s | main.rs:26:10:26:18 | coerce(...) | provenance | MaD:9 |
|
||||
| main.rs:40:9:40:9 | s | main.rs:41:27:41:27 | s | provenance | |
|
||||
| main.rs:40:9:40:9 | s | main.rs:41:27:41:27 | s | provenance | |
|
||||
| main.rs:40:13:40:21 | source(...) | main.rs:40:9:40:9 | s | provenance | |
|
||||
@@ -35,8 +37,8 @@ edges
|
||||
| main.rs:41:14:41:28 | ...::A(...) [A] | main.rs:41:9:41:10 | e1 [A] | provenance | |
|
||||
| main.rs:41:27:41:27 | s | main.rs:41:14:41:28 | ...::A(...) [A] | provenance | |
|
||||
| main.rs:41:27:41:27 | s | main.rs:41:14:41:28 | ...::A(...) [A] | provenance | |
|
||||
| main.rs:42:22:42:23 | e1 [A] | main.rs:42:10:42:24 | get_var_pos(...) | provenance | MaD:12 |
|
||||
| main.rs:42:22:42:23 | e1 [A] | main.rs:42:10:42:24 | get_var_pos(...) | provenance | MaD:12 |
|
||||
| main.rs:42:22:42:23 | e1 [A] | main.rs:42:10:42:24 | get_var_pos(...) | provenance | MaD:14 |
|
||||
| main.rs:42:22:42:23 | e1 [A] | main.rs:42:10:42:24 | get_var_pos(...) | provenance | MaD:14 |
|
||||
| main.rs:53:9:53:9 | s | main.rs:54:26:54:26 | s | provenance | |
|
||||
| main.rs:53:9:53:9 | s | main.rs:54:26:54:26 | s | provenance | |
|
||||
| main.rs:53:13:53:21 | source(...) | main.rs:53:9:53:9 | s | provenance | |
|
||||
@@ -45,8 +47,8 @@ edges
|
||||
| main.rs:54:9:54:10 | e1 [B] | main.rs:55:11:55:12 | e1 [B] | provenance | |
|
||||
| main.rs:54:14:54:27 | set_var_pos(...) [B] | main.rs:54:9:54:10 | e1 [B] | provenance | |
|
||||
| main.rs:54:14:54:27 | set_var_pos(...) [B] | main.rs:54:9:54:10 | e1 [B] | provenance | |
|
||||
| main.rs:54:26:54:26 | s | main.rs:54:14:54:27 | set_var_pos(...) [B] | provenance | MaD:16 |
|
||||
| main.rs:54:26:54:26 | s | main.rs:54:14:54:27 | set_var_pos(...) [B] | provenance | MaD:16 |
|
||||
| main.rs:54:26:54:26 | s | main.rs:54:14:54:27 | set_var_pos(...) [B] | provenance | MaD:18 |
|
||||
| main.rs:54:26:54:26 | s | main.rs:54:14:54:27 | set_var_pos(...) [B] | provenance | MaD:18 |
|
||||
| main.rs:55:11:55:12 | e1 [B] | main.rs:57:9:57:23 | ...::B(...) [B] | provenance | |
|
||||
| main.rs:55:11:55:12 | e1 [B] | main.rs:57:9:57:23 | ...::B(...) [B] | provenance | |
|
||||
| main.rs:57:9:57:23 | ...::B(...) [B] | main.rs:57:22:57:22 | i | provenance | |
|
||||
@@ -63,8 +65,8 @@ edges
|
||||
| main.rs:73:14:73:42 | ...::C {...} [C] | main.rs:73:9:73:10 | e1 [C] | provenance | |
|
||||
| main.rs:73:40:73:40 | s | main.rs:73:14:73:42 | ...::C {...} [C] | provenance | |
|
||||
| main.rs:73:40:73:40 | s | main.rs:73:14:73:42 | ...::C {...} [C] | provenance | |
|
||||
| main.rs:74:24:74:25 | e1 [C] | main.rs:74:10:74:26 | get_var_field(...) | provenance | MaD:11 |
|
||||
| main.rs:74:24:74:25 | e1 [C] | main.rs:74:10:74:26 | get_var_field(...) | provenance | MaD:11 |
|
||||
| main.rs:74:24:74:25 | e1 [C] | main.rs:74:10:74:26 | get_var_field(...) | provenance | MaD:13 |
|
||||
| main.rs:74:24:74:25 | e1 [C] | main.rs:74:10:74:26 | get_var_field(...) | provenance | MaD:13 |
|
||||
| main.rs:85:9:85:9 | s | main.rs:86:28:86:28 | s | provenance | |
|
||||
| main.rs:85:9:85:9 | s | main.rs:86:28:86:28 | s | provenance | |
|
||||
| main.rs:85:13:85:21 | source(...) | main.rs:85:9:85:9 | s | provenance | |
|
||||
@@ -73,8 +75,8 @@ edges
|
||||
| main.rs:86:9:86:10 | e1 [D] | main.rs:87:11:87:12 | e1 [D] | provenance | |
|
||||
| main.rs:86:14:86:29 | set_var_field(...) [D] | main.rs:86:9:86:10 | e1 [D] | provenance | |
|
||||
| main.rs:86:14:86:29 | set_var_field(...) [D] | main.rs:86:9:86:10 | e1 [D] | provenance | |
|
||||
| main.rs:86:28:86:28 | s | main.rs:86:14:86:29 | set_var_field(...) [D] | provenance | MaD:15 |
|
||||
| main.rs:86:28:86:28 | s | main.rs:86:14:86:29 | set_var_field(...) [D] | provenance | MaD:15 |
|
||||
| main.rs:86:28:86:28 | s | main.rs:86:14:86:29 | set_var_field(...) [D] | provenance | MaD:17 |
|
||||
| main.rs:86:28:86:28 | s | main.rs:86:14:86:29 | set_var_field(...) [D] | provenance | MaD:17 |
|
||||
| main.rs:87:11:87:12 | e1 [D] | main.rs:89:9:89:37 | ...::D {...} [D] | provenance | |
|
||||
| main.rs:87:11:87:12 | e1 [D] | main.rs:89:9:89:37 | ...::D {...} [D] | provenance | |
|
||||
| main.rs:89:9:89:37 | ...::D {...} [D] | main.rs:89:35:89:35 | i | provenance | |
|
||||
@@ -91,28 +93,28 @@ edges
|
||||
| main.rs:105:21:108:5 | MyStruct {...} [MyStruct.field1] | main.rs:105:9:105:17 | my_struct [MyStruct.field1] | provenance | |
|
||||
| main.rs:106:17:106:17 | s | main.rs:105:21:108:5 | MyStruct {...} [MyStruct.field1] | provenance | |
|
||||
| main.rs:106:17:106:17 | s | main.rs:105:21:108:5 | MyStruct {...} [MyStruct.field1] | provenance | |
|
||||
| main.rs:109:27:109:35 | my_struct [MyStruct.field1] | main.rs:109:10:109:36 | get_struct_field(...) | provenance | MaD:9 |
|
||||
| main.rs:109:27:109:35 | my_struct [MyStruct.field1] | main.rs:109:10:109:36 | get_struct_field(...) | provenance | MaD:9 |
|
||||
| main.rs:109:27:109:35 | my_struct [MyStruct.field1] | main.rs:109:10:109:36 | get_struct_field(...) | provenance | MaD:11 |
|
||||
| main.rs:109:27:109:35 | my_struct [MyStruct.field1] | main.rs:109:10:109:36 | get_struct_field(...) | provenance | MaD:11 |
|
||||
| main.rs:138:9:138:9 | s | main.rs:139:29:139:29 | s | provenance | |
|
||||
| main.rs:138:9:138:9 | s | main.rs:139:29:139:29 | s | provenance | |
|
||||
| main.rs:138:13:138:21 | source(...) | main.rs:138:9:138:9 | s | provenance | |
|
||||
| main.rs:138:13:138:21 | source(...) | main.rs:138:9:138:9 | s | provenance | |
|
||||
| main.rs:139:28:139:30 | [...] [array[]] | main.rs:139:10:139:31 | get_array_element(...) | provenance | MaD:8 |
|
||||
| main.rs:139:28:139:30 | [...] [array[]] | main.rs:139:10:139:31 | get_array_element(...) | provenance | MaD:8 |
|
||||
| main.rs:139:29:139:29 | s | main.rs:139:28:139:30 | [...] [array[]] | provenance | |
|
||||
| main.rs:139:29:139:29 | s | main.rs:139:28:139:30 | [...] [array[]] | provenance | |
|
||||
| main.rs:139:28:139:30 | [...] [element] | main.rs:139:10:139:31 | get_array_element(...) | provenance | MaD:10 |
|
||||
| main.rs:139:28:139:30 | [...] [element] | main.rs:139:10:139:31 | get_array_element(...) | provenance | MaD:10 |
|
||||
| main.rs:139:29:139:29 | s | main.rs:139:28:139:30 | [...] [element] | provenance | |
|
||||
| main.rs:139:29:139:29 | s | main.rs:139:28:139:30 | [...] [element] | provenance | |
|
||||
| main.rs:148:9:148:9 | s | main.rs:149:33:149:33 | s | provenance | |
|
||||
| main.rs:148:9:148:9 | s | main.rs:149:33:149:33 | s | provenance | |
|
||||
| main.rs:148:13:148:21 | source(...) | main.rs:148:9:148:9 | s | provenance | |
|
||||
| main.rs:148:13:148:21 | source(...) | main.rs:148:9:148:9 | s | provenance | |
|
||||
| main.rs:149:9:149:11 | arr [array[]] | main.rs:150:10:150:12 | arr [array[]] | provenance | |
|
||||
| main.rs:149:9:149:11 | arr [array[]] | main.rs:150:10:150:12 | arr [array[]] | provenance | |
|
||||
| main.rs:149:15:149:34 | set_array_element(...) [array[]] | main.rs:149:9:149:11 | arr [array[]] | provenance | |
|
||||
| main.rs:149:15:149:34 | set_array_element(...) [array[]] | main.rs:149:9:149:11 | arr [array[]] | provenance | |
|
||||
| main.rs:149:33:149:33 | s | main.rs:149:15:149:34 | set_array_element(...) [array[]] | provenance | MaD:13 |
|
||||
| main.rs:149:33:149:33 | s | main.rs:149:15:149:34 | set_array_element(...) [array[]] | provenance | MaD:13 |
|
||||
| main.rs:150:10:150:12 | arr [array[]] | main.rs:150:10:150:15 | arr[0] | provenance | |
|
||||
| main.rs:150:10:150:12 | arr [array[]] | main.rs:150:10:150:15 | arr[0] | provenance | |
|
||||
| main.rs:149:9:149:11 | arr [element] | main.rs:150:10:150:12 | arr [element] | provenance | |
|
||||
| main.rs:149:9:149:11 | arr [element] | main.rs:150:10:150:12 | arr [element] | provenance | |
|
||||
| main.rs:149:15:149:34 | set_array_element(...) [element] | main.rs:149:9:149:11 | arr [element] | provenance | |
|
||||
| main.rs:149:15:149:34 | set_array_element(...) [element] | main.rs:149:9:149:11 | arr [element] | provenance | |
|
||||
| main.rs:149:33:149:33 | s | main.rs:149:15:149:34 | set_array_element(...) [element] | provenance | MaD:15 |
|
||||
| main.rs:149:33:149:33 | s | main.rs:149:15:149:34 | set_array_element(...) [element] | provenance | MaD:15 |
|
||||
| main.rs:150:10:150:12 | arr [element] | main.rs:150:10:150:15 | arr[0] | provenance | |
|
||||
| main.rs:150:10:150:12 | arr [element] | main.rs:150:10:150:15 | arr[0] | provenance | |
|
||||
| main.rs:159:9:159:9 | s | main.rs:160:14:160:14 | s | provenance | |
|
||||
| main.rs:159:9:159:9 | s | main.rs:160:14:160:14 | s | provenance | |
|
||||
| main.rs:159:13:159:22 | source(...) | main.rs:159:9:159:9 | s | provenance | |
|
||||
@@ -123,8 +125,8 @@ edges
|
||||
| main.rs:160:13:160:18 | TupleExpr [tuple.0] | main.rs:160:9:160:9 | t [tuple.0] | provenance | |
|
||||
| main.rs:160:14:160:14 | s | main.rs:160:13:160:18 | TupleExpr [tuple.0] | provenance | |
|
||||
| main.rs:160:14:160:14 | s | main.rs:160:13:160:18 | TupleExpr [tuple.0] | provenance | |
|
||||
| main.rs:161:28:161:28 | t [tuple.0] | main.rs:161:10:161:29 | get_tuple_element(...) | provenance | MaD:10 |
|
||||
| main.rs:161:28:161:28 | t [tuple.0] | main.rs:161:10:161:29 | get_tuple_element(...) | provenance | MaD:10 |
|
||||
| main.rs:161:28:161:28 | t [tuple.0] | main.rs:161:10:161:29 | get_tuple_element(...) | provenance | MaD:12 |
|
||||
| main.rs:161:28:161:28 | t [tuple.0] | main.rs:161:10:161:29 | get_tuple_element(...) | provenance | MaD:12 |
|
||||
| main.rs:172:9:172:9 | s | main.rs:173:31:173:31 | s | provenance | |
|
||||
| main.rs:172:9:172:9 | s | main.rs:173:31:173:31 | s | provenance | |
|
||||
| main.rs:172:13:172:22 | source(...) | main.rs:172:9:172:9 | s | provenance | |
|
||||
@@ -133,66 +135,104 @@ edges
|
||||
| main.rs:173:9:173:9 | t [tuple.1] | main.rs:175:10:175:10 | t [tuple.1] | provenance | |
|
||||
| main.rs:173:13:173:32 | set_tuple_element(...) [tuple.1] | main.rs:173:9:173:9 | t [tuple.1] | provenance | |
|
||||
| main.rs:173:13:173:32 | set_tuple_element(...) [tuple.1] | main.rs:173:9:173:9 | t [tuple.1] | provenance | |
|
||||
| main.rs:173:31:173:31 | s | main.rs:173:13:173:32 | set_tuple_element(...) [tuple.1] | provenance | MaD:14 |
|
||||
| main.rs:173:31:173:31 | s | main.rs:173:13:173:32 | set_tuple_element(...) [tuple.1] | provenance | MaD:14 |
|
||||
| main.rs:173:31:173:31 | s | main.rs:173:13:173:32 | set_tuple_element(...) [tuple.1] | provenance | MaD:16 |
|
||||
| main.rs:173:31:173:31 | s | main.rs:173:13:173:32 | set_tuple_element(...) [tuple.1] | provenance | MaD:16 |
|
||||
| main.rs:175:10:175:10 | t [tuple.1] | main.rs:175:10:175:12 | t.1 | provenance | |
|
||||
| main.rs:175:10:175:10 | t [tuple.1] | main.rs:175:10:175:12 | t.1 | provenance | |
|
||||
| main.rs:194:9:194:9 | s [D] | main.rs:195:11:195:11 | s [D] | provenance | |
|
||||
| main.rs:194:9:194:9 | s [D] | main.rs:195:11:195:11 | s [D] | provenance | |
|
||||
| main.rs:194:13:194:23 | enum_source | main.rs:194:13:194:27 | enum_source(...) [D] | provenance | Src:MaD:5 |
|
||||
| main.rs:194:13:194:23 | enum_source | main.rs:194:13:194:27 | enum_source(...) [D] | provenance | Src:MaD:5 |
|
||||
| main.rs:194:13:194:27 | enum_source(...) [D] | main.rs:194:9:194:9 | s [D] | provenance | |
|
||||
| main.rs:194:13:194:27 | enum_source(...) [D] | main.rs:194:9:194:9 | s [D] | provenance | |
|
||||
| main.rs:195:11:195:11 | s [D] | main.rs:197:9:197:37 | ...::D {...} [D] | provenance | |
|
||||
| main.rs:195:11:195:11 | s [D] | main.rs:197:9:197:37 | ...::D {...} [D] | provenance | |
|
||||
| main.rs:197:9:197:37 | ...::D {...} [D] | main.rs:197:35:197:35 | i | provenance | |
|
||||
| main.rs:197:9:197:37 | ...::D {...} [D] | main.rs:197:35:197:35 | i | provenance | |
|
||||
| main.rs:197:35:197:35 | i | main.rs:197:47:197:47 | i | provenance | |
|
||||
| main.rs:197:35:197:35 | i | main.rs:197:47:197:47 | i | provenance | |
|
||||
| main.rs:203:9:203:9 | s [C] | main.rs:204:11:204:11 | s [C] | provenance | |
|
||||
| main.rs:203:9:203:9 | s [C] | main.rs:204:11:204:11 | s [C] | provenance | |
|
||||
| main.rs:203:13:203:24 | e.source(...) [C] | main.rs:203:9:203:9 | s [C] | provenance | |
|
||||
| main.rs:203:13:203:24 | e.source(...) [C] | main.rs:203:9:203:9 | s [C] | provenance | |
|
||||
| main.rs:203:15:203:20 | source | main.rs:203:13:203:24 | e.source(...) [C] | provenance | Src:MaD:4 |
|
||||
| main.rs:203:15:203:20 | source | main.rs:203:13:203:24 | e.source(...) [C] | provenance | Src:MaD:4 |
|
||||
| main.rs:204:11:204:11 | s [C] | main.rs:205:9:205:37 | ...::C {...} [C] | provenance | |
|
||||
| main.rs:204:11:204:11 | s [C] | main.rs:205:9:205:37 | ...::C {...} [C] | provenance | |
|
||||
| main.rs:205:9:205:37 | ...::C {...} [C] | main.rs:205:35:205:35 | i | provenance | |
|
||||
| main.rs:205:9:205:37 | ...::C {...} [C] | main.rs:205:35:205:35 | i | provenance | |
|
||||
| main.rs:205:35:205:35 | i | main.rs:205:47:205:47 | i | provenance | |
|
||||
| main.rs:205:35:205:35 | i | main.rs:205:47:205:47 | i | provenance | |
|
||||
| main.rs:214:9:214:9 | s | main.rs:215:41:215:41 | s | provenance | |
|
||||
| main.rs:214:9:214:9 | s | main.rs:215:41:215:41 | s | provenance | |
|
||||
| main.rs:214:13:214:22 | source(...) | main.rs:214:9:214:9 | s | provenance | |
|
||||
| main.rs:214:13:214:22 | source(...) | main.rs:214:9:214:9 | s | provenance | |
|
||||
| main.rs:215:15:215:43 | ...::C {...} [C] | main.rs:215:5:215:13 | enum_sink | provenance | MaD:2 Sink:MaD:2 |
|
||||
| main.rs:215:15:215:43 | ...::C {...} [C] | main.rs:215:5:215:13 | enum_sink | provenance | MaD:2 Sink:MaD:2 |
|
||||
| main.rs:215:41:215:41 | s | main.rs:215:15:215:43 | ...::C {...} [C] | provenance | |
|
||||
| main.rs:215:41:215:41 | s | main.rs:215:15:215:43 | ...::C {...} [C] | provenance | |
|
||||
| main.rs:220:9:220:9 | s | main.rs:221:39:221:39 | s | provenance | |
|
||||
| main.rs:220:9:220:9 | s | main.rs:221:39:221:39 | s | provenance | |
|
||||
| main.rs:220:13:220:22 | source(...) | main.rs:220:9:220:9 | s | provenance | |
|
||||
| main.rs:220:13:220:22 | source(...) | main.rs:220:9:220:9 | s | provenance | |
|
||||
| main.rs:221:9:221:9 | e [D] | main.rs:222:5:222:5 | e [D] | provenance | |
|
||||
| main.rs:221:9:221:9 | e [D] | main.rs:222:5:222:5 | e [D] | provenance | |
|
||||
| main.rs:221:13:221:41 | ...::D {...} [D] | main.rs:221:9:221:9 | e [D] | provenance | |
|
||||
| main.rs:221:13:221:41 | ...::D {...} [D] | main.rs:221:9:221:9 | e [D] | provenance | |
|
||||
| main.rs:221:39:221:39 | s | main.rs:221:13:221:41 | ...::D {...} [D] | provenance | |
|
||||
| main.rs:221:39:221:39 | s | main.rs:221:13:221:41 | ...::D {...} [D] | provenance | |
|
||||
| main.rs:222:5:222:5 | e [D] | main.rs:222:7:222:10 | sink | provenance | MaD:1 Sink:MaD:1 |
|
||||
| main.rs:222:5:222:5 | e [D] | main.rs:222:7:222:10 | sink | provenance | MaD:1 Sink:MaD:1 |
|
||||
| main.rs:231:9:231:9 | s | main.rs:232:10:232:10 | s | provenance | |
|
||||
| main.rs:231:9:231:9 | s | main.rs:232:10:232:10 | s | provenance | |
|
||||
| main.rs:231:13:231:25 | simple_source | main.rs:231:13:231:29 | simple_source(...) | provenance | Src:MaD:6 MaD:6 |
|
||||
| main.rs:231:13:231:25 | simple_source | main.rs:231:13:231:29 | simple_source(...) | provenance | Src:MaD:6 MaD:6 |
|
||||
| main.rs:231:13:231:29 | simple_source(...) | main.rs:231:9:231:9 | s | provenance | |
|
||||
| main.rs:231:13:231:29 | simple_source(...) | main.rs:231:9:231:9 | s | provenance | |
|
||||
| main.rs:239:9:239:9 | s | main.rs:240:17:240:17 | s | provenance | |
|
||||
| main.rs:239:9:239:9 | s | main.rs:240:17:240:17 | s | provenance | |
|
||||
| main.rs:239:13:239:22 | source(...) | main.rs:239:9:239:9 | s | provenance | |
|
||||
| main.rs:239:13:239:22 | source(...) | main.rs:239:9:239:9 | s | provenance | |
|
||||
| main.rs:240:17:240:17 | s | main.rs:240:5:240:15 | simple_sink | provenance | MaD:3 Sink:MaD:3 |
|
||||
| main.rs:240:17:240:17 | s | main.rs:240:5:240:15 | simple_sink | provenance | MaD:3 Sink:MaD:3 |
|
||||
| main.rs:184:9:184:9 | s | main.rs:189:11:189:11 | s | provenance | |
|
||||
| main.rs:184:9:184:9 | s | main.rs:189:11:189:11 | s | provenance | |
|
||||
| main.rs:184:13:184:22 | source(...) | main.rs:184:9:184:9 | s | provenance | |
|
||||
| main.rs:184:13:184:22 | source(...) | main.rs:184:9:184:9 | s | provenance | |
|
||||
| main.rs:185:14:185:14 | ... | main.rs:186:14:186:14 | n | provenance | |
|
||||
| main.rs:185:14:185:14 | ... | main.rs:186:14:186:14 | n | provenance | |
|
||||
| main.rs:189:11:189:11 | s | main.rs:185:14:185:14 | ... | provenance | MaD:7 |
|
||||
| main.rs:189:11:189:11 | s | main.rs:185:14:185:14 | ... | provenance | MaD:7 |
|
||||
| main.rs:193:13:193:22 | source(...) | main.rs:195:23:195:23 | f [captured s] | provenance | |
|
||||
| main.rs:193:13:193:22 | source(...) | main.rs:195:23:195:23 | f [captured s] | provenance | |
|
||||
| main.rs:194:40:194:40 | s | main.rs:194:17:194:42 | if ... {...} else {...} | provenance | |
|
||||
| main.rs:194:40:194:40 | s | main.rs:194:17:194:42 | if ... {...} else {...} | provenance | |
|
||||
| main.rs:195:9:195:9 | t | main.rs:196:10:196:10 | t | provenance | |
|
||||
| main.rs:195:9:195:9 | t | main.rs:196:10:196:10 | t | provenance | |
|
||||
| main.rs:195:13:195:24 | apply(...) | main.rs:195:9:195:9 | t | provenance | |
|
||||
| main.rs:195:13:195:24 | apply(...) | main.rs:195:9:195:9 | t | provenance | |
|
||||
| main.rs:195:23:195:23 | f [captured s] | main.rs:194:40:194:40 | s | provenance | MaD:7 |
|
||||
| main.rs:195:23:195:23 | f [captured s] | main.rs:194:40:194:40 | s | provenance | MaD:7 |
|
||||
| main.rs:195:23:195:23 | f [captured s] | main.rs:194:40:194:40 | s | provenance | MaD:8 |
|
||||
| main.rs:195:23:195:23 | f [captured s] | main.rs:194:40:194:40 | s | provenance | MaD:8 |
|
||||
| main.rs:195:23:195:23 | f [captured s] | main.rs:195:13:195:24 | apply(...) | provenance | MaD:7 |
|
||||
| main.rs:195:23:195:23 | f [captured s] | main.rs:195:13:195:24 | apply(...) | provenance | MaD:7 |
|
||||
| main.rs:195:23:195:23 | f [captured s] | main.rs:195:13:195:24 | apply(...) | provenance | MaD:8 |
|
||||
| main.rs:195:23:195:23 | f [captured s] | main.rs:195:13:195:24 | apply(...) | provenance | MaD:8 |
|
||||
| main.rs:200:9:200:9 | s | main.rs:202:19:202:19 | s | provenance | |
|
||||
| main.rs:200:9:200:9 | s | main.rs:202:19:202:19 | s | provenance | |
|
||||
| main.rs:200:13:200:22 | source(...) | main.rs:200:9:200:9 | s | provenance | |
|
||||
| main.rs:200:13:200:22 | source(...) | main.rs:200:9:200:9 | s | provenance | |
|
||||
| main.rs:201:14:201:14 | ... | main.rs:201:17:201:42 | if ... {...} else {...} | provenance | |
|
||||
| main.rs:201:14:201:14 | ... | main.rs:201:17:201:42 | if ... {...} else {...} | provenance | |
|
||||
| main.rs:202:9:202:9 | t | main.rs:203:10:203:10 | t | provenance | |
|
||||
| main.rs:202:9:202:9 | t | main.rs:203:10:203:10 | t | provenance | |
|
||||
| main.rs:202:13:202:23 | apply(...) | main.rs:202:9:202:9 | t | provenance | |
|
||||
| main.rs:202:13:202:23 | apply(...) | main.rs:202:9:202:9 | t | provenance | |
|
||||
| main.rs:202:19:202:19 | s | main.rs:201:14:201:14 | ... | provenance | MaD:7 |
|
||||
| main.rs:202:19:202:19 | s | main.rs:201:14:201:14 | ... | provenance | MaD:7 |
|
||||
| main.rs:202:19:202:19 | s | main.rs:202:13:202:23 | apply(...) | provenance | MaD:7 |
|
||||
| main.rs:202:19:202:19 | s | main.rs:202:13:202:23 | apply(...) | provenance | MaD:7 |
|
||||
| main.rs:222:9:222:9 | s [D] | main.rs:223:11:223:11 | s [D] | provenance | |
|
||||
| main.rs:222:9:222:9 | s [D] | main.rs:223:11:223:11 | s [D] | provenance | |
|
||||
| main.rs:222:13:222:23 | enum_source | main.rs:222:13:222:27 | enum_source(...) [D] | provenance | Src:MaD:5 |
|
||||
| main.rs:222:13:222:23 | enum_source | main.rs:222:13:222:27 | enum_source(...) [D] | provenance | Src:MaD:5 |
|
||||
| main.rs:222:13:222:27 | enum_source(...) [D] | main.rs:222:9:222:9 | s [D] | provenance | |
|
||||
| main.rs:222:13:222:27 | enum_source(...) [D] | main.rs:222:9:222:9 | s [D] | provenance | |
|
||||
| main.rs:223:11:223:11 | s [D] | main.rs:225:9:225:37 | ...::D {...} [D] | provenance | |
|
||||
| main.rs:223:11:223:11 | s [D] | main.rs:225:9:225:37 | ...::D {...} [D] | provenance | |
|
||||
| main.rs:225:9:225:37 | ...::D {...} [D] | main.rs:225:35:225:35 | i | provenance | |
|
||||
| main.rs:225:9:225:37 | ...::D {...} [D] | main.rs:225:35:225:35 | i | provenance | |
|
||||
| main.rs:225:35:225:35 | i | main.rs:225:47:225:47 | i | provenance | |
|
||||
| main.rs:225:35:225:35 | i | main.rs:225:47:225:47 | i | provenance | |
|
||||
| main.rs:231:9:231:9 | s [C] | main.rs:232:11:232:11 | s [C] | provenance | |
|
||||
| main.rs:231:9:231:9 | s [C] | main.rs:232:11:232:11 | s [C] | provenance | |
|
||||
| main.rs:231:13:231:24 | e.source(...) [C] | main.rs:231:9:231:9 | s [C] | provenance | |
|
||||
| main.rs:231:13:231:24 | e.source(...) [C] | main.rs:231:9:231:9 | s [C] | provenance | |
|
||||
| main.rs:231:15:231:20 | source | main.rs:231:13:231:24 | e.source(...) [C] | provenance | Src:MaD:4 |
|
||||
| main.rs:231:15:231:20 | source | main.rs:231:13:231:24 | e.source(...) [C] | provenance | Src:MaD:4 |
|
||||
| main.rs:232:11:232:11 | s [C] | main.rs:233:9:233:37 | ...::C {...} [C] | provenance | |
|
||||
| main.rs:232:11:232:11 | s [C] | main.rs:233:9:233:37 | ...::C {...} [C] | provenance | |
|
||||
| main.rs:233:9:233:37 | ...::C {...} [C] | main.rs:233:35:233:35 | i | provenance | |
|
||||
| main.rs:233:9:233:37 | ...::C {...} [C] | main.rs:233:35:233:35 | i | provenance | |
|
||||
| main.rs:233:35:233:35 | i | main.rs:233:47:233:47 | i | provenance | |
|
||||
| main.rs:233:35:233:35 | i | main.rs:233:47:233:47 | i | provenance | |
|
||||
| main.rs:242:9:242:9 | s | main.rs:243:41:243:41 | s | provenance | |
|
||||
| main.rs:242:9:242:9 | s | main.rs:243:41:243:41 | s | provenance | |
|
||||
| main.rs:242:13:242:22 | source(...) | main.rs:242:9:242:9 | s | provenance | |
|
||||
| main.rs:242:13:242:22 | source(...) | main.rs:242:9:242:9 | s | provenance | |
|
||||
| main.rs:243:15:243:43 | ...::C {...} [C] | main.rs:243:5:243:13 | enum_sink | provenance | MaD:2 Sink:MaD:2 |
|
||||
| main.rs:243:15:243:43 | ...::C {...} [C] | main.rs:243:5:243:13 | enum_sink | provenance | MaD:2 Sink:MaD:2 |
|
||||
| main.rs:243:41:243:41 | s | main.rs:243:15:243:43 | ...::C {...} [C] | provenance | |
|
||||
| main.rs:243:41:243:41 | s | main.rs:243:15:243:43 | ...::C {...} [C] | provenance | |
|
||||
| main.rs:248:9:248:9 | s | main.rs:249:39:249:39 | s | provenance | |
|
||||
| main.rs:248:9:248:9 | s | main.rs:249:39:249:39 | s | provenance | |
|
||||
| main.rs:248:13:248:22 | source(...) | main.rs:248:9:248:9 | s | provenance | |
|
||||
| main.rs:248:13:248:22 | source(...) | main.rs:248:9:248:9 | s | provenance | |
|
||||
| main.rs:249:9:249:9 | e [D] | main.rs:250:5:250:5 | e [D] | provenance | |
|
||||
| main.rs:249:9:249:9 | e [D] | main.rs:250:5:250:5 | e [D] | provenance | |
|
||||
| main.rs:249:13:249:41 | ...::D {...} [D] | main.rs:249:9:249:9 | e [D] | provenance | |
|
||||
| main.rs:249:13:249:41 | ...::D {...} [D] | main.rs:249:9:249:9 | e [D] | provenance | |
|
||||
| main.rs:249:39:249:39 | s | main.rs:249:13:249:41 | ...::D {...} [D] | provenance | |
|
||||
| main.rs:249:39:249:39 | s | main.rs:249:13:249:41 | ...::D {...} [D] | provenance | |
|
||||
| main.rs:250:5:250:5 | e [D] | main.rs:250:7:250:10 | sink | provenance | MaD:1 Sink:MaD:1 |
|
||||
| main.rs:250:5:250:5 | e [D] | main.rs:250:7:250:10 | sink | provenance | MaD:1 Sink:MaD:1 |
|
||||
| main.rs:259:9:259:9 | s | main.rs:260:10:260:10 | s | provenance | |
|
||||
| main.rs:259:9:259:9 | s | main.rs:260:10:260:10 | s | provenance | |
|
||||
| main.rs:259:13:259:25 | simple_source | main.rs:259:13:259:29 | simple_source(...) | provenance | Src:MaD:6 MaD:6 |
|
||||
| main.rs:259:13:259:25 | simple_source | main.rs:259:13:259:29 | simple_source(...) | provenance | Src:MaD:6 MaD:6 |
|
||||
| main.rs:259:13:259:29 | simple_source(...) | main.rs:259:9:259:9 | s | provenance | |
|
||||
| main.rs:259:13:259:29 | simple_source(...) | main.rs:259:9:259:9 | s | provenance | |
|
||||
| main.rs:267:9:267:9 | s | main.rs:268:17:268:17 | s | provenance | |
|
||||
| main.rs:267:9:267:9 | s | main.rs:268:17:268:17 | s | provenance | |
|
||||
| main.rs:267:13:267:22 | source(...) | main.rs:267:9:267:9 | s | provenance | |
|
||||
| main.rs:267:13:267:22 | source(...) | main.rs:267:9:267:9 | s | provenance | |
|
||||
| main.rs:268:17:268:17 | s | main.rs:268:5:268:15 | simple_sink | provenance | MaD:3 Sink:MaD:3 |
|
||||
| main.rs:268:17:268:17 | s | main.rs:268:5:268:15 | simple_sink | provenance | MaD:3 Sink:MaD:3 |
|
||||
nodes
|
||||
| main.rs:15:9:15:9 | s | semmle.label | s |
|
||||
| main.rs:15:9:15:9 | s | semmle.label | s |
|
||||
@@ -290,22 +330,22 @@ nodes
|
||||
| main.rs:138:13:138:21 | source(...) | semmle.label | source(...) |
|
||||
| main.rs:139:10:139:31 | get_array_element(...) | semmle.label | get_array_element(...) |
|
||||
| main.rs:139:10:139:31 | get_array_element(...) | semmle.label | get_array_element(...) |
|
||||
| main.rs:139:28:139:30 | [...] [array[]] | semmle.label | [...] [array[]] |
|
||||
| main.rs:139:28:139:30 | [...] [array[]] | semmle.label | [...] [array[]] |
|
||||
| main.rs:139:28:139:30 | [...] [element] | semmle.label | [...] [element] |
|
||||
| main.rs:139:28:139:30 | [...] [element] | semmle.label | [...] [element] |
|
||||
| main.rs:139:29:139:29 | s | semmle.label | s |
|
||||
| main.rs:139:29:139:29 | s | semmle.label | s |
|
||||
| main.rs:148:9:148:9 | s | semmle.label | s |
|
||||
| main.rs:148:9:148:9 | s | semmle.label | s |
|
||||
| main.rs:148:13:148:21 | source(...) | semmle.label | source(...) |
|
||||
| main.rs:148:13:148:21 | source(...) | semmle.label | source(...) |
|
||||
| main.rs:149:9:149:11 | arr [array[]] | semmle.label | arr [array[]] |
|
||||
| main.rs:149:9:149:11 | arr [array[]] | semmle.label | arr [array[]] |
|
||||
| main.rs:149:15:149:34 | set_array_element(...) [array[]] | semmle.label | set_array_element(...) [array[]] |
|
||||
| main.rs:149:15:149:34 | set_array_element(...) [array[]] | semmle.label | set_array_element(...) [array[]] |
|
||||
| main.rs:149:9:149:11 | arr [element] | semmle.label | arr [element] |
|
||||
| main.rs:149:9:149:11 | arr [element] | semmle.label | arr [element] |
|
||||
| main.rs:149:15:149:34 | set_array_element(...) [element] | semmle.label | set_array_element(...) [element] |
|
||||
| main.rs:149:15:149:34 | set_array_element(...) [element] | semmle.label | set_array_element(...) [element] |
|
||||
| main.rs:149:33:149:33 | s | semmle.label | s |
|
||||
| main.rs:149:33:149:33 | s | semmle.label | s |
|
||||
| main.rs:150:10:150:12 | arr [array[]] | semmle.label | arr [array[]] |
|
||||
| main.rs:150:10:150:12 | arr [array[]] | semmle.label | arr [array[]] |
|
||||
| main.rs:150:10:150:12 | arr [element] | semmle.label | arr [element] |
|
||||
| main.rs:150:10:150:12 | arr [element] | semmle.label | arr [element] |
|
||||
| main.rs:150:10:150:15 | arr[0] | semmle.label | arr[0] |
|
||||
| main.rs:150:10:150:15 | arr[0] | semmle.label | arr[0] |
|
||||
| main.rs:159:9:159:9 | s | semmle.label | s |
|
||||
@@ -336,75 +376,119 @@ nodes
|
||||
| main.rs:175:10:175:10 | t [tuple.1] | semmle.label | t [tuple.1] |
|
||||
| main.rs:175:10:175:12 | t.1 | semmle.label | t.1 |
|
||||
| main.rs:175:10:175:12 | t.1 | semmle.label | t.1 |
|
||||
| main.rs:194:9:194:9 | s [D] | semmle.label | s [D] |
|
||||
| main.rs:194:9:194:9 | s [D] | semmle.label | s [D] |
|
||||
| main.rs:194:13:194:23 | enum_source | semmle.label | enum_source |
|
||||
| main.rs:194:13:194:23 | enum_source | semmle.label | enum_source |
|
||||
| main.rs:194:13:194:27 | enum_source(...) [D] | semmle.label | enum_source(...) [D] |
|
||||
| main.rs:194:13:194:27 | enum_source(...) [D] | semmle.label | enum_source(...) [D] |
|
||||
| main.rs:195:11:195:11 | s [D] | semmle.label | s [D] |
|
||||
| main.rs:195:11:195:11 | s [D] | semmle.label | s [D] |
|
||||
| main.rs:197:9:197:37 | ...::D {...} [D] | semmle.label | ...::D {...} [D] |
|
||||
| main.rs:197:9:197:37 | ...::D {...} [D] | semmle.label | ...::D {...} [D] |
|
||||
| main.rs:197:35:197:35 | i | semmle.label | i |
|
||||
| main.rs:197:35:197:35 | i | semmle.label | i |
|
||||
| main.rs:197:47:197:47 | i | semmle.label | i |
|
||||
| main.rs:197:47:197:47 | i | semmle.label | i |
|
||||
| main.rs:203:9:203:9 | s [C] | semmle.label | s [C] |
|
||||
| main.rs:203:9:203:9 | s [C] | semmle.label | s [C] |
|
||||
| main.rs:203:13:203:24 | e.source(...) [C] | semmle.label | e.source(...) [C] |
|
||||
| main.rs:203:13:203:24 | e.source(...) [C] | semmle.label | e.source(...) [C] |
|
||||
| main.rs:203:15:203:20 | source | semmle.label | source |
|
||||
| main.rs:203:15:203:20 | source | semmle.label | source |
|
||||
| main.rs:204:11:204:11 | s [C] | semmle.label | s [C] |
|
||||
| main.rs:204:11:204:11 | s [C] | semmle.label | s [C] |
|
||||
| main.rs:205:9:205:37 | ...::C {...} [C] | semmle.label | ...::C {...} [C] |
|
||||
| main.rs:205:9:205:37 | ...::C {...} [C] | semmle.label | ...::C {...} [C] |
|
||||
| main.rs:205:35:205:35 | i | semmle.label | i |
|
||||
| main.rs:205:35:205:35 | i | semmle.label | i |
|
||||
| main.rs:205:47:205:47 | i | semmle.label | i |
|
||||
| main.rs:205:47:205:47 | i | semmle.label | i |
|
||||
| main.rs:214:9:214:9 | s | semmle.label | s |
|
||||
| main.rs:214:9:214:9 | s | semmle.label | s |
|
||||
| main.rs:214:13:214:22 | source(...) | semmle.label | source(...) |
|
||||
| main.rs:214:13:214:22 | source(...) | semmle.label | source(...) |
|
||||
| main.rs:215:5:215:13 | enum_sink | semmle.label | enum_sink |
|
||||
| main.rs:215:5:215:13 | enum_sink | semmle.label | enum_sink |
|
||||
| main.rs:215:15:215:43 | ...::C {...} [C] | semmle.label | ...::C {...} [C] |
|
||||
| main.rs:215:15:215:43 | ...::C {...} [C] | semmle.label | ...::C {...} [C] |
|
||||
| main.rs:215:41:215:41 | s | semmle.label | s |
|
||||
| main.rs:215:41:215:41 | s | semmle.label | s |
|
||||
| main.rs:220:9:220:9 | s | semmle.label | s |
|
||||
| main.rs:220:9:220:9 | s | semmle.label | s |
|
||||
| main.rs:220:13:220:22 | source(...) | semmle.label | source(...) |
|
||||
| main.rs:220:13:220:22 | source(...) | semmle.label | source(...) |
|
||||
| main.rs:221:9:221:9 | e [D] | semmle.label | e [D] |
|
||||
| main.rs:221:9:221:9 | e [D] | semmle.label | e [D] |
|
||||
| main.rs:221:13:221:41 | ...::D {...} [D] | semmle.label | ...::D {...} [D] |
|
||||
| main.rs:221:13:221:41 | ...::D {...} [D] | semmle.label | ...::D {...} [D] |
|
||||
| main.rs:221:39:221:39 | s | semmle.label | s |
|
||||
| main.rs:221:39:221:39 | s | semmle.label | s |
|
||||
| main.rs:222:5:222:5 | e [D] | semmle.label | e [D] |
|
||||
| main.rs:222:5:222:5 | e [D] | semmle.label | e [D] |
|
||||
| main.rs:222:7:222:10 | sink | semmle.label | sink |
|
||||
| main.rs:222:7:222:10 | sink | semmle.label | sink |
|
||||
| main.rs:231:9:231:9 | s | semmle.label | s |
|
||||
| main.rs:231:9:231:9 | s | semmle.label | s |
|
||||
| main.rs:231:13:231:25 | simple_source | semmle.label | simple_source |
|
||||
| main.rs:231:13:231:25 | simple_source | semmle.label | simple_source |
|
||||
| main.rs:231:13:231:29 | simple_source(...) | semmle.label | simple_source(...) |
|
||||
| main.rs:231:13:231:29 | simple_source(...) | semmle.label | simple_source(...) |
|
||||
| main.rs:232:10:232:10 | s | semmle.label | s |
|
||||
| main.rs:232:10:232:10 | s | semmle.label | s |
|
||||
| main.rs:239:9:239:9 | s | semmle.label | s |
|
||||
| main.rs:239:9:239:9 | s | semmle.label | s |
|
||||
| main.rs:239:13:239:22 | source(...) | semmle.label | source(...) |
|
||||
| main.rs:239:13:239:22 | source(...) | semmle.label | source(...) |
|
||||
| main.rs:240:5:240:15 | simple_sink | semmle.label | simple_sink |
|
||||
| main.rs:240:5:240:15 | simple_sink | semmle.label | simple_sink |
|
||||
| main.rs:240:17:240:17 | s | semmle.label | s |
|
||||
| main.rs:240:17:240:17 | s | semmle.label | s |
|
||||
| main.rs:184:9:184:9 | s | semmle.label | s |
|
||||
| main.rs:184:9:184:9 | s | semmle.label | s |
|
||||
| main.rs:184:13:184:22 | source(...) | semmle.label | source(...) |
|
||||
| main.rs:184:13:184:22 | source(...) | semmle.label | source(...) |
|
||||
| main.rs:185:14:185:14 | ... | semmle.label | ... |
|
||||
| main.rs:185:14:185:14 | ... | semmle.label | ... |
|
||||
| main.rs:186:14:186:14 | n | semmle.label | n |
|
||||
| main.rs:186:14:186:14 | n | semmle.label | n |
|
||||
| main.rs:189:11:189:11 | s | semmle.label | s |
|
||||
| main.rs:189:11:189:11 | s | semmle.label | s |
|
||||
| main.rs:193:13:193:22 | source(...) | semmle.label | source(...) |
|
||||
| main.rs:193:13:193:22 | source(...) | semmle.label | source(...) |
|
||||
| main.rs:194:17:194:42 | if ... {...} else {...} | semmle.label | if ... {...} else {...} |
|
||||
| main.rs:194:17:194:42 | if ... {...} else {...} | semmle.label | if ... {...} else {...} |
|
||||
| main.rs:194:40:194:40 | s | semmle.label | s |
|
||||
| main.rs:194:40:194:40 | s | semmle.label | s |
|
||||
| main.rs:195:9:195:9 | t | semmle.label | t |
|
||||
| main.rs:195:9:195:9 | t | semmle.label | t |
|
||||
| main.rs:195:13:195:24 | apply(...) | semmle.label | apply(...) |
|
||||
| main.rs:195:13:195:24 | apply(...) | semmle.label | apply(...) |
|
||||
| main.rs:195:23:195:23 | f [captured s] | semmle.label | f [captured s] |
|
||||
| main.rs:195:23:195:23 | f [captured s] | semmle.label | f [captured s] |
|
||||
| main.rs:196:10:196:10 | t | semmle.label | t |
|
||||
| main.rs:196:10:196:10 | t | semmle.label | t |
|
||||
| main.rs:200:9:200:9 | s | semmle.label | s |
|
||||
| main.rs:200:9:200:9 | s | semmle.label | s |
|
||||
| main.rs:200:13:200:22 | source(...) | semmle.label | source(...) |
|
||||
| main.rs:200:13:200:22 | source(...) | semmle.label | source(...) |
|
||||
| main.rs:201:14:201:14 | ... | semmle.label | ... |
|
||||
| main.rs:201:14:201:14 | ... | semmle.label | ... |
|
||||
| main.rs:201:17:201:42 | if ... {...} else {...} | semmle.label | if ... {...} else {...} |
|
||||
| main.rs:201:17:201:42 | if ... {...} else {...} | semmle.label | if ... {...} else {...} |
|
||||
| main.rs:202:9:202:9 | t | semmle.label | t |
|
||||
| main.rs:202:9:202:9 | t | semmle.label | t |
|
||||
| main.rs:202:13:202:23 | apply(...) | semmle.label | apply(...) |
|
||||
| main.rs:202:13:202:23 | apply(...) | semmle.label | apply(...) |
|
||||
| main.rs:202:19:202:19 | s | semmle.label | s |
|
||||
| main.rs:202:19:202:19 | s | semmle.label | s |
|
||||
| main.rs:203:10:203:10 | t | semmle.label | t |
|
||||
| main.rs:203:10:203:10 | t | semmle.label | t |
|
||||
| main.rs:222:9:222:9 | s [D] | semmle.label | s [D] |
|
||||
| main.rs:222:9:222:9 | s [D] | semmle.label | s [D] |
|
||||
| main.rs:222:13:222:23 | enum_source | semmle.label | enum_source |
|
||||
| main.rs:222:13:222:23 | enum_source | semmle.label | enum_source |
|
||||
| main.rs:222:13:222:27 | enum_source(...) [D] | semmle.label | enum_source(...) [D] |
|
||||
| main.rs:222:13:222:27 | enum_source(...) [D] | semmle.label | enum_source(...) [D] |
|
||||
| main.rs:223:11:223:11 | s [D] | semmle.label | s [D] |
|
||||
| main.rs:223:11:223:11 | s [D] | semmle.label | s [D] |
|
||||
| main.rs:225:9:225:37 | ...::D {...} [D] | semmle.label | ...::D {...} [D] |
|
||||
| main.rs:225:9:225:37 | ...::D {...} [D] | semmle.label | ...::D {...} [D] |
|
||||
| main.rs:225:35:225:35 | i | semmle.label | i |
|
||||
| main.rs:225:35:225:35 | i | semmle.label | i |
|
||||
| main.rs:225:47:225:47 | i | semmle.label | i |
|
||||
| main.rs:225:47:225:47 | i | semmle.label | i |
|
||||
| main.rs:231:9:231:9 | s [C] | semmle.label | s [C] |
|
||||
| main.rs:231:9:231:9 | s [C] | semmle.label | s [C] |
|
||||
| main.rs:231:13:231:24 | e.source(...) [C] | semmle.label | e.source(...) [C] |
|
||||
| main.rs:231:13:231:24 | e.source(...) [C] | semmle.label | e.source(...) [C] |
|
||||
| main.rs:231:15:231:20 | source | semmle.label | source |
|
||||
| main.rs:231:15:231:20 | source | semmle.label | source |
|
||||
| main.rs:232:11:232:11 | s [C] | semmle.label | s [C] |
|
||||
| main.rs:232:11:232:11 | s [C] | semmle.label | s [C] |
|
||||
| main.rs:233:9:233:37 | ...::C {...} [C] | semmle.label | ...::C {...} [C] |
|
||||
| main.rs:233:9:233:37 | ...::C {...} [C] | semmle.label | ...::C {...} [C] |
|
||||
| main.rs:233:35:233:35 | i | semmle.label | i |
|
||||
| main.rs:233:35:233:35 | i | semmle.label | i |
|
||||
| main.rs:233:47:233:47 | i | semmle.label | i |
|
||||
| main.rs:233:47:233:47 | i | semmle.label | i |
|
||||
| main.rs:242:9:242:9 | s | semmle.label | s |
|
||||
| main.rs:242:9:242:9 | s | semmle.label | s |
|
||||
| main.rs:242:13:242:22 | source(...) | semmle.label | source(...) |
|
||||
| main.rs:242:13:242:22 | source(...) | semmle.label | source(...) |
|
||||
| main.rs:243:5:243:13 | enum_sink | semmle.label | enum_sink |
|
||||
| main.rs:243:5:243:13 | enum_sink | semmle.label | enum_sink |
|
||||
| main.rs:243:15:243:43 | ...::C {...} [C] | semmle.label | ...::C {...} [C] |
|
||||
| main.rs:243:15:243:43 | ...::C {...} [C] | semmle.label | ...::C {...} [C] |
|
||||
| main.rs:243:41:243:41 | s | semmle.label | s |
|
||||
| main.rs:243:41:243:41 | s | semmle.label | s |
|
||||
| main.rs:248:9:248:9 | s | semmle.label | s |
|
||||
| main.rs:248:9:248:9 | s | semmle.label | s |
|
||||
| main.rs:248:13:248:22 | source(...) | semmle.label | source(...) |
|
||||
| main.rs:248:13:248:22 | source(...) | semmle.label | source(...) |
|
||||
| main.rs:249:9:249:9 | e [D] | semmle.label | e [D] |
|
||||
| main.rs:249:9:249:9 | e [D] | semmle.label | e [D] |
|
||||
| main.rs:249:13:249:41 | ...::D {...} [D] | semmle.label | ...::D {...} [D] |
|
||||
| main.rs:249:13:249:41 | ...::D {...} [D] | semmle.label | ...::D {...} [D] |
|
||||
| main.rs:249:39:249:39 | s | semmle.label | s |
|
||||
| main.rs:249:39:249:39 | s | semmle.label | s |
|
||||
| main.rs:250:5:250:5 | e [D] | semmle.label | e [D] |
|
||||
| main.rs:250:5:250:5 | e [D] | semmle.label | e [D] |
|
||||
| main.rs:250:7:250:10 | sink | semmle.label | sink |
|
||||
| main.rs:250:7:250:10 | sink | semmle.label | sink |
|
||||
| main.rs:259:9:259:9 | s | semmle.label | s |
|
||||
| main.rs:259:9:259:9 | s | semmle.label | s |
|
||||
| main.rs:259:13:259:25 | simple_source | semmle.label | simple_source |
|
||||
| main.rs:259:13:259:25 | simple_source | semmle.label | simple_source |
|
||||
| main.rs:259:13:259:29 | simple_source(...) | semmle.label | simple_source(...) |
|
||||
| main.rs:259:13:259:29 | simple_source(...) | semmle.label | simple_source(...) |
|
||||
| main.rs:260:10:260:10 | s | semmle.label | s |
|
||||
| main.rs:260:10:260:10 | s | semmle.label | s |
|
||||
| main.rs:267:9:267:9 | s | semmle.label | s |
|
||||
| main.rs:267:9:267:9 | s | semmle.label | s |
|
||||
| main.rs:267:13:267:22 | source(...) | semmle.label | source(...) |
|
||||
| main.rs:267:13:267:22 | source(...) | semmle.label | source(...) |
|
||||
| main.rs:268:5:268:15 | simple_sink | semmle.label | simple_sink |
|
||||
| main.rs:268:5:268:15 | simple_sink | semmle.label | simple_sink |
|
||||
| main.rs:268:17:268:17 | s | semmle.label | s |
|
||||
| main.rs:268:17:268:17 | s | semmle.label | s |
|
||||
subpaths
|
||||
| main.rs:195:23:195:23 | f [captured s] | main.rs:194:40:194:40 | s | main.rs:194:17:194:42 | if ... {...} else {...} | main.rs:195:13:195:24 | apply(...) |
|
||||
| main.rs:195:23:195:23 | f [captured s] | main.rs:194:40:194:40 | s | main.rs:194:17:194:42 | if ... {...} else {...} | main.rs:195:13:195:24 | apply(...) |
|
||||
| main.rs:202:19:202:19 | s | main.rs:201:14:201:14 | ... | main.rs:201:17:201:42 | if ... {...} else {...} | main.rs:202:13:202:23 | apply(...) |
|
||||
| main.rs:202:19:202:19 | s | main.rs:201:14:201:14 | ... | main.rs:201:17:201:42 | if ... {...} else {...} | main.rs:202:13:202:23 | apply(...) |
|
||||
testFailures
|
||||
invalidSpecComponent
|
||||
#select
|
||||
@@ -429,15 +513,21 @@ invalidSpecComponent
|
||||
| main.rs:161:10:161:29 | get_tuple_element(...) | main.rs:159:13:159:22 | source(...) | main.rs:161:10:161:29 | get_tuple_element(...) | $@ | main.rs:159:13:159:22 | source(...) | source(...) |
|
||||
| main.rs:175:10:175:12 | t.1 | main.rs:172:13:172:22 | source(...) | main.rs:175:10:175:12 | t.1 | $@ | main.rs:172:13:172:22 | source(...) | source(...) |
|
||||
| main.rs:175:10:175:12 | t.1 | main.rs:172:13:172:22 | source(...) | main.rs:175:10:175:12 | t.1 | $@ | main.rs:172:13:172:22 | source(...) | source(...) |
|
||||
| main.rs:197:47:197:47 | i | main.rs:194:13:194:23 | enum_source | main.rs:197:47:197:47 | i | $@ | main.rs:194:13:194:23 | enum_source | enum_source |
|
||||
| main.rs:197:47:197:47 | i | main.rs:194:13:194:23 | enum_source | main.rs:197:47:197:47 | i | $@ | main.rs:194:13:194:23 | enum_source | enum_source |
|
||||
| main.rs:205:47:205:47 | i | main.rs:203:15:203:20 | source | main.rs:205:47:205:47 | i | $@ | main.rs:203:15:203:20 | source | source |
|
||||
| main.rs:205:47:205:47 | i | main.rs:203:15:203:20 | source | main.rs:205:47:205:47 | i | $@ | main.rs:203:15:203:20 | source | source |
|
||||
| main.rs:215:5:215:13 | enum_sink | main.rs:214:13:214:22 | source(...) | main.rs:215:5:215:13 | enum_sink | $@ | main.rs:214:13:214:22 | source(...) | source(...) |
|
||||
| main.rs:215:5:215:13 | enum_sink | main.rs:214:13:214:22 | source(...) | main.rs:215:5:215:13 | enum_sink | $@ | main.rs:214:13:214:22 | source(...) | source(...) |
|
||||
| main.rs:222:7:222:10 | sink | main.rs:220:13:220:22 | source(...) | main.rs:222:7:222:10 | sink | $@ | main.rs:220:13:220:22 | source(...) | source(...) |
|
||||
| main.rs:222:7:222:10 | sink | main.rs:220:13:220:22 | source(...) | main.rs:222:7:222:10 | sink | $@ | main.rs:220:13:220:22 | source(...) | source(...) |
|
||||
| main.rs:232:10:232:10 | s | main.rs:231:13:231:25 | simple_source | main.rs:232:10:232:10 | s | $@ | main.rs:231:13:231:25 | simple_source | simple_source |
|
||||
| main.rs:232:10:232:10 | s | main.rs:231:13:231:25 | simple_source | main.rs:232:10:232:10 | s | $@ | main.rs:231:13:231:25 | simple_source | simple_source |
|
||||
| main.rs:240:5:240:15 | simple_sink | main.rs:239:13:239:22 | source(...) | main.rs:240:5:240:15 | simple_sink | $@ | main.rs:239:13:239:22 | source(...) | source(...) |
|
||||
| main.rs:240:5:240:15 | simple_sink | main.rs:239:13:239:22 | source(...) | main.rs:240:5:240:15 | simple_sink | $@ | main.rs:239:13:239:22 | source(...) | source(...) |
|
||||
| main.rs:186:14:186:14 | n | main.rs:184:13:184:22 | source(...) | main.rs:186:14:186:14 | n | $@ | main.rs:184:13:184:22 | source(...) | source(...) |
|
||||
| main.rs:186:14:186:14 | n | main.rs:184:13:184:22 | source(...) | main.rs:186:14:186:14 | n | $@ | main.rs:184:13:184:22 | source(...) | source(...) |
|
||||
| main.rs:196:10:196:10 | t | main.rs:193:13:193:22 | source(...) | main.rs:196:10:196:10 | t | $@ | main.rs:193:13:193:22 | source(...) | source(...) |
|
||||
| main.rs:196:10:196:10 | t | main.rs:193:13:193:22 | source(...) | main.rs:196:10:196:10 | t | $@ | main.rs:193:13:193:22 | source(...) | source(...) |
|
||||
| main.rs:203:10:203:10 | t | main.rs:200:13:200:22 | source(...) | main.rs:203:10:203:10 | t | $@ | main.rs:200:13:200:22 | source(...) | source(...) |
|
||||
| main.rs:203:10:203:10 | t | main.rs:200:13:200:22 | source(...) | main.rs:203:10:203:10 | t | $@ | main.rs:200:13:200:22 | source(...) | source(...) |
|
||||
| main.rs:225:47:225:47 | i | main.rs:222:13:222:23 | enum_source | main.rs:225:47:225:47 | i | $@ | main.rs:222:13:222:23 | enum_source | enum_source |
|
||||
| main.rs:225:47:225:47 | i | main.rs:222:13:222:23 | enum_source | main.rs:225:47:225:47 | i | $@ | main.rs:222:13:222:23 | enum_source | enum_source |
|
||||
| main.rs:233:47:233:47 | i | main.rs:231:15:231:20 | source | main.rs:233:47:233:47 | i | $@ | main.rs:231:15:231:20 | source | source |
|
||||
| main.rs:233:47:233:47 | i | main.rs:231:15:231:20 | source | main.rs:233:47:233:47 | i | $@ | main.rs:231:15:231:20 | source | source |
|
||||
| main.rs:243:5:243:13 | enum_sink | main.rs:242:13:242:22 | source(...) | main.rs:243:5:243:13 | enum_sink | $@ | main.rs:242:13:242:22 | source(...) | source(...) |
|
||||
| main.rs:243:5:243:13 | enum_sink | main.rs:242:13:242:22 | source(...) | main.rs:243:5:243:13 | enum_sink | $@ | main.rs:242:13:242:22 | source(...) | source(...) |
|
||||
| main.rs:250:7:250:10 | sink | main.rs:248:13:248:22 | source(...) | main.rs:250:7:250:10 | sink | $@ | main.rs:248:13:248:22 | source(...) | source(...) |
|
||||
| main.rs:250:7:250:10 | sink | main.rs:248:13:248:22 | source(...) | main.rs:250:7:250:10 | sink | $@ | main.rs:248:13:248:22 | source(...) | source(...) |
|
||||
| main.rs:260:10:260:10 | s | main.rs:259:13:259:25 | simple_source | main.rs:260:10:260:10 | s | $@ | main.rs:259:13:259:25 | simple_source | simple_source |
|
||||
| main.rs:260:10:260:10 | s | main.rs:259:13:259:25 | simple_source | main.rs:260:10:260:10 | s | $@ | main.rs:259:13:259:25 | simple_source | simple_source |
|
||||
| main.rs:268:5:268:15 | simple_sink | main.rs:267:13:267:22 | source(...) | main.rs:268:5:268:15 | simple_sink | $@ | main.rs:267:13:267:22 | source(...) | source(...) |
|
||||
| main.rs:268:5:268:15 | simple_sink | main.rs:267:13:267:22 | source(...) | main.rs:268:5:268:15 | simple_sink | $@ | main.rs:267:13:267:22 | source(...) | source(...) |
|
||||
|
||||
@@ -24,7 +24,9 @@ extensions:
|
||||
- ["repo::test", "crate::set_var_field", "Argument[0]", "ReturnValue.Variant[crate::MyFieldEnum::D::field_d]", "value", "manual"]
|
||||
- ["repo::test", "crate::get_struct_field", "Argument[0].Struct[crate::MyStruct::field1]", "ReturnValue", "value", "manual"]
|
||||
- ["repo::test", "crate::set_struct_field", "Argument[0]", "ReturnValue.Struct[crate::MyStruct::field2]", "value", "manual"]
|
||||
- ["repo::test", "crate::get_array_element", "Argument[0].ArrayElement", "ReturnValue", "value", "manual"]
|
||||
- ["repo::test", "crate::set_array_element", "Argument[0]", "ReturnValue.ArrayElement", "value", "manual"]
|
||||
- ["repo::test", "crate::get_array_element", "Argument[0].Element", "ReturnValue", "value", "manual"]
|
||||
- ["repo::test", "crate::set_array_element", "Argument[0]", "ReturnValue.Element", "value", "manual"]
|
||||
- ["repo::test", "crate::get_tuple_element", "Argument[0].Tuple[0]", "ReturnValue", "value", "manual"]
|
||||
- ["repo::test", "crate::set_tuple_element", "Argument[0]", "ReturnValue.Tuple[1]", "value", "manual"]
|
||||
- ["repo::test", "crate::apply", "Argument[0]", "Argument[1].Parameter[0]", "value", "manual"]
|
||||
- ["repo::test", "crate::apply", "Argument[1].ReturnValue", "ReturnValue", "value", "manual"]
|
||||
|
||||
@@ -14,6 +14,12 @@ module MyFlowConfig implements DataFlow::ConfigSig {
|
||||
.getArgList()
|
||||
.getAnArg() = sink.asExpr().getExpr()
|
||||
}
|
||||
|
||||
predicate allowImplicitRead(DataFlow::Node node, DataFlow::ContentSet c) {
|
||||
// flow out from any content at the sink.
|
||||
isSink(node) and
|
||||
exists(c)
|
||||
}
|
||||
}
|
||||
|
||||
module MyFlowTest = TaintFlowTest<MyFlowConfig>;
|
||||
|
||||
@@ -14,4 +14,8 @@
|
||||
| test.rs:52:16:52:33 | ...::home_dir | Flow source 'CommandLineArgs' of type commandargs. |
|
||||
| test.rs:60:26:60:47 | ...::get | Flow source 'RemoteSource' of type remote (DEFAULT). |
|
||||
| test.rs:63:26:63:47 | ...::get | Flow source 'RemoteSource' of type remote (DEFAULT). |
|
||||
| test.rs:66:26:66:37 | ...::get | Flow source 'RemoteSource' of type remote (DEFAULT). |
|
||||
| test.rs:66:26:66:47 | ...::get | Flow source 'RemoteSource' of type remote (DEFAULT). |
|
||||
| test.rs:69:26:69:47 | ...::get | Flow source 'RemoteSource' of type remote (DEFAULT). |
|
||||
| test.rs:72:26:72:37 | ...::get | Flow source 'RemoteSource' of type remote (DEFAULT). |
|
||||
| test.rs:75:26:75:37 | ...::get | Flow source 'RemoteSource' of type remote (DEFAULT). |
|
||||
| test.rs:78:24:78:35 | ...::get | Flow source 'RemoteSource' of type remote (DEFAULT). |
|
||||
|
||||
@@ -11,8 +11,8 @@ fn test_env_vars() {
|
||||
let var1 = std::env::var("HOME").expect("HOME not set"); // $ Alert[rust/summary/taint-sources]
|
||||
let var2 = std::env::var_os("PATH").unwrap(); // $ Alert[rust/summary/taint-sources]
|
||||
|
||||
sink(var1); // $ MISSING: hasTaintFlow
|
||||
sink(var2); // $ MISSING: hasTaintFlow
|
||||
sink(var1); // $ hasTaintFlow="HOME"
|
||||
sink(var2); // $ hasTaintFlow="PATH"
|
||||
|
||||
for (key, value) in std::env::vars() { // $ Alert[rust/summary/taint-sources]
|
||||
sink(key); // $ MISSING: hasTaintFlow
|
||||
@@ -51,20 +51,34 @@ fn test_env_dirs() {
|
||||
let exe = std::env::current_exe().expect("FAILED"); // $ Alert[rust/summary/taint-sources]
|
||||
let home = std::env::home_dir().expect("FAILED"); // $ Alert[rust/summary/taint-sources]
|
||||
|
||||
sink(dir); // $ MISSING: hasTaintFlow
|
||||
sink(exe); // $ MISSING: hasTaintFlow
|
||||
sink(home); // $ MISSING: hasTaintFlow
|
||||
sink(dir); // $ hasTaintFlow
|
||||
sink(exe); // $ hasTaintFlow
|
||||
sink(home); // $ hasTaintFlow
|
||||
}
|
||||
|
||||
async fn test_reqwest() -> Result<(), reqwest::Error> {
|
||||
let remote_string1 = reqwest::blocking::get("http://example.com/")?.text()?; // $ Alert[rust/summary/taint-sources]
|
||||
sink(remote_string1); // $ MISSING: hasTaintFlow
|
||||
let remote_string1 = reqwest::blocking::get("example.com")?.text()?; // $ Alert[rust/summary/taint-sources]
|
||||
sink(remote_string1); // $ hasTaintFlow="example.com"
|
||||
|
||||
let remote_string2 = reqwest::blocking::get("http://example.com/").unwrap().text().unwrap(); // $ Alert[rust/summary/taint-sources]
|
||||
sink(remote_string2); // $ MISSING: hasTaintFlow
|
||||
let remote_string2 = reqwest::blocking::get("example.com").unwrap().text().unwrap(); // $ Alert[rust/summary/taint-sources]
|
||||
sink(remote_string2); // $ hasTaintFlow="example.com"
|
||||
|
||||
let remote_string3 = reqwest::get("http://example.com/").await?.text().await?; // $ Alert[rust/summary/taint-sources]
|
||||
sink(remote_string3); // $ MISSING: hasTaintFlow
|
||||
let remote_string3 = reqwest::blocking::get("example.com").unwrap().text_with_charset("utf-8").unwrap(); // $ Alert[rust/summary/taint-sources]
|
||||
sink(remote_string3); // $ hasTaintFlow="example.com"
|
||||
|
||||
let remote_string4 = reqwest::blocking::get("example.com").unwrap().bytes().unwrap(); // $ Alert[rust/summary/taint-sources]
|
||||
sink(remote_string4); // $ hasTaintFlow="example.com"
|
||||
|
||||
let remote_string5 = reqwest::get("example.com").await?.text().await?; // $ Alert[rust/summary/taint-sources]
|
||||
sink(remote_string5); // $ MISSING: hasTaintFlow
|
||||
|
||||
let remote_string6 = reqwest::get("example.com").await?.bytes().await?; // $ Alert[rust/summary/taint-sources]
|
||||
sink(remote_string6); // $ MISSING: hasTaintFlow
|
||||
|
||||
let mut request1 = reqwest::get("example.com").await?; // $ Alert[rust/summary/taint-sources]
|
||||
while let Some(chunk) = request1.chunk().await? {
|
||||
sink(chunk); // $ MISSING: hasTaintFlow
|
||||
}
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
@@ -1,6 +1,14 @@
|
||||
| file://:0:0:0:0 | [summary param] 0 in lang:alloc::_::crate::fmt::format | file://:0:0:0:0 | [summary] to write: ReturnValue in lang:alloc::_::crate::fmt::format | MaD:34 |
|
||||
| file://:0:0:0:0 | [summary param] self in lang:alloc::_::<crate::string::String>::as_str | file://:0:0:0:0 | [summary] to write: ReturnValue in lang:alloc::_::<crate::string::String>::as_str | MaD:32 |
|
||||
| file://:0:0:0:0 | [summary param] self in repo:https://github.com/seanmonstar/reqwest:reqwest::_::<crate::blocking::response::Response>::text | file://:0:0:0:0 | [summary] to write: ReturnValue.Variant[crate::result::Result::Ok(0)] in repo:https://github.com/seanmonstar/reqwest:reqwest::_::<crate::blocking::response::Response>::text | MaD:10 |
|
||||
additionalTaintStep
|
||||
| file://:0:0:0:0 | [summary param] 0 in lang:alloc::_::crate::fmt::format | file://:0:0:0:0 | [summary] to write: ReturnValue in lang:alloc::_::crate::fmt::format | MaD:3 |
|
||||
| file://:0:0:0:0 | [summary param] self in lang:alloc::_::<crate::string::String>::as_bytes | file://:0:0:0:0 | [summary] to write: ReturnValue in lang:alloc::_::<crate::string::String>::as_bytes | MaD:1 |
|
||||
| file://:0:0:0:0 | [summary param] self in lang:alloc::_::<crate::string::String>::as_str | file://:0:0:0:0 | [summary] to write: ReturnValue in lang:alloc::_::<crate::string::String>::as_str | MaD:2 |
|
||||
| file://:0:0:0:0 | [summary param] self in repo:https://github.com/seanmonstar/reqwest:reqwest::_::<crate::blocking::response::Response>::bytes | file://:0:0:0:0 | [summary] to write: ReturnValue.Variant[crate::result::Result::Ok(0)] in repo:https://github.com/seanmonstar/reqwest:reqwest::_::<crate::blocking::response::Response>::bytes | MaD:4 |
|
||||
| file://:0:0:0:0 | [summary param] self in repo:https://github.com/seanmonstar/reqwest:reqwest::_::<crate::blocking::response::Response>::text | file://:0:0:0:0 | [summary] to write: ReturnValue.Variant[crate::result::Result::Ok(0)] in repo:https://github.com/seanmonstar/reqwest:reqwest::_::<crate::blocking::response::Response>::text | MaD:5 |
|
||||
| file://:0:0:0:0 | [summary param] self in repo:https://github.com/seanmonstar/reqwest:reqwest::_::<crate::blocking::response::Response>::text_with_charset | file://:0:0:0:0 | [summary] to write: ReturnValue.Variant[crate::result::Result::Ok(0)] in repo:https://github.com/seanmonstar/reqwest:reqwest::_::<crate::blocking::response::Response>::text_with_charset | MaD:6 |
|
||||
| file://:0:0:0:0 | [summary param] self in repo:https://github.com/seanmonstar/reqwest:reqwest::_::<crate::response::Response>::bytes | file://:0:0:0:0 | [summary] to write: ReturnValue.Variant[crate::result::Result::Ok(0)] in repo:https://github.com/seanmonstar/reqwest:reqwest::_::<crate::response::Response>::bytes | MaD:7 |
|
||||
| file://:0:0:0:0 | [summary param] self in repo:https://github.com/seanmonstar/reqwest:reqwest::_::<crate::response::Response>::chunk | file://:0:0:0:0 | [summary] to write: ReturnValue.Variant[crate::result::Result::Ok(0)].Variant[crate::option::Option::Some(0)] in repo:https://github.com/seanmonstar/reqwest:reqwest::_::<crate::response::Response>::chunk | MaD:8 |
|
||||
| file://:0:0:0:0 | [summary param] self in repo:https://github.com/seanmonstar/reqwest:reqwest::_::<crate::response::Response>::text | file://:0:0:0:0 | [summary] to write: ReturnValue.Variant[crate::result::Result::Ok(0)] in repo:https://github.com/seanmonstar/reqwest:reqwest::_::<crate::response::Response>::text | MaD:9 |
|
||||
| file://:0:0:0:0 | [summary param] self in repo:https://github.com/seanmonstar/reqwest:reqwest::_::<crate::response::Response>::text_with_charset | file://:0:0:0:0 | [summary] to write: ReturnValue.Variant[crate::result::Result::Ok(0)] in repo:https://github.com/seanmonstar/reqwest:reqwest::_::<crate::response::Response>::text_with_charset | MaD:10 |
|
||||
| main.rs:4:5:4:8 | 1000 | main.rs:4:5:4:12 | ... + ... | |
|
||||
| main.rs:4:12:4:12 | i | main.rs:4:5:4:12 | ... + ... | |
|
||||
| main.rs:8:20:8:20 | s | main.rs:8:14:8:20 | FormatArgsExpr | |
|
||||
@@ -17,3 +25,14 @@
|
||||
| main.rs:64:24:64:24 | s | main.rs:64:24:64:27 | s[1] | |
|
||||
| main.rs:64:24:64:27 | s[1] | main.rs:64:18:64:27 | FormatArgsExpr | |
|
||||
| main.rs:69:9:69:12 | arr2 | main.rs:69:9:69:15 | arr2[1] | |
|
||||
models
|
||||
| 1 | Summary: lang:alloc; <crate::string::String>::as_bytes; Argument[self]; ReturnValue; taint |
|
||||
| 2 | Summary: lang:alloc; <crate::string::String>::as_str; Argument[self]; ReturnValue; taint |
|
||||
| 3 | Summary: lang:alloc; crate::fmt::format; Argument[0]; ReturnValue; taint |
|
||||
| 4 | Summary: repo:https://github.com/seanmonstar/reqwest:reqwest; <crate::blocking::response::Response>::bytes; Argument[self]; ReturnValue.Variant[crate::result::Result::Ok(0)]; taint |
|
||||
| 5 | Summary: repo:https://github.com/seanmonstar/reqwest:reqwest; <crate::blocking::response::Response>::text; Argument[self]; ReturnValue.Variant[crate::result::Result::Ok(0)]; taint |
|
||||
| 6 | Summary: repo:https://github.com/seanmonstar/reqwest:reqwest; <crate::blocking::response::Response>::text_with_charset; Argument[self]; ReturnValue.Variant[crate::result::Result::Ok(0)]; taint |
|
||||
| 7 | Summary: repo:https://github.com/seanmonstar/reqwest:reqwest; <crate::response::Response>::bytes; Argument[self]; ReturnValue.Variant[crate::result::Result::Ok(0)]; taint |
|
||||
| 8 | Summary: repo:https://github.com/seanmonstar/reqwest:reqwest; <crate::response::Response>::chunk; Argument[self]; ReturnValue.Variant[crate::result::Result::Ok(0)].Variant[crate::option::Option::Some(0)]; taint |
|
||||
| 9 | Summary: repo:https://github.com/seanmonstar/reqwest:reqwest; <crate::response::Response>::text; Argument[self]; ReturnValue.Variant[crate::result::Result::Ok(0)]; taint |
|
||||
| 10 | Summary: repo:https://github.com/seanmonstar/reqwest:reqwest; <crate::response::Response>::text_with_charset; Argument[self]; ReturnValue.Variant[crate::result::Result::Ok(0)]; taint |
|
||||
|
||||
@@ -1,4 +1,18 @@
|
||||
import codeql.rust.dataflow.DataFlow
|
||||
import codeql.rust.dataflow.internal.TaintTrackingImpl
|
||||
import utils.test.TranslateModels
|
||||
|
||||
query predicate additionalTaintStep = RustTaintTracking::defaultAdditionalTaintStep/3;
|
||||
private predicate provenance(string model) {
|
||||
RustTaintTracking::defaultAdditionalTaintStep(_, _, model)
|
||||
}
|
||||
|
||||
private module Tm = TranslateModels<provenance/1>;
|
||||
|
||||
query predicate models = Tm::models/2;
|
||||
|
||||
query predicate additionalTaintStep(DataFlow::Node pred, DataFlow::Node succ, string model) {
|
||||
exists(string madId |
|
||||
RustTaintTracking::defaultAdditionalTaintStep(pred, succ, madId) and
|
||||
Tm::translateModels(madId, model)
|
||||
)
|
||||
}
|
||||
|
||||
@@ -14,8 +14,8 @@ edges
|
||||
| main.rs:38:23:38:29 | s[...] | main.rs:38:22:38:29 | &... [&ref] | provenance | |
|
||||
| main.rs:53:13:53:15 | arr | main.rs:54:14:54:19 | arr[1] | provenance | |
|
||||
| main.rs:53:19:53:28 | source(...) | main.rs:53:13:53:15 | arr | provenance | |
|
||||
| main.rs:69:9:69:12 | [post] arr2 [array[]] | main.rs:70:14:70:17 | arr2 | provenance | |
|
||||
| main.rs:69:19:69:28 | source(...) | main.rs:69:9:69:12 | [post] arr2 [array[]] | provenance | |
|
||||
| main.rs:69:9:69:12 | [post] arr2 [element] | main.rs:70:14:70:17 | arr2 | provenance | |
|
||||
| main.rs:69:19:69:28 | source(...) | main.rs:69:9:69:12 | [post] arr2 [element] | provenance | |
|
||||
nodes
|
||||
| main.rs:12:9:12:9 | a | semmle.label | a |
|
||||
| main.rs:12:13:12:22 | source(...) | semmle.label | source(...) |
|
||||
@@ -36,7 +36,7 @@ nodes
|
||||
| main.rs:53:13:53:15 | arr | semmle.label | arr |
|
||||
| main.rs:53:19:53:28 | source(...) | semmle.label | source(...) |
|
||||
| main.rs:54:14:54:19 | arr[1] | semmle.label | arr[1] |
|
||||
| main.rs:69:9:69:12 | [post] arr2 [array[]] | semmle.label | [post] arr2 [array[]] |
|
||||
| main.rs:69:9:69:12 | [post] arr2 [element] | semmle.label | [post] arr2 [element] |
|
||||
| main.rs:69:19:69:28 | source(...) | semmle.label | source(...) |
|
||||
| main.rs:70:14:70:17 | arr2 | semmle.label | arr2 |
|
||||
subpaths
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
multiplePathResolutions
|
||||
| main.rs:118:9:118:9 | f | main.rs:104:5:106:5 | fn f |
|
||||
| main.rs:118:9:118:9 | f | main.rs:110:5:112:5 | fn f |
|
||||
233
rust/ql/test/library-tests/path-resolution/main.rs
Normal file
233
rust/ql/test/library-tests/path-resolution/main.rs
Normal file
@@ -0,0 +1,233 @@
|
||||
mod my; // I1
|
||||
|
||||
use my::*; // $ item=I1
|
||||
|
||||
use my::nested::nested1::nested2::*; // $ item=I3
|
||||
|
||||
mod my2; // I14
|
||||
|
||||
use my2::*; // $ item=I14
|
||||
|
||||
use my2::nested2::nested3::nested4::{f, g}; // $ item=I11 item=I12 item=I13
|
||||
|
||||
mod m1 {
|
||||
fn f() {
|
||||
println!("main.rs::m1::f");
|
||||
} // I16
|
||||
|
||||
pub mod m2 {
|
||||
fn f() {
|
||||
println!("main.rs::m1::m2::f");
|
||||
} // I18
|
||||
|
||||
pub fn g() {
|
||||
println!("main.rs::m1::m2::g");
|
||||
f(); // $ item=I18
|
||||
super::f(); // $ item=I16
|
||||
} // I19
|
||||
|
||||
pub mod m3 {
|
||||
use super::f; // $ item=I18
|
||||
pub fn h() {
|
||||
println!("main.rs::m1::m2::m3::h");
|
||||
f(); // $ item=I18
|
||||
} // I21
|
||||
} // I20
|
||||
} // I17
|
||||
} // I15
|
||||
|
||||
mod m4 {
|
||||
use super::m1::m2::g; // $ item=I19
|
||||
|
||||
pub fn i() {
|
||||
println!("main.rs::m4::i");
|
||||
g(); // $ item=I19
|
||||
} // I23
|
||||
} // I22
|
||||
|
||||
struct Foo {} // I24
|
||||
|
||||
fn h() {
|
||||
println!("main.rs::h");
|
||||
|
||||
struct Foo {} // I26
|
||||
|
||||
fn f() {
|
||||
use m1::m2::g; // $ item=I19
|
||||
g(); // $ item=I19
|
||||
|
||||
struct Foo {} // I28
|
||||
println!("main.rs::h::f");
|
||||
let _ = Foo {}; // $ item=I28
|
||||
} // I27
|
||||
|
||||
let _ = Foo {}; // $ item=I26
|
||||
|
||||
f(); // $ item=I27
|
||||
|
||||
self::i(); // $ item=I29
|
||||
} // I25
|
||||
|
||||
fn i() {
|
||||
println!("main.rs::i");
|
||||
|
||||
let _ = Foo {}; // $ item=I24
|
||||
|
||||
{
|
||||
struct Foo {
|
||||
x: i32,
|
||||
} // I30
|
||||
|
||||
let _ = Foo { x: 0 }; // $ item=I30
|
||||
}
|
||||
} // I29
|
||||
|
||||
use my2::nested2 as my2_nested2_alias; // $ item=I8
|
||||
|
||||
use my2_nested2_alias::nested3::{nested4::f as f_alias, nested4::g as g_alias, nested4::*}; // $ item=I10 item=I12 item=I13 item=I11
|
||||
|
||||
macro_rules! fn_in_macro {
|
||||
($e:expr) => {
|
||||
fn f_defined_in_macro() {
|
||||
$e
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
fn j() {
|
||||
println!("main.rs::j");
|
||||
fn_in_macro!(println!("main.rs::j::f"));
|
||||
f_defined_in_macro(); // $ item=f_defined_in_macro
|
||||
} // I31
|
||||
|
||||
mod m5 {
|
||||
pub fn f() {
|
||||
println!("main.rs::m5::f");
|
||||
} // I33
|
||||
} // I32
|
||||
|
||||
mod m6 {
|
||||
fn f() {
|
||||
println!("main.rs::m6::f");
|
||||
} // I35
|
||||
|
||||
pub fn g() {
|
||||
println!("main.rs::m6::g");
|
||||
// this import shadows the definition `I35`, which we don't currently handle
|
||||
use super::m5::*; // $ item=I32
|
||||
f(); // $ item=I33 $ SPURIOUS: item=I35
|
||||
} // I36
|
||||
} // I34
|
||||
|
||||
mod m7 {
|
||||
pub enum MyEnum {
|
||||
A(i32), // I42
|
||||
B { x: i32 }, // I43
|
||||
C, // I44
|
||||
} // I41
|
||||
|
||||
#[rustfmt::skip]
|
||||
pub fn f() -> MyEnum // $ item=I41
|
||||
{
|
||||
println!("main.rs::m7::f");
|
||||
let _ = MyEnum::A(0); // $ item=I42
|
||||
let _ = MyEnum::B { x: 0 }; // $ item=I43
|
||||
MyEnum::C // $ item=I44
|
||||
} // I45
|
||||
} // I40
|
||||
|
||||
mod m8 {
|
||||
trait MyTrait {
|
||||
fn f(&self); // I48
|
||||
|
||||
fn g(&self) {
|
||||
println!("main.rs::m8::MyTrait::g");
|
||||
f(); // $ item=I51
|
||||
Self::f(self); // $ item=I48
|
||||
} // I49
|
||||
} // I47
|
||||
|
||||
struct MyStruct {} // I50
|
||||
|
||||
fn f() {
|
||||
println!("main.rs::m8::f");
|
||||
} // I51
|
||||
|
||||
#[rustfmt::skip]
|
||||
impl MyTrait for MyStruct { // $ item=I47 item=I50
|
||||
fn f(&self) {
|
||||
println!("main.rs::m8::<MyStruct as MyTrait>::f");
|
||||
f(); // $ item=I51
|
||||
Self::g(self); // $ item=I54
|
||||
} // I53
|
||||
|
||||
fn g(&self) {
|
||||
println!("main.rs::m8::<MyStruct as MyTrait>::g");
|
||||
} // I54
|
||||
} // I52
|
||||
|
||||
#[rustfmt::skip]
|
||||
pub fn g() {
|
||||
let x = MyStruct {}; // $ item=I50
|
||||
MyTrait::f(&x); // $ item=I48
|
||||
<MyStruct as // $ item=I50
|
||||
MyTrait // $ MISSING: item=I47
|
||||
> // $ MISSING: item=52
|
||||
::f(&x); // $ MISSING: item=I53
|
||||
let x = MyStruct {}; // $ item=I50
|
||||
x.f(); // $ MISSING: item=I53
|
||||
let x = MyStruct {}; // $ item=I50
|
||||
x.g(); // $ MISSING: item=I54
|
||||
} // I55
|
||||
} // I46
|
||||
|
||||
mod m9 {
|
||||
pub struct MyStruct {} // I56
|
||||
|
||||
#[rustfmt::skip]
|
||||
pub fn f() -> self::MyStruct { // $ item=I56
|
||||
println!("main.rs::m9::f");
|
||||
self::MyStruct {} // $ item=I56
|
||||
} // I57
|
||||
}
|
||||
|
||||
mod m10 {
|
||||
#[rustfmt::skip]
|
||||
pub struct MyStruct<
|
||||
T // I58
|
||||
>
|
||||
{
|
||||
x: T, // $ item=I58
|
||||
} // I59
|
||||
|
||||
#[rustfmt::skip]
|
||||
pub fn f<T>( // I60
|
||||
x: T // $ item=I60
|
||||
) ->
|
||||
MyStruct<
|
||||
T // $ item=I60
|
||||
> // $ item=I59
|
||||
{
|
||||
MyStruct { x } // $ item=I59
|
||||
}
|
||||
}
|
||||
|
||||
fn main() {
|
||||
my::nested::nested1::nested2::f(); // $ item=I4
|
||||
my::f(); // $ item=I38
|
||||
nested2::nested3::nested4::f(); // $ item=I12
|
||||
f(); // $ item=I12
|
||||
g(); // $ item=I13
|
||||
crate::h(); // $ item=I25
|
||||
m1::m2::g(); // $ item=I19
|
||||
m1::m2::m3::h(); // $ item=I21
|
||||
m4::i(); // $ item=I23
|
||||
h(); // $ item=I25
|
||||
f_alias(); // $ item=I12
|
||||
g_alias(); // $ item=I13
|
||||
j(); // $ item=I31
|
||||
m6::g(); // $ item=I36
|
||||
m7::f(); // $ item=I45
|
||||
m8::g(); // $ item=I55
|
||||
m9::f(); // $ item=I57
|
||||
}
|
||||
12
rust/ql/test/library-tests/path-resolution/my.rs
Normal file
12
rust/ql/test/library-tests/path-resolution/my.rs
Normal file
@@ -0,0 +1,12 @@
|
||||
pub mod nested; // I37
|
||||
|
||||
use nested::g; // $ item=I7
|
||||
|
||||
pub fn f() {
|
||||
println!("my.rs::f");
|
||||
} // I38
|
||||
|
||||
pub fn h() {
|
||||
println!("my.rs::h");
|
||||
g(); // $ item=I7
|
||||
} // I39
|
||||
22
rust/ql/test/library-tests/path-resolution/my/nested.rs
Normal file
22
rust/ql/test/library-tests/path-resolution/my/nested.rs
Normal file
@@ -0,0 +1,22 @@
|
||||
pub mod nested1 {
|
||||
pub mod nested2 {
|
||||
pub fn f() {
|
||||
println!("nested.rs:nested1::nested2::f");
|
||||
} // I4
|
||||
|
||||
fn g() {
|
||||
println!("nested.rs:nested1::nested2::g");
|
||||
f(); // $ item=I4
|
||||
} // I5
|
||||
} // I3
|
||||
|
||||
fn g() {
|
||||
println!("nested.rs:nested1::g");
|
||||
nested2::f(); // $ item=I4
|
||||
} // I6
|
||||
} // I1
|
||||
|
||||
pub fn g() {
|
||||
println!("nested.rs::g");
|
||||
nested1::nested2::f(); // $ item=I4
|
||||
} // I7
|
||||
6
rust/ql/test/library-tests/path-resolution/my2/mod.rs
Normal file
6
rust/ql/test/library-tests/path-resolution/my2/mod.rs
Normal file
@@ -0,0 +1,6 @@
|
||||
pub mod nested2; // I8
|
||||
|
||||
fn g() {
|
||||
println!("mod.rs::g");
|
||||
nested2::nested3::nested4::f(); // $ item=I12
|
||||
} // I9
|
||||
11
rust/ql/test/library-tests/path-resolution/my2/nested2.rs
Normal file
11
rust/ql/test/library-tests/path-resolution/my2/nested2.rs
Normal file
@@ -0,0 +1,11 @@
|
||||
pub mod nested3 {
|
||||
pub mod nested4 {
|
||||
pub fn f() {
|
||||
println!("nested2.rs::nested3::nested4::f");
|
||||
} // I12
|
||||
|
||||
pub fn g() {
|
||||
println!("nested2.rs::nested3::nested4::g");
|
||||
} // I13
|
||||
} // I11
|
||||
} // I10
|
||||
@@ -0,0 +1,150 @@
|
||||
testFailures
|
||||
mod
|
||||
| lib.rs:1:1:1:7 | mod my |
|
||||
| main.rs:1:1:1:7 | mod my |
|
||||
| main.rs:7:1:7:8 | mod my2 |
|
||||
| main.rs:13:1:37:1 | mod m1 |
|
||||
| main.rs:18:5:36:5 | mod m2 |
|
||||
| main.rs:29:9:35:9 | mod m3 |
|
||||
| main.rs:39:1:46:1 | mod m4 |
|
||||
| main.rs:103:1:107:1 | mod m5 |
|
||||
| main.rs:109:1:120:1 | mod m6 |
|
||||
| main.rs:122:1:137:1 | mod m7 |
|
||||
| main.rs:139:1:182:1 | mod m8 |
|
||||
| main.rs:184:1:192:1 | mod m9 |
|
||||
| main.rs:194:1:213:1 | mod m10 |
|
||||
| my2/mod.rs:1:1:1:16 | mod nested2 |
|
||||
| my2/nested2.rs:1:1:11:1 | mod nested3 |
|
||||
| my2/nested2.rs:2:5:10:5 | mod nested4 |
|
||||
| my.rs:1:1:1:15 | mod nested |
|
||||
| my/nested.rs:1:1:17:1 | mod nested1 |
|
||||
| my/nested.rs:2:5:11:5 | mod nested2 |
|
||||
resolvePath
|
||||
| main.rs:3:5:3:6 | my | main.rs:1:1:1:7 | mod my |
|
||||
| main.rs:5:5:5:6 | my | main.rs:1:1:1:7 | mod my |
|
||||
| main.rs:5:5:5:14 | ...::nested | my.rs:1:1:1:15 | mod nested |
|
||||
| main.rs:5:5:5:23 | ...::nested1 | my/nested.rs:1:1:17:1 | mod nested1 |
|
||||
| main.rs:5:5:5:32 | ...::nested2 | my/nested.rs:2:5:11:5 | mod nested2 |
|
||||
| main.rs:9:5:9:7 | my2 | main.rs:7:1:7:8 | mod my2 |
|
||||
| main.rs:11:5:11:7 | my2 | main.rs:7:1:7:8 | mod my2 |
|
||||
| main.rs:11:5:11:16 | ...::nested2 | my2/mod.rs:1:1:1:16 | mod nested2 |
|
||||
| main.rs:11:5:11:25 | ...::nested3 | my2/nested2.rs:1:1:11:1 | mod nested3 |
|
||||
| main.rs:11:5:11:34 | ...::nested4 | my2/nested2.rs:2:5:10:5 | mod nested4 |
|
||||
| main.rs:11:38:11:38 | f | my2/nested2.rs:3:9:5:9 | fn f |
|
||||
| main.rs:11:41:11:41 | g | my2/nested2.rs:7:9:9:9 | fn g |
|
||||
| main.rs:25:13:25:13 | f | main.rs:19:9:21:9 | fn f |
|
||||
| main.rs:26:13:26:17 | super | main.rs:13:1:37:1 | mod m1 |
|
||||
| main.rs:26:13:26:20 | ...::f | main.rs:14:5:16:5 | fn f |
|
||||
| main.rs:30:17:30:21 | super | main.rs:18:5:36:5 | mod m2 |
|
||||
| main.rs:30:17:30:24 | ...::f | main.rs:19:9:21:9 | fn f |
|
||||
| main.rs:33:17:33:17 | f | main.rs:19:9:21:9 | fn f |
|
||||
| main.rs:40:9:40:13 | super | main.rs:1:1:233:2 | SourceFile |
|
||||
| main.rs:40:9:40:17 | ...::m1 | main.rs:13:1:37:1 | mod m1 |
|
||||
| main.rs:40:9:40:21 | ...::m2 | main.rs:18:5:36:5 | mod m2 |
|
||||
| main.rs:40:9:40:24 | ...::g | main.rs:23:9:27:9 | fn g |
|
||||
| main.rs:44:9:44:9 | g | main.rs:23:9:27:9 | fn g |
|
||||
| main.rs:56:13:56:14 | m1 | main.rs:13:1:37:1 | mod m1 |
|
||||
| main.rs:56:13:56:18 | ...::m2 | main.rs:18:5:36:5 | mod m2 |
|
||||
| main.rs:56:13:56:21 | ...::g | main.rs:23:9:27:9 | fn g |
|
||||
| main.rs:57:9:57:9 | g | main.rs:23:9:27:9 | fn g |
|
||||
| main.rs:61:17:61:19 | Foo | main.rs:59:9:59:21 | struct Foo |
|
||||
| main.rs:64:13:64:15 | Foo | main.rs:53:5:53:17 | struct Foo |
|
||||
| main.rs:66:5:66:5 | f | main.rs:55:5:62:5 | fn f |
|
||||
| main.rs:68:5:68:8 | self | main.rs:1:1:233:2 | SourceFile |
|
||||
| main.rs:68:5:68:11 | ...::i | main.rs:71:1:83:1 | fn i |
|
||||
| main.rs:74:13:74:15 | Foo | main.rs:48:1:48:13 | struct Foo |
|
||||
| main.rs:81:17:81:19 | Foo | main.rs:77:9:79:9 | struct Foo |
|
||||
| main.rs:85:5:85:7 | my2 | main.rs:7:1:7:8 | mod my2 |
|
||||
| main.rs:85:5:85:16 | ...::nested2 | my2/mod.rs:1:1:1:16 | mod nested2 |
|
||||
| main.rs:87:5:87:21 | my2_nested2_alias | my2/mod.rs:1:1:1:16 | mod nested2 |
|
||||
| main.rs:87:5:87:30 | ...::nested3 | my2/nested2.rs:1:1:11:1 | mod nested3 |
|
||||
| main.rs:87:34:87:40 | nested4 | my2/nested2.rs:2:5:10:5 | mod nested4 |
|
||||
| main.rs:87:34:87:43 | ...::f | my2/nested2.rs:3:9:5:9 | fn f |
|
||||
| main.rs:87:57:87:63 | nested4 | my2/nested2.rs:2:5:10:5 | mod nested4 |
|
||||
| main.rs:87:57:87:66 | ...::g | my2/nested2.rs:7:9:9:9 | fn g |
|
||||
| main.rs:87:80:87:86 | nested4 | my2/nested2.rs:2:5:10:5 | mod nested4 |
|
||||
| main.rs:100:5:100:22 | f_defined_in_macro | main.rs:99:18:99:42 | fn f_defined_in_macro |
|
||||
| main.rs:117:13:117:17 | super | main.rs:1:1:233:2 | SourceFile |
|
||||
| main.rs:117:13:117:21 | ...::m5 | main.rs:103:1:107:1 | mod m5 |
|
||||
| main.rs:118:9:118:9 | f | main.rs:104:5:106:5 | fn f |
|
||||
| main.rs:118:9:118:9 | f | main.rs:110:5:112:5 | fn f |
|
||||
| main.rs:130:19:130:24 | MyEnum | main.rs:123:5:127:5 | enum MyEnum |
|
||||
| main.rs:133:17:133:22 | MyEnum | main.rs:123:5:127:5 | enum MyEnum |
|
||||
| main.rs:133:17:133:25 | ...::A | main.rs:124:9:124:14 | A |
|
||||
| main.rs:134:17:134:22 | MyEnum | main.rs:123:5:127:5 | enum MyEnum |
|
||||
| main.rs:134:17:134:25 | ...::B | main.rs:124:23:125:20 | B |
|
||||
| main.rs:135:9:135:14 | MyEnum | main.rs:123:5:127:5 | enum MyEnum |
|
||||
| main.rs:135:9:135:17 | ...::C | main.rs:125:23:126:9 | C |
|
||||
| main.rs:145:13:145:13 | f | main.rs:152:5:154:5 | fn f |
|
||||
| main.rs:146:13:146:16 | Self | main.rs:140:5:148:5 | trait MyTrait |
|
||||
| main.rs:146:13:146:19 | ...::f | main.rs:141:9:141:20 | fn f |
|
||||
| main.rs:157:10:157:16 | MyTrait | main.rs:140:5:148:5 | trait MyTrait |
|
||||
| main.rs:157:22:157:29 | MyStruct | main.rs:150:5:150:22 | struct MyStruct |
|
||||
| main.rs:160:13:160:13 | f | main.rs:152:5:154:5 | fn f |
|
||||
| main.rs:161:13:161:16 | Self | main.rs:156:5:167:5 | impl MyTrait for MyStruct { ... } |
|
||||
| main.rs:161:13:161:19 | ...::g | main.rs:164:9:166:9 | fn g |
|
||||
| main.rs:171:17:171:24 | MyStruct | main.rs:150:5:150:22 | struct MyStruct |
|
||||
| main.rs:172:9:172:15 | MyTrait | main.rs:140:5:148:5 | trait MyTrait |
|
||||
| main.rs:172:9:172:18 | ...::f | main.rs:141:9:141:20 | fn f |
|
||||
| main.rs:173:10:173:17 | MyStruct | main.rs:150:5:150:22 | struct MyStruct |
|
||||
| main.rs:173:10:173:17 | MyStruct | main.rs:150:5:150:22 | struct MyStruct |
|
||||
| main.rs:177:17:177:24 | MyStruct | main.rs:150:5:150:22 | struct MyStruct |
|
||||
| main.rs:179:17:179:24 | MyStruct | main.rs:150:5:150:22 | struct MyStruct |
|
||||
| main.rs:188:19:188:22 | self | main.rs:184:1:192:1 | mod m9 |
|
||||
| main.rs:188:19:188:32 | ...::MyStruct | main.rs:185:5:185:26 | struct MyStruct |
|
||||
| main.rs:190:9:190:12 | self | main.rs:184:1:192:1 | mod m9 |
|
||||
| main.rs:190:9:190:22 | ...::MyStruct | main.rs:185:5:185:26 | struct MyStruct |
|
||||
| main.rs:200:12:200:12 | T | main.rs:197:7:197:7 | TypeParam |
|
||||
| main.rs:205:12:205:12 | T | main.rs:204:14:204:14 | TypeParam |
|
||||
| main.rs:207:7:209:7 | MyStruct::<...> | main.rs:195:5:201:5 | struct MyStruct |
|
||||
| main.rs:208:9:208:9 | T | main.rs:204:14:204:14 | TypeParam |
|
||||
| main.rs:211:9:211:16 | MyStruct | main.rs:195:5:201:5 | struct MyStruct |
|
||||
| main.rs:216:5:216:6 | my | main.rs:1:1:1:7 | mod my |
|
||||
| main.rs:216:5:216:14 | ...::nested | my.rs:1:1:1:15 | mod nested |
|
||||
| main.rs:216:5:216:23 | ...::nested1 | my/nested.rs:1:1:17:1 | mod nested1 |
|
||||
| main.rs:216:5:216:32 | ...::nested2 | my/nested.rs:2:5:11:5 | mod nested2 |
|
||||
| main.rs:216:5:216:35 | ...::f | my/nested.rs:3:9:5:9 | fn f |
|
||||
| main.rs:217:5:217:6 | my | main.rs:1:1:1:7 | mod my |
|
||||
| main.rs:217:5:217:9 | ...::f | my.rs:5:1:7:1 | fn f |
|
||||
| main.rs:218:5:218:11 | nested2 | my2/mod.rs:1:1:1:16 | mod nested2 |
|
||||
| main.rs:218:5:218:20 | ...::nested3 | my2/nested2.rs:1:1:11:1 | mod nested3 |
|
||||
| main.rs:218:5:218:29 | ...::nested4 | my2/nested2.rs:2:5:10:5 | mod nested4 |
|
||||
| main.rs:218:5:218:32 | ...::f | my2/nested2.rs:3:9:5:9 | fn f |
|
||||
| main.rs:219:5:219:5 | f | my2/nested2.rs:3:9:5:9 | fn f |
|
||||
| main.rs:220:5:220:5 | g | my2/nested2.rs:7:9:9:9 | fn g |
|
||||
| main.rs:221:5:221:9 | crate | main.rs:1:1:233:2 | SourceFile |
|
||||
| main.rs:221:5:221:12 | ...::h | main.rs:50:1:69:1 | fn h |
|
||||
| main.rs:222:5:222:6 | m1 | main.rs:13:1:37:1 | mod m1 |
|
||||
| main.rs:222:5:222:10 | ...::m2 | main.rs:18:5:36:5 | mod m2 |
|
||||
| main.rs:222:5:222:13 | ...::g | main.rs:23:9:27:9 | fn g |
|
||||
| main.rs:223:5:223:6 | m1 | main.rs:13:1:37:1 | mod m1 |
|
||||
| main.rs:223:5:223:10 | ...::m2 | main.rs:18:5:36:5 | mod m2 |
|
||||
| main.rs:223:5:223:14 | ...::m3 | main.rs:29:9:35:9 | mod m3 |
|
||||
| main.rs:223:5:223:17 | ...::h | main.rs:30:27:34:13 | fn h |
|
||||
| main.rs:224:5:224:6 | m4 | main.rs:39:1:46:1 | mod m4 |
|
||||
| main.rs:224:5:224:9 | ...::i | main.rs:42:5:45:5 | fn i |
|
||||
| main.rs:225:5:225:5 | h | main.rs:50:1:69:1 | fn h |
|
||||
| main.rs:226:5:226:11 | f_alias | my2/nested2.rs:3:9:5:9 | fn f |
|
||||
| main.rs:227:5:227:11 | g_alias | my2/nested2.rs:7:9:9:9 | fn g |
|
||||
| main.rs:228:5:228:5 | j | main.rs:97:1:101:1 | fn j |
|
||||
| main.rs:229:5:229:6 | m6 | main.rs:109:1:120:1 | mod m6 |
|
||||
| main.rs:229:5:229:9 | ...::g | main.rs:114:5:119:5 | fn g |
|
||||
| main.rs:230:5:230:6 | m7 | main.rs:122:1:137:1 | mod m7 |
|
||||
| main.rs:230:5:230:9 | ...::f | main.rs:129:5:136:5 | fn f |
|
||||
| main.rs:231:5:231:6 | m8 | main.rs:139:1:182:1 | mod m8 |
|
||||
| main.rs:231:5:231:9 | ...::g | main.rs:169:5:181:5 | fn g |
|
||||
| main.rs:232:5:232:6 | m9 | main.rs:184:1:192:1 | mod m9 |
|
||||
| main.rs:232:5:232:9 | ...::f | main.rs:187:5:191:5 | fn f |
|
||||
| my2/mod.rs:5:5:5:11 | nested2 | my2/mod.rs:1:1:1:16 | mod nested2 |
|
||||
| my2/mod.rs:5:5:5:20 | ...::nested3 | my2/nested2.rs:1:1:11:1 | mod nested3 |
|
||||
| my2/mod.rs:5:5:5:29 | ...::nested4 | my2/nested2.rs:2:5:10:5 | mod nested4 |
|
||||
| my2/mod.rs:5:5:5:32 | ...::f | my2/nested2.rs:3:9:5:9 | fn f |
|
||||
| my.rs:3:5:3:10 | nested | my.rs:1:1:1:15 | mod nested |
|
||||
| my.rs:3:5:3:13 | ...::g | my/nested.rs:19:1:22:1 | fn g |
|
||||
| my.rs:11:5:11:5 | g | my/nested.rs:19:1:22:1 | fn g |
|
||||
| my/nested.rs:9:13:9:13 | f | my/nested.rs:3:9:5:9 | fn f |
|
||||
| my/nested.rs:15:9:15:15 | nested2 | my/nested.rs:2:5:11:5 | mod nested2 |
|
||||
| my/nested.rs:15:9:15:18 | ...::f | my/nested.rs:3:9:5:9 | fn f |
|
||||
| my/nested.rs:21:5:21:11 | nested1 | my/nested.rs:1:1:17:1 | mod nested1 |
|
||||
| my/nested.rs:21:5:21:20 | ...::nested2 | my/nested.rs:2:5:11:5 | mod nested2 |
|
||||
| my/nested.rs:21:5:21:23 | ...::f | my/nested.rs:3:9:5:9 | fn f |
|
||||
@@ -0,0 +1,44 @@
|
||||
import rust
|
||||
import codeql.rust.elements.internal.PathResolution
|
||||
import utils.test.InlineExpectationsTest
|
||||
|
||||
query predicate mod(Module m) { any() }
|
||||
|
||||
query predicate resolvePath(Path p, ItemNode i) { i = resolvePath(p) }
|
||||
|
||||
module ResolveTest implements TestSig {
|
||||
string getARelevantTag() { result = "item" }
|
||||
|
||||
private predicate itemAt(ItemNode i, string filepath, int line, boolean inMacro) {
|
||||
i.getLocation().hasLocationInfo(filepath, _, _, line, _) and
|
||||
if i.isInMacroExpansion() then inMacro = true else inMacro = false
|
||||
}
|
||||
|
||||
private predicate commmentAt(string text, string filepath, int line) {
|
||||
exists(Comment c |
|
||||
c.getLocation().hasLocationInfo(filepath, line, _, _, _) and
|
||||
c.getCommentText() = text
|
||||
)
|
||||
}
|
||||
|
||||
private predicate item(ItemNode i, string value) {
|
||||
exists(string filepath, int line, boolean inMacro | itemAt(i, filepath, line, inMacro) |
|
||||
commmentAt(value, filepath, line) and inMacro = false
|
||||
or
|
||||
not (commmentAt(_, filepath, line) and inMacro = false) and
|
||||
value = i.getName()
|
||||
)
|
||||
}
|
||||
|
||||
predicate hasActualResult(Location location, string element, string tag, string value) {
|
||||
exists(Path p |
|
||||
not p = any(Path parent).getQualifier() and
|
||||
location = p.getLocation() and
|
||||
element = p.toString() and
|
||||
item(resolvePath(p), value) and
|
||||
tag = "item"
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
import MakeTest<ResolveTest>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,12 +1,12 @@
|
||||
nonSsaVariable
|
||||
| main.rs:341:13:341:13 | a |
|
||||
| main.rs:349:13:349:13 | i |
|
||||
| main.rs:372:13:372:13 | x |
|
||||
| main.rs:379:13:379:13 | z |
|
||||
| main.rs:392:13:392:13 | x |
|
||||
| main.rs:426:13:426:13 | z |
|
||||
| main.rs:501:13:501:13 | a |
|
||||
| main.rs:538:11:538:11 | a |
|
||||
| main.rs:371:13:371:13 | a |
|
||||
| main.rs:379:13:379:13 | i |
|
||||
| main.rs:402:13:402:13 | x |
|
||||
| main.rs:409:13:409:13 | z |
|
||||
| main.rs:422:13:422:13 | x |
|
||||
| main.rs:456:13:456:13 | z |
|
||||
| main.rs:531:13:531:13 | a |
|
||||
| main.rs:568:11:568:11 | a |
|
||||
definition
|
||||
| main.rs:3:14:3:14 | s | main.rs:3:14:3:14 | s |
|
||||
| main.rs:7:14:7:14 | i | main.rs:7:14:7:14 | i |
|
||||
@@ -102,53 +102,59 @@ definition
|
||||
| main.rs:323:9:323:26 | immutable_variable | main.rs:323:9:323:26 | immutable_variable |
|
||||
| main.rs:324:10:324:10 | x | main.rs:324:10:324:10 | x |
|
||||
| main.rs:326:9:326:10 | n2 | main.rs:326:9:326:10 | n2 |
|
||||
| main.rs:332:9:332:9 | v | main.rs:332:9:332:9 | v |
|
||||
| main.rs:334:9:334:12 | text | main.rs:334:9:334:12 | text |
|
||||
| main.rs:350:9:350:13 | ref_i | main.rs:350:9:350:13 | ref_i |
|
||||
| main.rs:356:17:356:17 | x | main.rs:356:17:356:17 | x |
|
||||
| main.rs:363:22:363:22 | x | main.rs:363:22:363:22 | x |
|
||||
| main.rs:363:39:363:39 | y | main.rs:363:39:363:39 | y |
|
||||
| main.rs:373:9:373:9 | y | main.rs:373:9:373:9 | y |
|
||||
| main.rs:380:9:380:9 | w | main.rs:380:9:380:9 | w |
|
||||
| main.rs:393:9:393:9 | y | main.rs:393:9:393:9 | y |
|
||||
| main.rs:400:9:400:9 | x | main.rs:400:9:400:9 | x |
|
||||
| main.rs:402:9:402:11 | cap | main.rs:402:9:402:11 | cap |
|
||||
| main.rs:402:15:404:5 | <captured entry> x | main.rs:400:9:400:9 | x |
|
||||
| main.rs:410:9:410:13 | x | main.rs:410:13:410:13 | x |
|
||||
| main.rs:412:9:412:16 | closure1 | main.rs:412:9:412:16 | closure1 |
|
||||
| main.rs:412:20:414:5 | <captured entry> x | main.rs:410:13:410:13 | x |
|
||||
| main.rs:418:9:418:13 | y | main.rs:418:13:418:13 | y |
|
||||
| main.rs:420:9:420:20 | closure2 | main.rs:420:13:420:20 | closure2 |
|
||||
| main.rs:421:9:421:9 | y | main.rs:418:13:418:13 | y |
|
||||
| main.rs:423:5:423:14 | <captured exit> y | main.rs:418:13:418:13 | y |
|
||||
| main.rs:428:9:428:20 | closure3 | main.rs:428:13:428:20 | closure3 |
|
||||
| main.rs:436:9:436:13 | i | main.rs:436:13:436:13 | i |
|
||||
| main.rs:437:9:437:13 | block | main.rs:437:9:437:13 | block |
|
||||
| main.rs:438:9:438:9 | i | main.rs:436:13:436:13 | i |
|
||||
| main.rs:441:5:441:15 | <captured exit> i | main.rs:436:13:436:13 | i |
|
||||
| main.rs:445:8:445:8 | b | main.rs:445:8:445:8 | b |
|
||||
| main.rs:446:9:446:13 | x | main.rs:446:13:446:13 | x |
|
||||
| main.rs:449:5:457:5 | phi | main.rs:446:13:446:13 | x |
|
||||
| main.rs:450:9:450:9 | x | main.rs:446:13:446:13 | x |
|
||||
| main.rs:454:9:454:9 | x | main.rs:446:13:446:13 | x |
|
||||
| main.rs:461:13:461:14 | b1 | main.rs:461:13:461:14 | b1 |
|
||||
| main.rs:461:24:461:25 | b2 | main.rs:461:24:461:25 | b2 |
|
||||
| main.rs:462:9:462:9 | x | main.rs:462:9:462:9 | x |
|
||||
| main.rs:482:15:482:23 | SelfParam | main.rs:482:20:482:23 | self |
|
||||
| main.rs:486:11:486:14 | SelfParam | main.rs:486:11:486:14 | self |
|
||||
| main.rs:490:18:490:26 | SelfParam | main.rs:490:23:490:26 | self |
|
||||
| main.rs:491:13:491:17 | f | main.rs:491:17:491:17 | f |
|
||||
| main.rs:491:21:494:9 | <captured entry> self | main.rs:490:23:490:26 | self |
|
||||
| main.rs:491:22:491:22 | n | main.rs:491:22:491:22 | n |
|
||||
| main.rs:510:9:510:13 | a | main.rs:510:13:510:13 | a |
|
||||
| main.rs:514:5:514:5 | a | main.rs:510:13:510:13 | a |
|
||||
| main.rs:519:9:519:9 | x | main.rs:519:9:519:9 | x |
|
||||
| main.rs:523:9:523:9 | z | main.rs:523:9:523:9 | z |
|
||||
| main.rs:532:10:532:18 | SelfParam | main.rs:532:15:532:18 | self |
|
||||
| main.rs:563:9:563:22 | var_from_macro | main.rs:563:9:563:22 | var_from_macro |
|
||||
| main.rs:564:9:564:25 | var_in_macro | main.rs:564:9:564:25 | var_in_macro |
|
||||
| main.rs:566:9:566:20 | var_in_macro | main.rs:566:9:566:20 | var_in_macro |
|
||||
| main.rs:570:15:570:42 | var_in_macro | main.rs:570:15:570:42 | var_in_macro |
|
||||
| main.rs:333:9:333:9 | f | main.rs:333:9:333:9 | f |
|
||||
| main.rs:334:10:334:10 | x | main.rs:334:10:334:10 | x |
|
||||
| main.rs:338:10:338:10 | x | main.rs:338:10:338:10 | x |
|
||||
| main.rs:346:14:346:14 | x | main.rs:346:14:346:14 | x |
|
||||
| main.rs:354:13:354:13 | f | main.rs:354:13:354:13 | f |
|
||||
| main.rs:355:14:355:14 | x | main.rs:355:14:355:14 | x |
|
||||
| main.rs:362:9:362:9 | v | main.rs:362:9:362:9 | v |
|
||||
| main.rs:364:9:364:12 | text | main.rs:364:9:364:12 | text |
|
||||
| main.rs:380:9:380:13 | ref_i | main.rs:380:9:380:13 | ref_i |
|
||||
| main.rs:386:17:386:17 | x | main.rs:386:17:386:17 | x |
|
||||
| main.rs:393:22:393:22 | x | main.rs:393:22:393:22 | x |
|
||||
| main.rs:393:39:393:39 | y | main.rs:393:39:393:39 | y |
|
||||
| main.rs:403:9:403:9 | y | main.rs:403:9:403:9 | y |
|
||||
| main.rs:410:9:410:9 | w | main.rs:410:9:410:9 | w |
|
||||
| main.rs:423:9:423:9 | y | main.rs:423:9:423:9 | y |
|
||||
| main.rs:430:9:430:9 | x | main.rs:430:9:430:9 | x |
|
||||
| main.rs:432:9:432:11 | cap | main.rs:432:9:432:11 | cap |
|
||||
| main.rs:432:15:434:5 | <captured entry> x | main.rs:430:9:430:9 | x |
|
||||
| main.rs:440:9:440:13 | x | main.rs:440:13:440:13 | x |
|
||||
| main.rs:442:9:442:16 | closure1 | main.rs:442:9:442:16 | closure1 |
|
||||
| main.rs:442:20:444:5 | <captured entry> x | main.rs:440:13:440:13 | x |
|
||||
| main.rs:448:9:448:13 | y | main.rs:448:13:448:13 | y |
|
||||
| main.rs:450:9:450:20 | closure2 | main.rs:450:13:450:20 | closure2 |
|
||||
| main.rs:451:9:451:9 | y | main.rs:448:13:448:13 | y |
|
||||
| main.rs:453:5:453:14 | <captured exit> y | main.rs:448:13:448:13 | y |
|
||||
| main.rs:458:9:458:20 | closure3 | main.rs:458:13:458:20 | closure3 |
|
||||
| main.rs:466:9:466:13 | i | main.rs:466:13:466:13 | i |
|
||||
| main.rs:467:9:467:13 | block | main.rs:467:9:467:13 | block |
|
||||
| main.rs:468:9:468:9 | i | main.rs:466:13:466:13 | i |
|
||||
| main.rs:471:5:471:15 | <captured exit> i | main.rs:466:13:466:13 | i |
|
||||
| main.rs:475:8:475:8 | b | main.rs:475:8:475:8 | b |
|
||||
| main.rs:476:9:476:13 | x | main.rs:476:13:476:13 | x |
|
||||
| main.rs:479:5:487:5 | phi | main.rs:476:13:476:13 | x |
|
||||
| main.rs:480:9:480:9 | x | main.rs:476:13:476:13 | x |
|
||||
| main.rs:484:9:484:9 | x | main.rs:476:13:476:13 | x |
|
||||
| main.rs:491:13:491:14 | b1 | main.rs:491:13:491:14 | b1 |
|
||||
| main.rs:491:24:491:25 | b2 | main.rs:491:24:491:25 | b2 |
|
||||
| main.rs:492:9:492:9 | x | main.rs:492:9:492:9 | x |
|
||||
| main.rs:512:15:512:23 | SelfParam | main.rs:512:20:512:23 | self |
|
||||
| main.rs:516:11:516:14 | SelfParam | main.rs:516:11:516:14 | self |
|
||||
| main.rs:520:18:520:26 | SelfParam | main.rs:520:23:520:26 | self |
|
||||
| main.rs:521:13:521:17 | f | main.rs:521:17:521:17 | f |
|
||||
| main.rs:521:21:524:9 | <captured entry> self | main.rs:520:23:520:26 | self |
|
||||
| main.rs:521:22:521:22 | n | main.rs:521:22:521:22 | n |
|
||||
| main.rs:540:9:540:13 | a | main.rs:540:13:540:13 | a |
|
||||
| main.rs:544:5:544:5 | a | main.rs:540:13:540:13 | a |
|
||||
| main.rs:549:9:549:9 | x | main.rs:549:9:549:9 | x |
|
||||
| main.rs:553:9:553:9 | z | main.rs:553:9:553:9 | z |
|
||||
| main.rs:562:10:562:18 | SelfParam | main.rs:562:15:562:18 | self |
|
||||
| main.rs:593:9:593:22 | var_from_macro | main.rs:593:9:593:22 | var_from_macro |
|
||||
| main.rs:594:9:594:25 | var_in_macro | main.rs:594:9:594:25 | var_in_macro |
|
||||
| main.rs:596:9:596:20 | var_in_macro | main.rs:596:9:596:20 | var_in_macro |
|
||||
| main.rs:600:15:600:42 | var_in_macro | main.rs:600:15:600:42 | var_in_macro |
|
||||
read
|
||||
| main.rs:3:14:3:14 | s | main.rs:3:14:3:14 | s | main.rs:4:20:4:20 | s |
|
||||
| main.rs:7:14:7:14 | i | main.rs:7:14:7:14 | i | main.rs:8:20:8:20 | i |
|
||||
@@ -231,65 +237,72 @@ read
|
||||
| main.rs:323:9:323:26 | immutable_variable | main.rs:323:9:323:26 | immutable_variable | main.rs:327:9:327:26 | immutable_variable |
|
||||
| main.rs:324:10:324:10 | x | main.rs:324:10:324:10 | x | main.rs:325:9:325:9 | x |
|
||||
| main.rs:326:9:326:10 | n2 | main.rs:326:9:326:10 | n2 | main.rs:328:15:328:16 | n2 |
|
||||
| main.rs:332:9:332:9 | v | main.rs:332:9:332:9 | v | main.rs:335:12:335:12 | v |
|
||||
| main.rs:334:9:334:12 | text | main.rs:334:9:334:12 | text | main.rs:336:19:336:22 | text |
|
||||
| main.rs:350:9:350:13 | ref_i | main.rs:350:9:350:13 | ref_i | main.rs:352:6:352:10 | ref_i |
|
||||
| main.rs:356:17:356:17 | x | main.rs:356:17:356:17 | x | main.rs:357:6:357:6 | x |
|
||||
| main.rs:356:17:356:17 | x | main.rs:356:17:356:17 | x | main.rs:358:10:358:10 | x |
|
||||
| main.rs:356:17:356:17 | x | main.rs:356:17:356:17 | x | main.rs:359:10:359:10 | x |
|
||||
| main.rs:356:17:356:17 | x | main.rs:356:17:356:17 | x | main.rs:360:12:360:12 | x |
|
||||
| main.rs:363:22:363:22 | x | main.rs:363:22:363:22 | x | main.rs:364:6:364:6 | x |
|
||||
| main.rs:363:22:363:22 | x | main.rs:363:22:363:22 | x | main.rs:365:10:365:10 | x |
|
||||
| main.rs:363:22:363:22 | x | main.rs:363:22:363:22 | x | main.rs:366:10:366:10 | x |
|
||||
| main.rs:363:22:363:22 | x | main.rs:363:22:363:22 | x | main.rs:368:9:368:9 | x |
|
||||
| main.rs:363:39:363:39 | y | main.rs:363:39:363:39 | y | main.rs:367:6:367:6 | y |
|
||||
| main.rs:373:9:373:9 | y | main.rs:373:9:373:9 | y | main.rs:375:6:375:6 | y |
|
||||
| main.rs:380:9:380:9 | w | main.rs:380:9:380:9 | w | main.rs:384:9:384:9 | w |
|
||||
| main.rs:380:9:380:9 | w | main.rs:380:9:380:9 | w | main.rs:386:7:386:7 | w |
|
||||
| main.rs:393:9:393:9 | y | main.rs:393:9:393:9 | y | main.rs:395:6:395:6 | y |
|
||||
| main.rs:400:9:400:9 | x | main.rs:400:9:400:9 | x | main.rs:406:15:406:15 | x |
|
||||
| main.rs:402:9:402:11 | cap | main.rs:402:9:402:11 | cap | main.rs:405:5:405:7 | cap |
|
||||
| main.rs:402:15:404:5 | <captured entry> x | main.rs:400:9:400:9 | x | main.rs:403:19:403:19 | x |
|
||||
| main.rs:410:9:410:13 | x | main.rs:410:13:410:13 | x | main.rs:416:15:416:15 | x |
|
||||
| main.rs:412:9:412:16 | closure1 | main.rs:412:9:412:16 | closure1 | main.rs:415:5:415:12 | closure1 |
|
||||
| main.rs:412:20:414:5 | <captured entry> x | main.rs:410:13:410:13 | x | main.rs:413:19:413:19 | x |
|
||||
| main.rs:420:9:420:20 | closure2 | main.rs:420:13:420:20 | closure2 | main.rs:423:5:423:12 | closure2 |
|
||||
| main.rs:423:5:423:14 | <captured exit> y | main.rs:418:13:418:13 | y | main.rs:424:15:424:15 | y |
|
||||
| main.rs:428:9:428:20 | closure3 | main.rs:428:13:428:20 | closure3 | main.rs:431:5:431:12 | closure3 |
|
||||
| main.rs:437:9:437:13 | block | main.rs:437:9:437:13 | block | main.rs:441:5:441:9 | block |
|
||||
| main.rs:441:5:441:15 | <captured exit> i | main.rs:436:13:436:13 | i | main.rs:442:15:442:15 | i |
|
||||
| main.rs:445:8:445:8 | b | main.rs:445:8:445:8 | b | main.rs:449:8:449:8 | b |
|
||||
| main.rs:446:9:446:13 | x | main.rs:446:13:446:13 | x | main.rs:447:15:447:15 | x |
|
||||
| main.rs:446:9:446:13 | x | main.rs:446:13:446:13 | x | main.rs:448:15:448:15 | x |
|
||||
| main.rs:449:5:457:5 | phi | main.rs:446:13:446:13 | x | main.rs:458:15:458:15 | x |
|
||||
| main.rs:450:9:450:9 | x | main.rs:446:13:446:13 | x | main.rs:451:19:451:19 | x |
|
||||
| main.rs:450:9:450:9 | x | main.rs:446:13:446:13 | x | main.rs:452:19:452:19 | x |
|
||||
| main.rs:454:9:454:9 | x | main.rs:446:13:446:13 | x | main.rs:455:19:455:19 | x |
|
||||
| main.rs:454:9:454:9 | x | main.rs:446:13:446:13 | x | main.rs:456:19:456:19 | x |
|
||||
| main.rs:461:13:461:14 | b1 | main.rs:461:13:461:14 | b1 | main.rs:463:8:463:9 | b1 |
|
||||
| main.rs:461:24:461:25 | b2 | main.rs:461:24:461:25 | b2 | main.rs:469:8:469:9 | b2 |
|
||||
| main.rs:462:9:462:9 | x | main.rs:462:9:462:9 | x | main.rs:464:19:464:19 | x |
|
||||
| main.rs:462:9:462:9 | x | main.rs:462:9:462:9 | x | main.rs:466:19:466:19 | x |
|
||||
| main.rs:462:9:462:9 | x | main.rs:462:9:462:9 | x | main.rs:470:19:470:19 | x |
|
||||
| main.rs:462:9:462:9 | x | main.rs:462:9:462:9 | x | main.rs:472:19:472:19 | x |
|
||||
| main.rs:482:15:482:23 | SelfParam | main.rs:482:20:482:23 | self | main.rs:483:16:483:19 | self |
|
||||
| main.rs:486:11:486:14 | SelfParam | main.rs:486:11:486:14 | self | main.rs:487:9:487:12 | self |
|
||||
| main.rs:491:13:491:17 | f | main.rs:491:17:491:17 | f | main.rs:495:9:495:9 | f |
|
||||
| main.rs:491:13:491:17 | f | main.rs:491:17:491:17 | f | main.rs:496:9:496:9 | f |
|
||||
| main.rs:491:21:494:9 | <captured entry> self | main.rs:490:23:490:26 | self | main.rs:493:13:493:16 | self |
|
||||
| main.rs:491:22:491:22 | n | main.rs:491:22:491:22 | n | main.rs:493:25:493:25 | n |
|
||||
| main.rs:510:9:510:13 | a | main.rs:510:13:510:13 | a | main.rs:511:15:511:15 | a |
|
||||
| main.rs:510:9:510:13 | a | main.rs:510:13:510:13 | a | main.rs:512:5:512:5 | a |
|
||||
| main.rs:510:9:510:13 | a | main.rs:510:13:510:13 | a | main.rs:513:15:513:15 | a |
|
||||
| main.rs:514:5:514:5 | a | main.rs:510:13:510:13 | a | main.rs:515:15:515:15 | a |
|
||||
| main.rs:519:9:519:9 | x | main.rs:519:9:519:9 | x | main.rs:520:20:520:20 | x |
|
||||
| main.rs:519:9:519:9 | x | main.rs:519:9:519:9 | x | main.rs:521:15:521:15 | x |
|
||||
| main.rs:523:9:523:9 | z | main.rs:523:9:523:9 | z | main.rs:524:20:524:20 | z |
|
||||
| main.rs:532:10:532:18 | SelfParam | main.rs:532:15:532:18 | self | main.rs:533:6:533:9 | self |
|
||||
| main.rs:563:9:563:22 | var_from_macro | main.rs:563:9:563:22 | var_from_macro | main.rs:565:15:565:28 | var_from_macro |
|
||||
| main.rs:564:9:564:25 | var_in_macro | main.rs:564:9:564:25 | var_in_macro | main.rs:564:9:564:25 | var_in_macro |
|
||||
| main.rs:566:9:566:20 | var_in_macro | main.rs:566:9:566:20 | var_in_macro | main.rs:571:15:571:26 | var_in_macro |
|
||||
| main.rs:570:15:570:42 | var_in_macro | main.rs:570:15:570:42 | var_in_macro | main.rs:570:30:570:41 | var_in_macro |
|
||||
| main.rs:333:9:333:9 | f | main.rs:333:9:333:9 | f | main.rs:336:15:336:15 | f |
|
||||
| main.rs:333:9:333:9 | f | main.rs:333:9:333:9 | f | main.rs:342:15:342:15 | f |
|
||||
| main.rs:334:10:334:10 | x | main.rs:334:10:334:10 | x | main.rs:335:9:335:9 | x |
|
||||
| main.rs:338:10:338:10 | x | main.rs:338:10:338:10 | x | main.rs:339:9:339:9 | x |
|
||||
| main.rs:346:14:346:14 | x | main.rs:346:14:346:14 | x | main.rs:347:17:347:17 | x |
|
||||
| main.rs:354:13:354:13 | f | main.rs:354:13:354:13 | f | main.rs:357:19:357:19 | f |
|
||||
| main.rs:355:14:355:14 | x | main.rs:355:14:355:14 | x | main.rs:356:13:356:13 | x |
|
||||
| main.rs:362:9:362:9 | v | main.rs:362:9:362:9 | v | main.rs:365:12:365:12 | v |
|
||||
| main.rs:364:9:364:12 | text | main.rs:364:9:364:12 | text | main.rs:366:19:366:22 | text |
|
||||
| main.rs:380:9:380:13 | ref_i | main.rs:380:9:380:13 | ref_i | main.rs:382:6:382:10 | ref_i |
|
||||
| main.rs:386:17:386:17 | x | main.rs:386:17:386:17 | x | main.rs:387:6:387:6 | x |
|
||||
| main.rs:386:17:386:17 | x | main.rs:386:17:386:17 | x | main.rs:388:10:388:10 | x |
|
||||
| main.rs:386:17:386:17 | x | main.rs:386:17:386:17 | x | main.rs:389:10:389:10 | x |
|
||||
| main.rs:386:17:386:17 | x | main.rs:386:17:386:17 | x | main.rs:390:12:390:12 | x |
|
||||
| main.rs:393:22:393:22 | x | main.rs:393:22:393:22 | x | main.rs:394:6:394:6 | x |
|
||||
| main.rs:393:22:393:22 | x | main.rs:393:22:393:22 | x | main.rs:395:10:395:10 | x |
|
||||
| main.rs:393:22:393:22 | x | main.rs:393:22:393:22 | x | main.rs:396:10:396:10 | x |
|
||||
| main.rs:393:22:393:22 | x | main.rs:393:22:393:22 | x | main.rs:398:9:398:9 | x |
|
||||
| main.rs:393:39:393:39 | y | main.rs:393:39:393:39 | y | main.rs:397:6:397:6 | y |
|
||||
| main.rs:403:9:403:9 | y | main.rs:403:9:403:9 | y | main.rs:405:6:405:6 | y |
|
||||
| main.rs:410:9:410:9 | w | main.rs:410:9:410:9 | w | main.rs:414:9:414:9 | w |
|
||||
| main.rs:410:9:410:9 | w | main.rs:410:9:410:9 | w | main.rs:416:7:416:7 | w |
|
||||
| main.rs:423:9:423:9 | y | main.rs:423:9:423:9 | y | main.rs:425:6:425:6 | y |
|
||||
| main.rs:430:9:430:9 | x | main.rs:430:9:430:9 | x | main.rs:436:15:436:15 | x |
|
||||
| main.rs:432:9:432:11 | cap | main.rs:432:9:432:11 | cap | main.rs:435:5:435:7 | cap |
|
||||
| main.rs:432:15:434:5 | <captured entry> x | main.rs:430:9:430:9 | x | main.rs:433:19:433:19 | x |
|
||||
| main.rs:440:9:440:13 | x | main.rs:440:13:440:13 | x | main.rs:446:15:446:15 | x |
|
||||
| main.rs:442:9:442:16 | closure1 | main.rs:442:9:442:16 | closure1 | main.rs:445:5:445:12 | closure1 |
|
||||
| main.rs:442:20:444:5 | <captured entry> x | main.rs:440:13:440:13 | x | main.rs:443:19:443:19 | x |
|
||||
| main.rs:450:9:450:20 | closure2 | main.rs:450:13:450:20 | closure2 | main.rs:453:5:453:12 | closure2 |
|
||||
| main.rs:453:5:453:14 | <captured exit> y | main.rs:448:13:448:13 | y | main.rs:454:15:454:15 | y |
|
||||
| main.rs:458:9:458:20 | closure3 | main.rs:458:13:458:20 | closure3 | main.rs:461:5:461:12 | closure3 |
|
||||
| main.rs:467:9:467:13 | block | main.rs:467:9:467:13 | block | main.rs:471:5:471:9 | block |
|
||||
| main.rs:471:5:471:15 | <captured exit> i | main.rs:466:13:466:13 | i | main.rs:472:15:472:15 | i |
|
||||
| main.rs:475:8:475:8 | b | main.rs:475:8:475:8 | b | main.rs:479:8:479:8 | b |
|
||||
| main.rs:476:9:476:13 | x | main.rs:476:13:476:13 | x | main.rs:477:15:477:15 | x |
|
||||
| main.rs:476:9:476:13 | x | main.rs:476:13:476:13 | x | main.rs:478:15:478:15 | x |
|
||||
| main.rs:479:5:487:5 | phi | main.rs:476:13:476:13 | x | main.rs:488:15:488:15 | x |
|
||||
| main.rs:480:9:480:9 | x | main.rs:476:13:476:13 | x | main.rs:481:19:481:19 | x |
|
||||
| main.rs:480:9:480:9 | x | main.rs:476:13:476:13 | x | main.rs:482:19:482:19 | x |
|
||||
| main.rs:484:9:484:9 | x | main.rs:476:13:476:13 | x | main.rs:485:19:485:19 | x |
|
||||
| main.rs:484:9:484:9 | x | main.rs:476:13:476:13 | x | main.rs:486:19:486:19 | x |
|
||||
| main.rs:491:13:491:14 | b1 | main.rs:491:13:491:14 | b1 | main.rs:493:8:493:9 | b1 |
|
||||
| main.rs:491:24:491:25 | b2 | main.rs:491:24:491:25 | b2 | main.rs:499:8:499:9 | b2 |
|
||||
| main.rs:492:9:492:9 | x | main.rs:492:9:492:9 | x | main.rs:494:19:494:19 | x |
|
||||
| main.rs:492:9:492:9 | x | main.rs:492:9:492:9 | x | main.rs:496:19:496:19 | x |
|
||||
| main.rs:492:9:492:9 | x | main.rs:492:9:492:9 | x | main.rs:500:19:500:19 | x |
|
||||
| main.rs:492:9:492:9 | x | main.rs:492:9:492:9 | x | main.rs:502:19:502:19 | x |
|
||||
| main.rs:512:15:512:23 | SelfParam | main.rs:512:20:512:23 | self | main.rs:513:16:513:19 | self |
|
||||
| main.rs:516:11:516:14 | SelfParam | main.rs:516:11:516:14 | self | main.rs:517:9:517:12 | self |
|
||||
| main.rs:521:13:521:17 | f | main.rs:521:17:521:17 | f | main.rs:525:9:525:9 | f |
|
||||
| main.rs:521:13:521:17 | f | main.rs:521:17:521:17 | f | main.rs:526:9:526:9 | f |
|
||||
| main.rs:521:21:524:9 | <captured entry> self | main.rs:520:23:520:26 | self | main.rs:523:13:523:16 | self |
|
||||
| main.rs:521:22:521:22 | n | main.rs:521:22:521:22 | n | main.rs:523:25:523:25 | n |
|
||||
| main.rs:540:9:540:13 | a | main.rs:540:13:540:13 | a | main.rs:541:15:541:15 | a |
|
||||
| main.rs:540:9:540:13 | a | main.rs:540:13:540:13 | a | main.rs:542:5:542:5 | a |
|
||||
| main.rs:540:9:540:13 | a | main.rs:540:13:540:13 | a | main.rs:543:15:543:15 | a |
|
||||
| main.rs:544:5:544:5 | a | main.rs:540:13:540:13 | a | main.rs:545:15:545:15 | a |
|
||||
| main.rs:549:9:549:9 | x | main.rs:549:9:549:9 | x | main.rs:550:20:550:20 | x |
|
||||
| main.rs:549:9:549:9 | x | main.rs:549:9:549:9 | x | main.rs:551:15:551:15 | x |
|
||||
| main.rs:553:9:553:9 | z | main.rs:553:9:553:9 | z | main.rs:554:20:554:20 | z |
|
||||
| main.rs:562:10:562:18 | SelfParam | main.rs:562:15:562:18 | self | main.rs:563:6:563:9 | self |
|
||||
| main.rs:593:9:593:22 | var_from_macro | main.rs:593:9:593:22 | var_from_macro | main.rs:595:15:595:28 | var_from_macro |
|
||||
| main.rs:594:9:594:25 | var_in_macro | main.rs:594:9:594:25 | var_in_macro | main.rs:594:9:594:25 | var_in_macro |
|
||||
| main.rs:596:9:596:20 | var_in_macro | main.rs:596:9:596:20 | var_in_macro | main.rs:601:15:601:26 | var_in_macro |
|
||||
| main.rs:600:15:600:42 | var_in_macro | main.rs:600:15:600:42 | var_in_macro | main.rs:600:30:600:41 | var_in_macro |
|
||||
firstRead
|
||||
| main.rs:3:14:3:14 | s | main.rs:3:14:3:14 | s | main.rs:4:20:4:20 | s |
|
||||
| main.rs:7:14:7:14 | i | main.rs:7:14:7:14 | i | main.rs:8:20:8:20 | i |
|
||||
@@ -361,49 +374,55 @@ firstRead
|
||||
| main.rs:323:9:323:26 | immutable_variable | main.rs:323:9:323:26 | immutable_variable | main.rs:327:9:327:26 | immutable_variable |
|
||||
| main.rs:324:10:324:10 | x | main.rs:324:10:324:10 | x | main.rs:325:9:325:9 | x |
|
||||
| main.rs:326:9:326:10 | n2 | main.rs:326:9:326:10 | n2 | main.rs:328:15:328:16 | n2 |
|
||||
| main.rs:332:9:332:9 | v | main.rs:332:9:332:9 | v | main.rs:335:12:335:12 | v |
|
||||
| main.rs:334:9:334:12 | text | main.rs:334:9:334:12 | text | main.rs:336:19:336:22 | text |
|
||||
| main.rs:350:9:350:13 | ref_i | main.rs:350:9:350:13 | ref_i | main.rs:352:6:352:10 | ref_i |
|
||||
| main.rs:356:17:356:17 | x | main.rs:356:17:356:17 | x | main.rs:357:6:357:6 | x |
|
||||
| main.rs:363:22:363:22 | x | main.rs:363:22:363:22 | x | main.rs:364:6:364:6 | x |
|
||||
| main.rs:363:39:363:39 | y | main.rs:363:39:363:39 | y | main.rs:367:6:367:6 | y |
|
||||
| main.rs:373:9:373:9 | y | main.rs:373:9:373:9 | y | main.rs:375:6:375:6 | y |
|
||||
| main.rs:380:9:380:9 | w | main.rs:380:9:380:9 | w | main.rs:384:9:384:9 | w |
|
||||
| main.rs:393:9:393:9 | y | main.rs:393:9:393:9 | y | main.rs:395:6:395:6 | y |
|
||||
| main.rs:400:9:400:9 | x | main.rs:400:9:400:9 | x | main.rs:406:15:406:15 | x |
|
||||
| main.rs:402:9:402:11 | cap | main.rs:402:9:402:11 | cap | main.rs:405:5:405:7 | cap |
|
||||
| main.rs:402:15:404:5 | <captured entry> x | main.rs:400:9:400:9 | x | main.rs:403:19:403:19 | x |
|
||||
| main.rs:410:9:410:13 | x | main.rs:410:13:410:13 | x | main.rs:416:15:416:15 | x |
|
||||
| main.rs:412:9:412:16 | closure1 | main.rs:412:9:412:16 | closure1 | main.rs:415:5:415:12 | closure1 |
|
||||
| main.rs:412:20:414:5 | <captured entry> x | main.rs:410:13:410:13 | x | main.rs:413:19:413:19 | x |
|
||||
| main.rs:420:9:420:20 | closure2 | main.rs:420:13:420:20 | closure2 | main.rs:423:5:423:12 | closure2 |
|
||||
| main.rs:423:5:423:14 | <captured exit> y | main.rs:418:13:418:13 | y | main.rs:424:15:424:15 | y |
|
||||
| main.rs:428:9:428:20 | closure3 | main.rs:428:13:428:20 | closure3 | main.rs:431:5:431:12 | closure3 |
|
||||
| main.rs:437:9:437:13 | block | main.rs:437:9:437:13 | block | main.rs:441:5:441:9 | block |
|
||||
| main.rs:441:5:441:15 | <captured exit> i | main.rs:436:13:436:13 | i | main.rs:442:15:442:15 | i |
|
||||
| main.rs:445:8:445:8 | b | main.rs:445:8:445:8 | b | main.rs:449:8:449:8 | b |
|
||||
| main.rs:446:9:446:13 | x | main.rs:446:13:446:13 | x | main.rs:447:15:447:15 | x |
|
||||
| main.rs:449:5:457:5 | phi | main.rs:446:13:446:13 | x | main.rs:458:15:458:15 | x |
|
||||
| main.rs:450:9:450:9 | x | main.rs:446:13:446:13 | x | main.rs:451:19:451:19 | x |
|
||||
| main.rs:454:9:454:9 | x | main.rs:446:13:446:13 | x | main.rs:455:19:455:19 | x |
|
||||
| main.rs:461:13:461:14 | b1 | main.rs:461:13:461:14 | b1 | main.rs:463:8:463:9 | b1 |
|
||||
| main.rs:461:24:461:25 | b2 | main.rs:461:24:461:25 | b2 | main.rs:469:8:469:9 | b2 |
|
||||
| main.rs:462:9:462:9 | x | main.rs:462:9:462:9 | x | main.rs:464:19:464:19 | x |
|
||||
| main.rs:462:9:462:9 | x | main.rs:462:9:462:9 | x | main.rs:466:19:466:19 | x |
|
||||
| main.rs:482:15:482:23 | SelfParam | main.rs:482:20:482:23 | self | main.rs:483:16:483:19 | self |
|
||||
| main.rs:486:11:486:14 | SelfParam | main.rs:486:11:486:14 | self | main.rs:487:9:487:12 | self |
|
||||
| main.rs:491:13:491:17 | f | main.rs:491:17:491:17 | f | main.rs:495:9:495:9 | f |
|
||||
| main.rs:491:21:494:9 | <captured entry> self | main.rs:490:23:490:26 | self | main.rs:493:13:493:16 | self |
|
||||
| main.rs:491:22:491:22 | n | main.rs:491:22:491:22 | n | main.rs:493:25:493:25 | n |
|
||||
| main.rs:510:9:510:13 | a | main.rs:510:13:510:13 | a | main.rs:511:15:511:15 | a |
|
||||
| main.rs:514:5:514:5 | a | main.rs:510:13:510:13 | a | main.rs:515:15:515:15 | a |
|
||||
| main.rs:519:9:519:9 | x | main.rs:519:9:519:9 | x | main.rs:520:20:520:20 | x |
|
||||
| main.rs:523:9:523:9 | z | main.rs:523:9:523:9 | z | main.rs:524:20:524:20 | z |
|
||||
| main.rs:532:10:532:18 | SelfParam | main.rs:532:15:532:18 | self | main.rs:533:6:533:9 | self |
|
||||
| main.rs:563:9:563:22 | var_from_macro | main.rs:563:9:563:22 | var_from_macro | main.rs:565:15:565:28 | var_from_macro |
|
||||
| main.rs:564:9:564:25 | var_in_macro | main.rs:564:9:564:25 | var_in_macro | main.rs:564:9:564:25 | var_in_macro |
|
||||
| main.rs:566:9:566:20 | var_in_macro | main.rs:566:9:566:20 | var_in_macro | main.rs:571:15:571:26 | var_in_macro |
|
||||
| main.rs:570:15:570:42 | var_in_macro | main.rs:570:15:570:42 | var_in_macro | main.rs:570:30:570:41 | var_in_macro |
|
||||
| main.rs:333:9:333:9 | f | main.rs:333:9:333:9 | f | main.rs:336:15:336:15 | f |
|
||||
| main.rs:334:10:334:10 | x | main.rs:334:10:334:10 | x | main.rs:335:9:335:9 | x |
|
||||
| main.rs:338:10:338:10 | x | main.rs:338:10:338:10 | x | main.rs:339:9:339:9 | x |
|
||||
| main.rs:346:14:346:14 | x | main.rs:346:14:346:14 | x | main.rs:347:17:347:17 | x |
|
||||
| main.rs:354:13:354:13 | f | main.rs:354:13:354:13 | f | main.rs:357:19:357:19 | f |
|
||||
| main.rs:355:14:355:14 | x | main.rs:355:14:355:14 | x | main.rs:356:13:356:13 | x |
|
||||
| main.rs:362:9:362:9 | v | main.rs:362:9:362:9 | v | main.rs:365:12:365:12 | v |
|
||||
| main.rs:364:9:364:12 | text | main.rs:364:9:364:12 | text | main.rs:366:19:366:22 | text |
|
||||
| main.rs:380:9:380:13 | ref_i | main.rs:380:9:380:13 | ref_i | main.rs:382:6:382:10 | ref_i |
|
||||
| main.rs:386:17:386:17 | x | main.rs:386:17:386:17 | x | main.rs:387:6:387:6 | x |
|
||||
| main.rs:393:22:393:22 | x | main.rs:393:22:393:22 | x | main.rs:394:6:394:6 | x |
|
||||
| main.rs:393:39:393:39 | y | main.rs:393:39:393:39 | y | main.rs:397:6:397:6 | y |
|
||||
| main.rs:403:9:403:9 | y | main.rs:403:9:403:9 | y | main.rs:405:6:405:6 | y |
|
||||
| main.rs:410:9:410:9 | w | main.rs:410:9:410:9 | w | main.rs:414:9:414:9 | w |
|
||||
| main.rs:423:9:423:9 | y | main.rs:423:9:423:9 | y | main.rs:425:6:425:6 | y |
|
||||
| main.rs:430:9:430:9 | x | main.rs:430:9:430:9 | x | main.rs:436:15:436:15 | x |
|
||||
| main.rs:432:9:432:11 | cap | main.rs:432:9:432:11 | cap | main.rs:435:5:435:7 | cap |
|
||||
| main.rs:432:15:434:5 | <captured entry> x | main.rs:430:9:430:9 | x | main.rs:433:19:433:19 | x |
|
||||
| main.rs:440:9:440:13 | x | main.rs:440:13:440:13 | x | main.rs:446:15:446:15 | x |
|
||||
| main.rs:442:9:442:16 | closure1 | main.rs:442:9:442:16 | closure1 | main.rs:445:5:445:12 | closure1 |
|
||||
| main.rs:442:20:444:5 | <captured entry> x | main.rs:440:13:440:13 | x | main.rs:443:19:443:19 | x |
|
||||
| main.rs:450:9:450:20 | closure2 | main.rs:450:13:450:20 | closure2 | main.rs:453:5:453:12 | closure2 |
|
||||
| main.rs:453:5:453:14 | <captured exit> y | main.rs:448:13:448:13 | y | main.rs:454:15:454:15 | y |
|
||||
| main.rs:458:9:458:20 | closure3 | main.rs:458:13:458:20 | closure3 | main.rs:461:5:461:12 | closure3 |
|
||||
| main.rs:467:9:467:13 | block | main.rs:467:9:467:13 | block | main.rs:471:5:471:9 | block |
|
||||
| main.rs:471:5:471:15 | <captured exit> i | main.rs:466:13:466:13 | i | main.rs:472:15:472:15 | i |
|
||||
| main.rs:475:8:475:8 | b | main.rs:475:8:475:8 | b | main.rs:479:8:479:8 | b |
|
||||
| main.rs:476:9:476:13 | x | main.rs:476:13:476:13 | x | main.rs:477:15:477:15 | x |
|
||||
| main.rs:479:5:487:5 | phi | main.rs:476:13:476:13 | x | main.rs:488:15:488:15 | x |
|
||||
| main.rs:480:9:480:9 | x | main.rs:476:13:476:13 | x | main.rs:481:19:481:19 | x |
|
||||
| main.rs:484:9:484:9 | x | main.rs:476:13:476:13 | x | main.rs:485:19:485:19 | x |
|
||||
| main.rs:491:13:491:14 | b1 | main.rs:491:13:491:14 | b1 | main.rs:493:8:493:9 | b1 |
|
||||
| main.rs:491:24:491:25 | b2 | main.rs:491:24:491:25 | b2 | main.rs:499:8:499:9 | b2 |
|
||||
| main.rs:492:9:492:9 | x | main.rs:492:9:492:9 | x | main.rs:494:19:494:19 | x |
|
||||
| main.rs:492:9:492:9 | x | main.rs:492:9:492:9 | x | main.rs:496:19:496:19 | x |
|
||||
| main.rs:512:15:512:23 | SelfParam | main.rs:512:20:512:23 | self | main.rs:513:16:513:19 | self |
|
||||
| main.rs:516:11:516:14 | SelfParam | main.rs:516:11:516:14 | self | main.rs:517:9:517:12 | self |
|
||||
| main.rs:521:13:521:17 | f | main.rs:521:17:521:17 | f | main.rs:525:9:525:9 | f |
|
||||
| main.rs:521:21:524:9 | <captured entry> self | main.rs:520:23:520:26 | self | main.rs:523:13:523:16 | self |
|
||||
| main.rs:521:22:521:22 | n | main.rs:521:22:521:22 | n | main.rs:523:25:523:25 | n |
|
||||
| main.rs:540:9:540:13 | a | main.rs:540:13:540:13 | a | main.rs:541:15:541:15 | a |
|
||||
| main.rs:544:5:544:5 | a | main.rs:540:13:540:13 | a | main.rs:545:15:545:15 | a |
|
||||
| main.rs:549:9:549:9 | x | main.rs:549:9:549:9 | x | main.rs:550:20:550:20 | x |
|
||||
| main.rs:553:9:553:9 | z | main.rs:553:9:553:9 | z | main.rs:554:20:554:20 | z |
|
||||
| main.rs:562:10:562:18 | SelfParam | main.rs:562:15:562:18 | self | main.rs:563:6:563:9 | self |
|
||||
| main.rs:593:9:593:22 | var_from_macro | main.rs:593:9:593:22 | var_from_macro | main.rs:595:15:595:28 | var_from_macro |
|
||||
| main.rs:594:9:594:25 | var_in_macro | main.rs:594:9:594:25 | var_in_macro | main.rs:594:9:594:25 | var_in_macro |
|
||||
| main.rs:596:9:596:20 | var_in_macro | main.rs:596:9:596:20 | var_in_macro | main.rs:601:15:601:26 | var_in_macro |
|
||||
| main.rs:600:15:600:42 | var_in_macro | main.rs:600:15:600:42 | var_in_macro | main.rs:600:30:600:41 | var_in_macro |
|
||||
lastRead
|
||||
| main.rs:3:14:3:14 | s | main.rs:3:14:3:14 | s | main.rs:4:20:4:20 | s |
|
||||
| main.rs:7:14:7:14 | i | main.rs:7:14:7:14 | i | main.rs:8:20:8:20 | i |
|
||||
@@ -476,49 +495,55 @@ lastRead
|
||||
| main.rs:323:9:323:26 | immutable_variable | main.rs:323:9:323:26 | immutable_variable | main.rs:327:9:327:26 | immutable_variable |
|
||||
| main.rs:324:10:324:10 | x | main.rs:324:10:324:10 | x | main.rs:325:9:325:9 | x |
|
||||
| main.rs:326:9:326:10 | n2 | main.rs:326:9:326:10 | n2 | main.rs:328:15:328:16 | n2 |
|
||||
| main.rs:332:9:332:9 | v | main.rs:332:9:332:9 | v | main.rs:335:12:335:12 | v |
|
||||
| main.rs:334:9:334:12 | text | main.rs:334:9:334:12 | text | main.rs:336:19:336:22 | text |
|
||||
| main.rs:350:9:350:13 | ref_i | main.rs:350:9:350:13 | ref_i | main.rs:352:6:352:10 | ref_i |
|
||||
| main.rs:356:17:356:17 | x | main.rs:356:17:356:17 | x | main.rs:360:12:360:12 | x |
|
||||
| main.rs:363:22:363:22 | x | main.rs:363:22:363:22 | x | main.rs:368:9:368:9 | x |
|
||||
| main.rs:363:39:363:39 | y | main.rs:363:39:363:39 | y | main.rs:367:6:367:6 | y |
|
||||
| main.rs:373:9:373:9 | y | main.rs:373:9:373:9 | y | main.rs:375:6:375:6 | y |
|
||||
| main.rs:380:9:380:9 | w | main.rs:380:9:380:9 | w | main.rs:386:7:386:7 | w |
|
||||
| main.rs:393:9:393:9 | y | main.rs:393:9:393:9 | y | main.rs:395:6:395:6 | y |
|
||||
| main.rs:400:9:400:9 | x | main.rs:400:9:400:9 | x | main.rs:406:15:406:15 | x |
|
||||
| main.rs:402:9:402:11 | cap | main.rs:402:9:402:11 | cap | main.rs:405:5:405:7 | cap |
|
||||
| main.rs:402:15:404:5 | <captured entry> x | main.rs:400:9:400:9 | x | main.rs:403:19:403:19 | x |
|
||||
| main.rs:410:9:410:13 | x | main.rs:410:13:410:13 | x | main.rs:416:15:416:15 | x |
|
||||
| main.rs:412:9:412:16 | closure1 | main.rs:412:9:412:16 | closure1 | main.rs:415:5:415:12 | closure1 |
|
||||
| main.rs:412:20:414:5 | <captured entry> x | main.rs:410:13:410:13 | x | main.rs:413:19:413:19 | x |
|
||||
| main.rs:420:9:420:20 | closure2 | main.rs:420:13:420:20 | closure2 | main.rs:423:5:423:12 | closure2 |
|
||||
| main.rs:423:5:423:14 | <captured exit> y | main.rs:418:13:418:13 | y | main.rs:424:15:424:15 | y |
|
||||
| main.rs:428:9:428:20 | closure3 | main.rs:428:13:428:20 | closure3 | main.rs:431:5:431:12 | closure3 |
|
||||
| main.rs:437:9:437:13 | block | main.rs:437:9:437:13 | block | main.rs:441:5:441:9 | block |
|
||||
| main.rs:441:5:441:15 | <captured exit> i | main.rs:436:13:436:13 | i | main.rs:442:15:442:15 | i |
|
||||
| main.rs:445:8:445:8 | b | main.rs:445:8:445:8 | b | main.rs:449:8:449:8 | b |
|
||||
| main.rs:446:9:446:13 | x | main.rs:446:13:446:13 | x | main.rs:448:15:448:15 | x |
|
||||
| main.rs:449:5:457:5 | phi | main.rs:446:13:446:13 | x | main.rs:458:15:458:15 | x |
|
||||
| main.rs:450:9:450:9 | x | main.rs:446:13:446:13 | x | main.rs:452:19:452:19 | x |
|
||||
| main.rs:454:9:454:9 | x | main.rs:446:13:446:13 | x | main.rs:456:19:456:19 | x |
|
||||
| main.rs:461:13:461:14 | b1 | main.rs:461:13:461:14 | b1 | main.rs:463:8:463:9 | b1 |
|
||||
| main.rs:461:24:461:25 | b2 | main.rs:461:24:461:25 | b2 | main.rs:469:8:469:9 | b2 |
|
||||
| main.rs:462:9:462:9 | x | main.rs:462:9:462:9 | x | main.rs:470:19:470:19 | x |
|
||||
| main.rs:462:9:462:9 | x | main.rs:462:9:462:9 | x | main.rs:472:19:472:19 | x |
|
||||
| main.rs:482:15:482:23 | SelfParam | main.rs:482:20:482:23 | self | main.rs:483:16:483:19 | self |
|
||||
| main.rs:486:11:486:14 | SelfParam | main.rs:486:11:486:14 | self | main.rs:487:9:487:12 | self |
|
||||
| main.rs:491:13:491:17 | f | main.rs:491:17:491:17 | f | main.rs:496:9:496:9 | f |
|
||||
| main.rs:491:21:494:9 | <captured entry> self | main.rs:490:23:490:26 | self | main.rs:493:13:493:16 | self |
|
||||
| main.rs:491:22:491:22 | n | main.rs:491:22:491:22 | n | main.rs:493:25:493:25 | n |
|
||||
| main.rs:510:9:510:13 | a | main.rs:510:13:510:13 | a | main.rs:513:15:513:15 | a |
|
||||
| main.rs:514:5:514:5 | a | main.rs:510:13:510:13 | a | main.rs:515:15:515:15 | a |
|
||||
| main.rs:519:9:519:9 | x | main.rs:519:9:519:9 | x | main.rs:521:15:521:15 | x |
|
||||
| main.rs:523:9:523:9 | z | main.rs:523:9:523:9 | z | main.rs:524:20:524:20 | z |
|
||||
| main.rs:532:10:532:18 | SelfParam | main.rs:532:15:532:18 | self | main.rs:533:6:533:9 | self |
|
||||
| main.rs:563:9:563:22 | var_from_macro | main.rs:563:9:563:22 | var_from_macro | main.rs:565:15:565:28 | var_from_macro |
|
||||
| main.rs:564:9:564:25 | var_in_macro | main.rs:564:9:564:25 | var_in_macro | main.rs:564:9:564:25 | var_in_macro |
|
||||
| main.rs:566:9:566:20 | var_in_macro | main.rs:566:9:566:20 | var_in_macro | main.rs:571:15:571:26 | var_in_macro |
|
||||
| main.rs:570:15:570:42 | var_in_macro | main.rs:570:15:570:42 | var_in_macro | main.rs:570:30:570:41 | var_in_macro |
|
||||
| main.rs:333:9:333:9 | f | main.rs:333:9:333:9 | f | main.rs:342:15:342:15 | f |
|
||||
| main.rs:334:10:334:10 | x | main.rs:334:10:334:10 | x | main.rs:335:9:335:9 | x |
|
||||
| main.rs:338:10:338:10 | x | main.rs:338:10:338:10 | x | main.rs:339:9:339:9 | x |
|
||||
| main.rs:346:14:346:14 | x | main.rs:346:14:346:14 | x | main.rs:347:17:347:17 | x |
|
||||
| main.rs:354:13:354:13 | f | main.rs:354:13:354:13 | f | main.rs:357:19:357:19 | f |
|
||||
| main.rs:355:14:355:14 | x | main.rs:355:14:355:14 | x | main.rs:356:13:356:13 | x |
|
||||
| main.rs:362:9:362:9 | v | main.rs:362:9:362:9 | v | main.rs:365:12:365:12 | v |
|
||||
| main.rs:364:9:364:12 | text | main.rs:364:9:364:12 | text | main.rs:366:19:366:22 | text |
|
||||
| main.rs:380:9:380:13 | ref_i | main.rs:380:9:380:13 | ref_i | main.rs:382:6:382:10 | ref_i |
|
||||
| main.rs:386:17:386:17 | x | main.rs:386:17:386:17 | x | main.rs:390:12:390:12 | x |
|
||||
| main.rs:393:22:393:22 | x | main.rs:393:22:393:22 | x | main.rs:398:9:398:9 | x |
|
||||
| main.rs:393:39:393:39 | y | main.rs:393:39:393:39 | y | main.rs:397:6:397:6 | y |
|
||||
| main.rs:403:9:403:9 | y | main.rs:403:9:403:9 | y | main.rs:405:6:405:6 | y |
|
||||
| main.rs:410:9:410:9 | w | main.rs:410:9:410:9 | w | main.rs:416:7:416:7 | w |
|
||||
| main.rs:423:9:423:9 | y | main.rs:423:9:423:9 | y | main.rs:425:6:425:6 | y |
|
||||
| main.rs:430:9:430:9 | x | main.rs:430:9:430:9 | x | main.rs:436:15:436:15 | x |
|
||||
| main.rs:432:9:432:11 | cap | main.rs:432:9:432:11 | cap | main.rs:435:5:435:7 | cap |
|
||||
| main.rs:432:15:434:5 | <captured entry> x | main.rs:430:9:430:9 | x | main.rs:433:19:433:19 | x |
|
||||
| main.rs:440:9:440:13 | x | main.rs:440:13:440:13 | x | main.rs:446:15:446:15 | x |
|
||||
| main.rs:442:9:442:16 | closure1 | main.rs:442:9:442:16 | closure1 | main.rs:445:5:445:12 | closure1 |
|
||||
| main.rs:442:20:444:5 | <captured entry> x | main.rs:440:13:440:13 | x | main.rs:443:19:443:19 | x |
|
||||
| main.rs:450:9:450:20 | closure2 | main.rs:450:13:450:20 | closure2 | main.rs:453:5:453:12 | closure2 |
|
||||
| main.rs:453:5:453:14 | <captured exit> y | main.rs:448:13:448:13 | y | main.rs:454:15:454:15 | y |
|
||||
| main.rs:458:9:458:20 | closure3 | main.rs:458:13:458:20 | closure3 | main.rs:461:5:461:12 | closure3 |
|
||||
| main.rs:467:9:467:13 | block | main.rs:467:9:467:13 | block | main.rs:471:5:471:9 | block |
|
||||
| main.rs:471:5:471:15 | <captured exit> i | main.rs:466:13:466:13 | i | main.rs:472:15:472:15 | i |
|
||||
| main.rs:475:8:475:8 | b | main.rs:475:8:475:8 | b | main.rs:479:8:479:8 | b |
|
||||
| main.rs:476:9:476:13 | x | main.rs:476:13:476:13 | x | main.rs:478:15:478:15 | x |
|
||||
| main.rs:479:5:487:5 | phi | main.rs:476:13:476:13 | x | main.rs:488:15:488:15 | x |
|
||||
| main.rs:480:9:480:9 | x | main.rs:476:13:476:13 | x | main.rs:482:19:482:19 | x |
|
||||
| main.rs:484:9:484:9 | x | main.rs:476:13:476:13 | x | main.rs:486:19:486:19 | x |
|
||||
| main.rs:491:13:491:14 | b1 | main.rs:491:13:491:14 | b1 | main.rs:493:8:493:9 | b1 |
|
||||
| main.rs:491:24:491:25 | b2 | main.rs:491:24:491:25 | b2 | main.rs:499:8:499:9 | b2 |
|
||||
| main.rs:492:9:492:9 | x | main.rs:492:9:492:9 | x | main.rs:500:19:500:19 | x |
|
||||
| main.rs:492:9:492:9 | x | main.rs:492:9:492:9 | x | main.rs:502:19:502:19 | x |
|
||||
| main.rs:512:15:512:23 | SelfParam | main.rs:512:20:512:23 | self | main.rs:513:16:513:19 | self |
|
||||
| main.rs:516:11:516:14 | SelfParam | main.rs:516:11:516:14 | self | main.rs:517:9:517:12 | self |
|
||||
| main.rs:521:13:521:17 | f | main.rs:521:17:521:17 | f | main.rs:526:9:526:9 | f |
|
||||
| main.rs:521:21:524:9 | <captured entry> self | main.rs:520:23:520:26 | self | main.rs:523:13:523:16 | self |
|
||||
| main.rs:521:22:521:22 | n | main.rs:521:22:521:22 | n | main.rs:523:25:523:25 | n |
|
||||
| main.rs:540:9:540:13 | a | main.rs:540:13:540:13 | a | main.rs:543:15:543:15 | a |
|
||||
| main.rs:544:5:544:5 | a | main.rs:540:13:540:13 | a | main.rs:545:15:545:15 | a |
|
||||
| main.rs:549:9:549:9 | x | main.rs:549:9:549:9 | x | main.rs:551:15:551:15 | x |
|
||||
| main.rs:553:9:553:9 | z | main.rs:553:9:553:9 | z | main.rs:554:20:554:20 | z |
|
||||
| main.rs:562:10:562:18 | SelfParam | main.rs:562:15:562:18 | self | main.rs:563:6:563:9 | self |
|
||||
| main.rs:593:9:593:22 | var_from_macro | main.rs:593:9:593:22 | var_from_macro | main.rs:595:15:595:28 | var_from_macro |
|
||||
| main.rs:594:9:594:25 | var_in_macro | main.rs:594:9:594:25 | var_in_macro | main.rs:594:9:594:25 | var_in_macro |
|
||||
| main.rs:596:9:596:20 | var_in_macro | main.rs:596:9:596:20 | var_in_macro | main.rs:601:15:601:26 | var_in_macro |
|
||||
| main.rs:600:15:600:42 | var_in_macro | main.rs:600:15:600:42 | var_in_macro | main.rs:600:30:600:41 | var_in_macro |
|
||||
adjacentReads
|
||||
| main.rs:35:9:35:10 | x3 | main.rs:35:9:35:10 | x3 | main.rs:36:15:36:16 | x3 | main.rs:38:9:38:10 | x3 |
|
||||
| main.rs:43:9:43:10 | x4 | main.rs:43:9:43:10 | x4 | main.rs:44:15:44:16 | x4 | main.rs:49:15:49:16 | x4 |
|
||||
@@ -532,24 +557,25 @@ adjacentReads
|
||||
| main.rs:289:9:289:10 | b4 | main.rs:280:13:280:14 | b4 | main.rs:297:15:297:16 | b4 | main.rs:311:15:311:16 | b4 |
|
||||
| main.rs:290:9:290:11 | a10 | main.rs:279:13:279:15 | a10 | main.rs:292:9:292:11 | a10 | main.rs:296:15:296:17 | a10 |
|
||||
| main.rs:290:9:290:11 | a10 | main.rs:279:13:279:15 | a10 | main.rs:296:15:296:17 | a10 | main.rs:310:15:310:17 | a10 |
|
||||
| main.rs:356:17:356:17 | x | main.rs:356:17:356:17 | x | main.rs:357:6:357:6 | x | main.rs:358:10:358:10 | x |
|
||||
| main.rs:356:17:356:17 | x | main.rs:356:17:356:17 | x | main.rs:358:10:358:10 | x | main.rs:359:10:359:10 | x |
|
||||
| main.rs:356:17:356:17 | x | main.rs:356:17:356:17 | x | main.rs:359:10:359:10 | x | main.rs:360:12:360:12 | x |
|
||||
| main.rs:363:22:363:22 | x | main.rs:363:22:363:22 | x | main.rs:364:6:364:6 | x | main.rs:365:10:365:10 | x |
|
||||
| main.rs:363:22:363:22 | x | main.rs:363:22:363:22 | x | main.rs:365:10:365:10 | x | main.rs:366:10:366:10 | x |
|
||||
| main.rs:363:22:363:22 | x | main.rs:363:22:363:22 | x | main.rs:366:10:366:10 | x | main.rs:368:9:368:9 | x |
|
||||
| main.rs:380:9:380:9 | w | main.rs:380:9:380:9 | w | main.rs:384:9:384:9 | w | main.rs:386:7:386:7 | w |
|
||||
| main.rs:446:9:446:13 | x | main.rs:446:13:446:13 | x | main.rs:447:15:447:15 | x | main.rs:448:15:448:15 | x |
|
||||
| main.rs:450:9:450:9 | x | main.rs:446:13:446:13 | x | main.rs:451:19:451:19 | x | main.rs:452:19:452:19 | x |
|
||||
| main.rs:454:9:454:9 | x | main.rs:446:13:446:13 | x | main.rs:455:19:455:19 | x | main.rs:456:19:456:19 | x |
|
||||
| main.rs:462:9:462:9 | x | main.rs:462:9:462:9 | x | main.rs:464:19:464:19 | x | main.rs:470:19:470:19 | x |
|
||||
| main.rs:462:9:462:9 | x | main.rs:462:9:462:9 | x | main.rs:464:19:464:19 | x | main.rs:472:19:472:19 | x |
|
||||
| main.rs:462:9:462:9 | x | main.rs:462:9:462:9 | x | main.rs:466:19:466:19 | x | main.rs:470:19:470:19 | x |
|
||||
| main.rs:462:9:462:9 | x | main.rs:462:9:462:9 | x | main.rs:466:19:466:19 | x | main.rs:472:19:472:19 | x |
|
||||
| main.rs:491:13:491:17 | f | main.rs:491:17:491:17 | f | main.rs:495:9:495:9 | f | main.rs:496:9:496:9 | f |
|
||||
| main.rs:510:9:510:13 | a | main.rs:510:13:510:13 | a | main.rs:511:15:511:15 | a | main.rs:512:5:512:5 | a |
|
||||
| main.rs:510:9:510:13 | a | main.rs:510:13:510:13 | a | main.rs:512:5:512:5 | a | main.rs:513:15:513:15 | a |
|
||||
| main.rs:519:9:519:9 | x | main.rs:519:9:519:9 | x | main.rs:520:20:520:20 | x | main.rs:521:15:521:15 | x |
|
||||
| main.rs:333:9:333:9 | f | main.rs:333:9:333:9 | f | main.rs:336:15:336:15 | f | main.rs:342:15:342:15 | f |
|
||||
| main.rs:386:17:386:17 | x | main.rs:386:17:386:17 | x | main.rs:387:6:387:6 | x | main.rs:388:10:388:10 | x |
|
||||
| main.rs:386:17:386:17 | x | main.rs:386:17:386:17 | x | main.rs:388:10:388:10 | x | main.rs:389:10:389:10 | x |
|
||||
| main.rs:386:17:386:17 | x | main.rs:386:17:386:17 | x | main.rs:389:10:389:10 | x | main.rs:390:12:390:12 | x |
|
||||
| main.rs:393:22:393:22 | x | main.rs:393:22:393:22 | x | main.rs:394:6:394:6 | x | main.rs:395:10:395:10 | x |
|
||||
| main.rs:393:22:393:22 | x | main.rs:393:22:393:22 | x | main.rs:395:10:395:10 | x | main.rs:396:10:396:10 | x |
|
||||
| main.rs:393:22:393:22 | x | main.rs:393:22:393:22 | x | main.rs:396:10:396:10 | x | main.rs:398:9:398:9 | x |
|
||||
| main.rs:410:9:410:9 | w | main.rs:410:9:410:9 | w | main.rs:414:9:414:9 | w | main.rs:416:7:416:7 | w |
|
||||
| main.rs:476:9:476:13 | x | main.rs:476:13:476:13 | x | main.rs:477:15:477:15 | x | main.rs:478:15:478:15 | x |
|
||||
| main.rs:480:9:480:9 | x | main.rs:476:13:476:13 | x | main.rs:481:19:481:19 | x | main.rs:482:19:482:19 | x |
|
||||
| main.rs:484:9:484:9 | x | main.rs:476:13:476:13 | x | main.rs:485:19:485:19 | x | main.rs:486:19:486:19 | x |
|
||||
| main.rs:492:9:492:9 | x | main.rs:492:9:492:9 | x | main.rs:494:19:494:19 | x | main.rs:500:19:500:19 | x |
|
||||
| main.rs:492:9:492:9 | x | main.rs:492:9:492:9 | x | main.rs:494:19:494:19 | x | main.rs:502:19:502:19 | x |
|
||||
| main.rs:492:9:492:9 | x | main.rs:492:9:492:9 | x | main.rs:496:19:496:19 | x | main.rs:500:19:500:19 | x |
|
||||
| main.rs:492:9:492:9 | x | main.rs:492:9:492:9 | x | main.rs:496:19:496:19 | x | main.rs:502:19:502:19 | x |
|
||||
| main.rs:521:13:521:17 | f | main.rs:521:17:521:17 | f | main.rs:525:9:525:9 | f | main.rs:526:9:526:9 | f |
|
||||
| main.rs:540:9:540:13 | a | main.rs:540:13:540:13 | a | main.rs:541:15:541:15 | a | main.rs:542:5:542:5 | a |
|
||||
| main.rs:540:9:540:13 | a | main.rs:540:13:540:13 | a | main.rs:542:5:542:5 | a | main.rs:543:15:543:15 | a |
|
||||
| main.rs:549:9:549:9 | x | main.rs:549:9:549:9 | x | main.rs:550:20:550:20 | x | main.rs:551:15:551:15 | x |
|
||||
phi
|
||||
| main.rs:191:9:191:44 | [match(true)] phi | main.rs:191:9:191:44 | a3 | main.rs:191:22:191:23 | a3 |
|
||||
| main.rs:191:9:191:44 | [match(true)] phi | main.rs:191:9:191:44 | a3 | main.rs:191:42:191:43 | a3 |
|
||||
@@ -575,19 +601,19 @@ phi
|
||||
| main.rs:255:35:255:82 | [match(true)] phi | main.rs:255:9:255:109 | a13 | main.rs:255:79:255:81 | a13 |
|
||||
| main.rs:272:6:272:41 | [match(true)] phi | main.rs:272:6:272:41 | a9 | main.rs:272:19:272:20 | a9 |
|
||||
| main.rs:272:6:272:41 | [match(true)] phi | main.rs:272:6:272:41 | a9 | main.rs:272:39:272:40 | a9 |
|
||||
| main.rs:449:5:457:5 | phi | main.rs:446:13:446:13 | x | main.rs:450:9:450:9 | x |
|
||||
| main.rs:449:5:457:5 | phi | main.rs:446:13:446:13 | x | main.rs:454:9:454:9 | x |
|
||||
| main.rs:479:5:487:5 | phi | main.rs:476:13:476:13 | x | main.rs:480:9:480:9 | x |
|
||||
| main.rs:479:5:487:5 | phi | main.rs:476:13:476:13 | x | main.rs:484:9:484:9 | x |
|
||||
phiReadNode
|
||||
| main.rs:104:11:105:12 | SSA phi read(s1) | main.rs:102:9:102:10 | s1 |
|
||||
| main.rs:463:5:467:5 | SSA phi read(x) | main.rs:462:9:462:9 | x |
|
||||
| main.rs:493:5:497:5 | SSA phi read(x) | main.rs:492:9:492:9 | x |
|
||||
phiReadNodeRead
|
||||
| main.rs:104:11:105:12 | SSA phi read(s1) | main.rs:102:9:102:10 | s1 | main.rs:105:11:105:12 | s1 |
|
||||
| main.rs:463:5:467:5 | SSA phi read(x) | main.rs:462:9:462:9 | x | main.rs:470:19:470:19 | x |
|
||||
| main.rs:463:5:467:5 | SSA phi read(x) | main.rs:462:9:462:9 | x | main.rs:472:19:472:19 | x |
|
||||
| main.rs:493:5:497:5 | SSA phi read(x) | main.rs:492:9:492:9 | x | main.rs:500:19:500:19 | x |
|
||||
| main.rs:493:5:497:5 | SSA phi read(x) | main.rs:492:9:492:9 | x | main.rs:502:19:502:19 | x |
|
||||
phiReadInput
|
||||
| main.rs:104:11:105:12 | SSA phi read(s1) | main.rs:102:9:102:10 | s1 |
|
||||
| main.rs:104:11:105:12 | SSA phi read(s1) | main.rs:104:11:105:12 | SSA phi read(s1) |
|
||||
| main.rs:463:5:467:5 | SSA phi read(x) | main.rs:462:9:462:9 | x |
|
||||
| main.rs:493:5:497:5 | SSA phi read(x) | main.rs:492:9:492:9 | x |
|
||||
ultimateDef
|
||||
| main.rs:191:9:191:44 | [match(true)] phi | main.rs:191:22:191:23 | a3 |
|
||||
| main.rs:191:9:191:44 | [match(true)] phi | main.rs:191:42:191:43 | a3 |
|
||||
@@ -616,8 +642,8 @@ ultimateDef
|
||||
| main.rs:255:35:255:82 | [match(true)] phi | main.rs:255:79:255:81 | a13 |
|
||||
| main.rs:272:6:272:41 | [match(true)] phi | main.rs:272:19:272:20 | a9 |
|
||||
| main.rs:272:6:272:41 | [match(true)] phi | main.rs:272:39:272:40 | a9 |
|
||||
| main.rs:449:5:457:5 | phi | main.rs:450:9:450:9 | x |
|
||||
| main.rs:449:5:457:5 | phi | main.rs:454:9:454:9 | x |
|
||||
| main.rs:479:5:487:5 | phi | main.rs:480:9:480:9 | x |
|
||||
| main.rs:479:5:487:5 | phi | main.rs:484:9:484:9 | x |
|
||||
assigns
|
||||
| main.rs:16:9:16:10 | x1 | main.rs:16:14:16:16 | "a" |
|
||||
| main.rs:21:9:21:14 | x2 | main.rs:21:18:21:18 | 4 |
|
||||
@@ -645,32 +671,34 @@ assigns
|
||||
| main.rs:318:9:318:10 | n1 | main.rs:319:9:319:26 | example_closure(...) |
|
||||
| main.rs:323:9:323:26 | immutable_variable | main.rs:324:9:325:9 | \|...\| x |
|
||||
| main.rs:326:9:326:10 | n2 | main.rs:327:9:327:29 | immutable_variable(...) |
|
||||
| main.rs:332:9:332:9 | v | main.rs:332:13:332:41 | &... |
|
||||
| main.rs:350:9:350:13 | ref_i | main.rs:351:9:351:14 | &mut i |
|
||||
| main.rs:373:9:373:9 | y | main.rs:374:9:374:28 | mutate_param(...) |
|
||||
| main.rs:380:9:380:9 | w | main.rs:381:9:381:19 | &mut ... |
|
||||
| main.rs:393:9:393:9 | y | main.rs:394:9:394:14 | &mut x |
|
||||
| main.rs:400:9:400:9 | x | main.rs:400:13:400:15 | 100 |
|
||||
| main.rs:402:9:402:11 | cap | main.rs:402:15:404:5 | \|...\| ... |
|
||||
| main.rs:410:9:410:13 | x | main.rs:410:17:410:17 | 1 |
|
||||
| main.rs:412:9:412:16 | closure1 | main.rs:412:20:414:5 | \|...\| ... |
|
||||
| main.rs:418:9:418:13 | y | main.rs:418:17:418:17 | 2 |
|
||||
| main.rs:420:9:420:20 | closure2 | main.rs:420:24:422:5 | \|...\| ... |
|
||||
| main.rs:421:9:421:9 | y | main.rs:421:13:421:13 | 3 |
|
||||
| main.rs:428:9:428:20 | closure3 | main.rs:428:24:430:5 | \|...\| ... |
|
||||
| main.rs:436:9:436:13 | i | main.rs:436:22:436:22 | 0 |
|
||||
| main.rs:437:9:437:13 | block | main.rs:437:17:439:5 | { ... } |
|
||||
| main.rs:438:9:438:9 | i | main.rs:438:13:438:13 | 1 |
|
||||
| main.rs:446:9:446:13 | x | main.rs:446:17:446:17 | 1 |
|
||||
| main.rs:450:9:450:9 | x | main.rs:450:13:450:13 | 2 |
|
||||
| main.rs:454:9:454:9 | x | main.rs:454:13:454:13 | 3 |
|
||||
| main.rs:462:9:462:9 | x | main.rs:462:13:462:13 | 1 |
|
||||
| main.rs:491:13:491:17 | f | main.rs:491:21:494:9 | \|...\| ... |
|
||||
| main.rs:510:9:510:13 | a | main.rs:510:17:510:25 | [...] |
|
||||
| main.rs:514:5:514:5 | a | main.rs:514:9:514:17 | [...] |
|
||||
| main.rs:519:9:519:9 | x | main.rs:519:13:519:14 | 16 |
|
||||
| main.rs:523:9:523:9 | z | main.rs:523:13:523:14 | 17 |
|
||||
| main.rs:563:9:563:22 | var_from_macro | main.rs:564:9:564:25 | MacroExpr |
|
||||
| main.rs:564:9:564:25 | var_in_macro | main.rs:564:23:564:24 | 37 |
|
||||
| main.rs:566:9:566:20 | var_in_macro | main.rs:566:24:566:25 | 33 |
|
||||
| main.rs:570:15:570:42 | var_in_macro | main.rs:570:15:570:42 | 0 |
|
||||
| main.rs:333:9:333:9 | f | main.rs:334:9:335:9 | \|...\| x |
|
||||
| main.rs:354:13:354:13 | f | main.rs:355:13:356:13 | \|...\| x |
|
||||
| main.rs:362:9:362:9 | v | main.rs:362:13:362:41 | &... |
|
||||
| main.rs:380:9:380:13 | ref_i | main.rs:381:9:381:14 | &mut i |
|
||||
| main.rs:403:9:403:9 | y | main.rs:404:9:404:28 | mutate_param(...) |
|
||||
| main.rs:410:9:410:9 | w | main.rs:411:9:411:19 | &mut ... |
|
||||
| main.rs:423:9:423:9 | y | main.rs:424:9:424:14 | &mut x |
|
||||
| main.rs:430:9:430:9 | x | main.rs:430:13:430:15 | 100 |
|
||||
| main.rs:432:9:432:11 | cap | main.rs:432:15:434:5 | \|...\| ... |
|
||||
| main.rs:440:9:440:13 | x | main.rs:440:17:440:17 | 1 |
|
||||
| main.rs:442:9:442:16 | closure1 | main.rs:442:20:444:5 | \|...\| ... |
|
||||
| main.rs:448:9:448:13 | y | main.rs:448:17:448:17 | 2 |
|
||||
| main.rs:450:9:450:20 | closure2 | main.rs:450:24:452:5 | \|...\| ... |
|
||||
| main.rs:451:9:451:9 | y | main.rs:451:13:451:13 | 3 |
|
||||
| main.rs:458:9:458:20 | closure3 | main.rs:458:24:460:5 | \|...\| ... |
|
||||
| main.rs:466:9:466:13 | i | main.rs:466:22:466:22 | 0 |
|
||||
| main.rs:467:9:467:13 | block | main.rs:467:17:469:5 | { ... } |
|
||||
| main.rs:468:9:468:9 | i | main.rs:468:13:468:13 | 1 |
|
||||
| main.rs:476:9:476:13 | x | main.rs:476:17:476:17 | 1 |
|
||||
| main.rs:480:9:480:9 | x | main.rs:480:13:480:13 | 2 |
|
||||
| main.rs:484:9:484:9 | x | main.rs:484:13:484:13 | 3 |
|
||||
| main.rs:492:9:492:9 | x | main.rs:492:13:492:13 | 1 |
|
||||
| main.rs:521:13:521:17 | f | main.rs:521:21:524:9 | \|...\| ... |
|
||||
| main.rs:540:9:540:13 | a | main.rs:540:17:540:25 | [...] |
|
||||
| main.rs:544:5:544:5 | a | main.rs:544:9:544:17 | [...] |
|
||||
| main.rs:549:9:549:9 | x | main.rs:549:13:549:14 | 16 |
|
||||
| main.rs:553:9:553:9 | z | main.rs:553:13:553:14 | 17 |
|
||||
| main.rs:593:9:593:22 | var_from_macro | main.rs:594:9:594:25 | MacroExpr |
|
||||
| main.rs:594:9:594:25 | var_in_macro | main.rs:594:23:594:24 | 37 |
|
||||
| main.rs:596:9:596:20 | var_in_macro | main.rs:596:24:596:25 | 33 |
|
||||
| main.rs:600:15:600:42 | var_in_macro | main.rs:600:15:600:42 | 0 |
|
||||
|
||||
@@ -328,6 +328,36 @@ fn closure_variable() {
|
||||
print_i64(n2); // $ read_access=n2
|
||||
}
|
||||
|
||||
fn nested_function() {
|
||||
// local variables shadow local functions
|
||||
let f = // f1
|
||||
|x: i64| // x_1
|
||||
x; // $ read_access=x_1
|
||||
print_i64(f(1)); // $ read_access=f1
|
||||
|
||||
fn f(x: i64) -> i64 { // x_2
|
||||
x + 1 // $ read_access=x_2
|
||||
}
|
||||
|
||||
print_i64(f(2)); // $ read_access=f1
|
||||
|
||||
{
|
||||
print_i64(f(3));
|
||||
fn f(x: i64) -> i64 { // x_3
|
||||
2 * x // $ read_access=x_3
|
||||
}
|
||||
|
||||
{
|
||||
print_i64(f(4));
|
||||
}
|
||||
|
||||
let f = // f2
|
||||
|x: i64| // x_4
|
||||
x; // $ read_access=x_4
|
||||
print_i64(f(5)); // $ read_access=f2
|
||||
}
|
||||
}
|
||||
|
||||
fn for_variable() {
|
||||
let v = &["apples", "cake", "coffee"]; // v
|
||||
|
||||
@@ -594,6 +624,7 @@ fn main() {
|
||||
param_pattern2(Either::Left(45));
|
||||
destruct_assignment();
|
||||
closure_variable();
|
||||
nested_function();
|
||||
for_variable();
|
||||
add_assign();
|
||||
mutate();
|
||||
|
||||
@@ -65,50 +65,56 @@ variable
|
||||
| main.rs:323:9:323:26 | immutable_variable |
|
||||
| main.rs:324:10:324:10 | x |
|
||||
| main.rs:326:9:326:10 | n2 |
|
||||
| main.rs:332:9:332:9 | v |
|
||||
| main.rs:334:9:334:12 | text |
|
||||
| main.rs:341:13:341:13 | a |
|
||||
| main.rs:349:13:349:13 | i |
|
||||
| main.rs:350:9:350:13 | ref_i |
|
||||
| main.rs:356:17:356:17 | x |
|
||||
| main.rs:363:22:363:22 | x |
|
||||
| main.rs:363:39:363:39 | y |
|
||||
| main.rs:372:13:372:13 | x |
|
||||
| main.rs:373:9:373:9 | y |
|
||||
| main.rs:379:13:379:13 | z |
|
||||
| main.rs:380:9:380:9 | w |
|
||||
| main.rs:392:13:392:13 | x |
|
||||
| main.rs:393:9:393:9 | y |
|
||||
| main.rs:400:9:400:9 | x |
|
||||
| main.rs:402:9:402:11 | cap |
|
||||
| main.rs:410:13:410:13 | x |
|
||||
| main.rs:412:9:412:16 | closure1 |
|
||||
| main.rs:418:13:418:13 | y |
|
||||
| main.rs:420:13:420:20 | closure2 |
|
||||
| main.rs:426:13:426:13 | z |
|
||||
| main.rs:428:13:428:20 | closure3 |
|
||||
| main.rs:436:13:436:13 | i |
|
||||
| main.rs:437:9:437:13 | block |
|
||||
| main.rs:445:8:445:8 | b |
|
||||
| main.rs:446:13:446:13 | x |
|
||||
| main.rs:461:13:461:14 | b1 |
|
||||
| main.rs:461:24:461:25 | b2 |
|
||||
| main.rs:462:9:462:9 | x |
|
||||
| main.rs:482:20:482:23 | self |
|
||||
| main.rs:486:11:486:14 | self |
|
||||
| main.rs:490:23:490:26 | self |
|
||||
| main.rs:491:17:491:17 | f |
|
||||
| main.rs:491:22:491:22 | n |
|
||||
| main.rs:501:13:501:13 | a |
|
||||
| main.rs:510:13:510:13 | a |
|
||||
| main.rs:519:9:519:9 | x |
|
||||
| main.rs:523:9:523:9 | z |
|
||||
| main.rs:532:15:532:18 | self |
|
||||
| main.rs:538:11:538:11 | a |
|
||||
| main.rs:563:9:563:22 | var_from_macro |
|
||||
| main.rs:564:9:564:25 | var_in_macro |
|
||||
| main.rs:566:9:566:20 | var_in_macro |
|
||||
| main.rs:570:15:570:42 | var_in_macro |
|
||||
| main.rs:333:9:333:9 | f |
|
||||
| main.rs:334:10:334:10 | x |
|
||||
| main.rs:338:10:338:10 | x |
|
||||
| main.rs:346:14:346:14 | x |
|
||||
| main.rs:354:13:354:13 | f |
|
||||
| main.rs:355:14:355:14 | x |
|
||||
| main.rs:362:9:362:9 | v |
|
||||
| main.rs:364:9:364:12 | text |
|
||||
| main.rs:371:13:371:13 | a |
|
||||
| main.rs:379:13:379:13 | i |
|
||||
| main.rs:380:9:380:13 | ref_i |
|
||||
| main.rs:386:17:386:17 | x |
|
||||
| main.rs:393:22:393:22 | x |
|
||||
| main.rs:393:39:393:39 | y |
|
||||
| main.rs:402:13:402:13 | x |
|
||||
| main.rs:403:9:403:9 | y |
|
||||
| main.rs:409:13:409:13 | z |
|
||||
| main.rs:410:9:410:9 | w |
|
||||
| main.rs:422:13:422:13 | x |
|
||||
| main.rs:423:9:423:9 | y |
|
||||
| main.rs:430:9:430:9 | x |
|
||||
| main.rs:432:9:432:11 | cap |
|
||||
| main.rs:440:13:440:13 | x |
|
||||
| main.rs:442:9:442:16 | closure1 |
|
||||
| main.rs:448:13:448:13 | y |
|
||||
| main.rs:450:13:450:20 | closure2 |
|
||||
| main.rs:456:13:456:13 | z |
|
||||
| main.rs:458:13:458:20 | closure3 |
|
||||
| main.rs:466:13:466:13 | i |
|
||||
| main.rs:467:9:467:13 | block |
|
||||
| main.rs:475:8:475:8 | b |
|
||||
| main.rs:476:13:476:13 | x |
|
||||
| main.rs:491:13:491:14 | b1 |
|
||||
| main.rs:491:24:491:25 | b2 |
|
||||
| main.rs:492:9:492:9 | x |
|
||||
| main.rs:512:20:512:23 | self |
|
||||
| main.rs:516:11:516:14 | self |
|
||||
| main.rs:520:23:520:26 | self |
|
||||
| main.rs:521:17:521:17 | f |
|
||||
| main.rs:521:22:521:22 | n |
|
||||
| main.rs:531:13:531:13 | a |
|
||||
| main.rs:540:13:540:13 | a |
|
||||
| main.rs:549:9:549:9 | x |
|
||||
| main.rs:553:9:553:9 | z |
|
||||
| main.rs:562:15:562:18 | self |
|
||||
| main.rs:568:11:568:11 | a |
|
||||
| main.rs:593:9:593:22 | var_from_macro |
|
||||
| main.rs:594:9:594:25 | var_in_macro |
|
||||
| main.rs:596:9:596:20 | var_in_macro |
|
||||
| main.rs:600:15:600:42 | var_in_macro |
|
||||
variableAccess
|
||||
| main.rs:4:20:4:20 | s | main.rs:3:14:3:14 | s |
|
||||
| main.rs:8:20:8:20 | i | main.rs:7:14:7:14 | i |
|
||||
@@ -196,104 +202,111 @@ variableAccess
|
||||
| main.rs:325:9:325:9 | x | main.rs:324:10:324:10 | x |
|
||||
| main.rs:327:9:327:26 | immutable_variable | main.rs:323:9:323:26 | immutable_variable |
|
||||
| main.rs:328:15:328:16 | n2 | main.rs:326:9:326:10 | n2 |
|
||||
| main.rs:335:12:335:12 | v | main.rs:332:9:332:9 | v |
|
||||
| main.rs:336:19:336:22 | text | main.rs:334:9:334:12 | text |
|
||||
| main.rs:342:5:342:5 | a | main.rs:341:13:341:13 | a |
|
||||
| main.rs:343:15:343:15 | a | main.rs:341:13:341:13 | a |
|
||||
| main.rs:344:11:344:11 | a | main.rs:341:13:341:13 | a |
|
||||
| main.rs:345:15:345:15 | a | main.rs:341:13:341:13 | a |
|
||||
| main.rs:351:14:351:14 | i | main.rs:349:13:349:13 | i |
|
||||
| main.rs:352:6:352:10 | ref_i | main.rs:350:9:350:13 | ref_i |
|
||||
| main.rs:353:15:353:15 | i | main.rs:349:13:349:13 | i |
|
||||
| main.rs:357:6:357:6 | x | main.rs:356:17:356:17 | x |
|
||||
| main.rs:358:10:358:10 | x | main.rs:356:17:356:17 | x |
|
||||
| main.rs:359:10:359:10 | x | main.rs:356:17:356:17 | x |
|
||||
| main.rs:360:12:360:12 | x | main.rs:356:17:356:17 | x |
|
||||
| main.rs:364:6:364:6 | x | main.rs:363:22:363:22 | x |
|
||||
| main.rs:365:10:365:10 | x | main.rs:363:22:363:22 | x |
|
||||
| main.rs:366:10:366:10 | x | main.rs:363:22:363:22 | x |
|
||||
| main.rs:367:6:367:6 | y | main.rs:363:39:363:39 | y |
|
||||
| main.rs:368:9:368:9 | x | main.rs:363:22:363:22 | x |
|
||||
| main.rs:374:27:374:27 | x | main.rs:372:13:372:13 | x |
|
||||
| main.rs:375:6:375:6 | y | main.rs:373:9:373:9 | y |
|
||||
| main.rs:377:15:377:15 | x | main.rs:372:13:372:13 | x |
|
||||
| main.rs:381:19:381:19 | x | main.rs:372:13:372:13 | x |
|
||||
| main.rs:383:14:383:14 | z | main.rs:379:13:379:13 | z |
|
||||
| main.rs:384:9:384:9 | w | main.rs:380:9:380:9 | w |
|
||||
| main.rs:386:7:386:7 | w | main.rs:380:9:380:9 | w |
|
||||
| main.rs:388:15:388:15 | z | main.rs:379:13:379:13 | z |
|
||||
| main.rs:394:14:394:14 | x | main.rs:392:13:392:13 | x |
|
||||
| main.rs:395:6:395:6 | y | main.rs:393:9:393:9 | y |
|
||||
| main.rs:396:15:396:15 | x | main.rs:392:13:392:13 | x |
|
||||
| main.rs:403:19:403:19 | x | main.rs:400:9:400:9 | x |
|
||||
| main.rs:405:5:405:7 | cap | main.rs:402:9:402:11 | cap |
|
||||
| main.rs:406:15:406:15 | x | main.rs:400:9:400:9 | x |
|
||||
| main.rs:413:19:413:19 | x | main.rs:410:13:410:13 | x |
|
||||
| main.rs:415:5:415:12 | closure1 | main.rs:412:9:412:16 | closure1 |
|
||||
| main.rs:416:15:416:15 | x | main.rs:410:13:410:13 | x |
|
||||
| main.rs:421:9:421:9 | y | main.rs:418:13:418:13 | y |
|
||||
| main.rs:423:5:423:12 | closure2 | main.rs:420:13:420:20 | closure2 |
|
||||
| main.rs:424:15:424:15 | y | main.rs:418:13:418:13 | y |
|
||||
| main.rs:429:9:429:9 | z | main.rs:426:13:426:13 | z |
|
||||
| main.rs:431:5:431:12 | closure3 | main.rs:428:13:428:20 | closure3 |
|
||||
| main.rs:432:15:432:15 | z | main.rs:426:13:426:13 | z |
|
||||
| main.rs:438:9:438:9 | i | main.rs:436:13:436:13 | i |
|
||||
| main.rs:441:5:441:9 | block | main.rs:437:9:437:13 | block |
|
||||
| main.rs:442:15:442:15 | i | main.rs:436:13:436:13 | i |
|
||||
| main.rs:447:15:447:15 | x | main.rs:446:13:446:13 | x |
|
||||
| main.rs:448:15:448:15 | x | main.rs:446:13:446:13 | x |
|
||||
| main.rs:449:8:449:8 | b | main.rs:445:8:445:8 | b |
|
||||
| main.rs:450:9:450:9 | x | main.rs:446:13:446:13 | x |
|
||||
| main.rs:451:19:451:19 | x | main.rs:446:13:446:13 | x |
|
||||
| main.rs:452:19:452:19 | x | main.rs:446:13:446:13 | x |
|
||||
| main.rs:454:9:454:9 | x | main.rs:446:13:446:13 | x |
|
||||
| main.rs:455:19:455:19 | x | main.rs:446:13:446:13 | x |
|
||||
| main.rs:456:19:456:19 | x | main.rs:446:13:446:13 | x |
|
||||
| main.rs:458:15:458:15 | x | main.rs:446:13:446:13 | x |
|
||||
| main.rs:463:8:463:9 | b1 | main.rs:461:13:461:14 | b1 |
|
||||
| main.rs:464:19:464:19 | x | main.rs:462:9:462:9 | x |
|
||||
| main.rs:466:19:466:19 | x | main.rs:462:9:462:9 | x |
|
||||
| main.rs:469:8:469:9 | b2 | main.rs:461:24:461:25 | b2 |
|
||||
| main.rs:470:19:470:19 | x | main.rs:462:9:462:9 | x |
|
||||
| main.rs:472:19:472:19 | x | main.rs:462:9:462:9 | x |
|
||||
| main.rs:483:16:483:19 | self | main.rs:482:20:482:23 | self |
|
||||
| main.rs:487:9:487:12 | self | main.rs:486:11:486:14 | self |
|
||||
| main.rs:493:13:493:16 | self | main.rs:490:23:490:26 | self |
|
||||
| main.rs:493:25:493:25 | n | main.rs:491:22:491:22 | n |
|
||||
| main.rs:495:9:495:9 | f | main.rs:491:17:491:17 | f |
|
||||
| main.rs:496:9:496:9 | f | main.rs:491:17:491:17 | f |
|
||||
| main.rs:502:15:502:15 | a | main.rs:501:13:501:13 | a |
|
||||
| main.rs:503:5:503:5 | a | main.rs:501:13:501:13 | a |
|
||||
| main.rs:504:15:504:15 | a | main.rs:501:13:501:13 | a |
|
||||
| main.rs:505:5:505:5 | a | main.rs:501:13:501:13 | a |
|
||||
| main.rs:506:15:506:15 | a | main.rs:501:13:501:13 | a |
|
||||
| main.rs:511:15:511:15 | a | main.rs:510:13:510:13 | a |
|
||||
| main.rs:512:5:512:5 | a | main.rs:510:13:510:13 | a |
|
||||
| main.rs:513:15:513:15 | a | main.rs:510:13:510:13 | a |
|
||||
| main.rs:514:5:514:5 | a | main.rs:510:13:510:13 | a |
|
||||
| main.rs:515:15:515:15 | a | main.rs:510:13:510:13 | a |
|
||||
| main.rs:520:20:520:20 | x | main.rs:519:9:519:9 | x |
|
||||
| main.rs:521:15:521:15 | x | main.rs:519:9:519:9 | x |
|
||||
| main.rs:524:20:524:20 | z | main.rs:523:9:523:9 | z |
|
||||
| main.rs:533:6:533:9 | self | main.rs:532:15:532:18 | self |
|
||||
| main.rs:539:3:539:3 | a | main.rs:538:11:538:11 | a |
|
||||
| main.rs:541:13:541:13 | a | main.rs:538:11:538:11 | a |
|
||||
| main.rs:564:9:564:25 | var_in_macro | main.rs:564:9:564:25 | var_in_macro |
|
||||
| main.rs:565:15:565:28 | var_from_macro | main.rs:563:9:563:22 | var_from_macro |
|
||||
| main.rs:570:30:570:41 | var_in_macro | main.rs:570:15:570:42 | var_in_macro |
|
||||
| main.rs:571:15:571:26 | var_in_macro | main.rs:566:9:566:20 | var_in_macro |
|
||||
| main.rs:335:9:335:9 | x | main.rs:334:10:334:10 | x |
|
||||
| main.rs:336:15:336:15 | f | main.rs:333:9:333:9 | f |
|
||||
| main.rs:339:9:339:9 | x | main.rs:338:10:338:10 | x |
|
||||
| main.rs:342:15:342:15 | f | main.rs:333:9:333:9 | f |
|
||||
| main.rs:347:17:347:17 | x | main.rs:346:14:346:14 | x |
|
||||
| main.rs:356:13:356:13 | x | main.rs:355:14:355:14 | x |
|
||||
| main.rs:357:19:357:19 | f | main.rs:354:13:354:13 | f |
|
||||
| main.rs:365:12:365:12 | v | main.rs:362:9:362:9 | v |
|
||||
| main.rs:366:19:366:22 | text | main.rs:364:9:364:12 | text |
|
||||
| main.rs:372:5:372:5 | a | main.rs:371:13:371:13 | a |
|
||||
| main.rs:373:15:373:15 | a | main.rs:371:13:371:13 | a |
|
||||
| main.rs:374:11:374:11 | a | main.rs:371:13:371:13 | a |
|
||||
| main.rs:375:15:375:15 | a | main.rs:371:13:371:13 | a |
|
||||
| main.rs:381:14:381:14 | i | main.rs:379:13:379:13 | i |
|
||||
| main.rs:382:6:382:10 | ref_i | main.rs:380:9:380:13 | ref_i |
|
||||
| main.rs:383:15:383:15 | i | main.rs:379:13:379:13 | i |
|
||||
| main.rs:387:6:387:6 | x | main.rs:386:17:386:17 | x |
|
||||
| main.rs:388:10:388:10 | x | main.rs:386:17:386:17 | x |
|
||||
| main.rs:389:10:389:10 | x | main.rs:386:17:386:17 | x |
|
||||
| main.rs:390:12:390:12 | x | main.rs:386:17:386:17 | x |
|
||||
| main.rs:394:6:394:6 | x | main.rs:393:22:393:22 | x |
|
||||
| main.rs:395:10:395:10 | x | main.rs:393:22:393:22 | x |
|
||||
| main.rs:396:10:396:10 | x | main.rs:393:22:393:22 | x |
|
||||
| main.rs:397:6:397:6 | y | main.rs:393:39:393:39 | y |
|
||||
| main.rs:398:9:398:9 | x | main.rs:393:22:393:22 | x |
|
||||
| main.rs:404:27:404:27 | x | main.rs:402:13:402:13 | x |
|
||||
| main.rs:405:6:405:6 | y | main.rs:403:9:403:9 | y |
|
||||
| main.rs:407:15:407:15 | x | main.rs:402:13:402:13 | x |
|
||||
| main.rs:411:19:411:19 | x | main.rs:402:13:402:13 | x |
|
||||
| main.rs:413:14:413:14 | z | main.rs:409:13:409:13 | z |
|
||||
| main.rs:414:9:414:9 | w | main.rs:410:9:410:9 | w |
|
||||
| main.rs:416:7:416:7 | w | main.rs:410:9:410:9 | w |
|
||||
| main.rs:418:15:418:15 | z | main.rs:409:13:409:13 | z |
|
||||
| main.rs:424:14:424:14 | x | main.rs:422:13:422:13 | x |
|
||||
| main.rs:425:6:425:6 | y | main.rs:423:9:423:9 | y |
|
||||
| main.rs:426:15:426:15 | x | main.rs:422:13:422:13 | x |
|
||||
| main.rs:433:19:433:19 | x | main.rs:430:9:430:9 | x |
|
||||
| main.rs:435:5:435:7 | cap | main.rs:432:9:432:11 | cap |
|
||||
| main.rs:436:15:436:15 | x | main.rs:430:9:430:9 | x |
|
||||
| main.rs:443:19:443:19 | x | main.rs:440:13:440:13 | x |
|
||||
| main.rs:445:5:445:12 | closure1 | main.rs:442:9:442:16 | closure1 |
|
||||
| main.rs:446:15:446:15 | x | main.rs:440:13:440:13 | x |
|
||||
| main.rs:451:9:451:9 | y | main.rs:448:13:448:13 | y |
|
||||
| main.rs:453:5:453:12 | closure2 | main.rs:450:13:450:20 | closure2 |
|
||||
| main.rs:454:15:454:15 | y | main.rs:448:13:448:13 | y |
|
||||
| main.rs:459:9:459:9 | z | main.rs:456:13:456:13 | z |
|
||||
| main.rs:461:5:461:12 | closure3 | main.rs:458:13:458:20 | closure3 |
|
||||
| main.rs:462:15:462:15 | z | main.rs:456:13:456:13 | z |
|
||||
| main.rs:468:9:468:9 | i | main.rs:466:13:466:13 | i |
|
||||
| main.rs:471:5:471:9 | block | main.rs:467:9:467:13 | block |
|
||||
| main.rs:472:15:472:15 | i | main.rs:466:13:466:13 | i |
|
||||
| main.rs:477:15:477:15 | x | main.rs:476:13:476:13 | x |
|
||||
| main.rs:478:15:478:15 | x | main.rs:476:13:476:13 | x |
|
||||
| main.rs:479:8:479:8 | b | main.rs:475:8:475:8 | b |
|
||||
| main.rs:480:9:480:9 | x | main.rs:476:13:476:13 | x |
|
||||
| main.rs:481:19:481:19 | x | main.rs:476:13:476:13 | x |
|
||||
| main.rs:482:19:482:19 | x | main.rs:476:13:476:13 | x |
|
||||
| main.rs:484:9:484:9 | x | main.rs:476:13:476:13 | x |
|
||||
| main.rs:485:19:485:19 | x | main.rs:476:13:476:13 | x |
|
||||
| main.rs:486:19:486:19 | x | main.rs:476:13:476:13 | x |
|
||||
| main.rs:488:15:488:15 | x | main.rs:476:13:476:13 | x |
|
||||
| main.rs:493:8:493:9 | b1 | main.rs:491:13:491:14 | b1 |
|
||||
| main.rs:494:19:494:19 | x | main.rs:492:9:492:9 | x |
|
||||
| main.rs:496:19:496:19 | x | main.rs:492:9:492:9 | x |
|
||||
| main.rs:499:8:499:9 | b2 | main.rs:491:24:491:25 | b2 |
|
||||
| main.rs:500:19:500:19 | x | main.rs:492:9:492:9 | x |
|
||||
| main.rs:502:19:502:19 | x | main.rs:492:9:492:9 | x |
|
||||
| main.rs:513:16:513:19 | self | main.rs:512:20:512:23 | self |
|
||||
| main.rs:517:9:517:12 | self | main.rs:516:11:516:14 | self |
|
||||
| main.rs:523:13:523:16 | self | main.rs:520:23:520:26 | self |
|
||||
| main.rs:523:25:523:25 | n | main.rs:521:22:521:22 | n |
|
||||
| main.rs:525:9:525:9 | f | main.rs:521:17:521:17 | f |
|
||||
| main.rs:526:9:526:9 | f | main.rs:521:17:521:17 | f |
|
||||
| main.rs:532:15:532:15 | a | main.rs:531:13:531:13 | a |
|
||||
| main.rs:533:5:533:5 | a | main.rs:531:13:531:13 | a |
|
||||
| main.rs:534:15:534:15 | a | main.rs:531:13:531:13 | a |
|
||||
| main.rs:535:5:535:5 | a | main.rs:531:13:531:13 | a |
|
||||
| main.rs:536:15:536:15 | a | main.rs:531:13:531:13 | a |
|
||||
| main.rs:541:15:541:15 | a | main.rs:540:13:540:13 | a |
|
||||
| main.rs:542:5:542:5 | a | main.rs:540:13:540:13 | a |
|
||||
| main.rs:543:15:543:15 | a | main.rs:540:13:540:13 | a |
|
||||
| main.rs:544:5:544:5 | a | main.rs:540:13:540:13 | a |
|
||||
| main.rs:545:15:545:15 | a | main.rs:540:13:540:13 | a |
|
||||
| main.rs:550:20:550:20 | x | main.rs:549:9:549:9 | x |
|
||||
| main.rs:551:15:551:15 | x | main.rs:549:9:549:9 | x |
|
||||
| main.rs:554:20:554:20 | z | main.rs:553:9:553:9 | z |
|
||||
| main.rs:563:6:563:9 | self | main.rs:562:15:562:18 | self |
|
||||
| main.rs:569:3:569:3 | a | main.rs:568:11:568:11 | a |
|
||||
| main.rs:571:13:571:13 | a | main.rs:568:11:568:11 | a |
|
||||
| main.rs:594:9:594:25 | var_in_macro | main.rs:594:9:594:25 | var_in_macro |
|
||||
| main.rs:595:15:595:28 | var_from_macro | main.rs:593:9:593:22 | var_from_macro |
|
||||
| main.rs:600:30:600:41 | var_in_macro | main.rs:600:15:600:42 | var_in_macro |
|
||||
| main.rs:601:15:601:26 | var_in_macro | main.rs:596:9:596:20 | var_in_macro |
|
||||
variableWriteAccess
|
||||
| main.rs:23:5:23:6 | x2 | main.rs:21:13:21:14 | x2 |
|
||||
| main.rs:30:5:30:5 | x | main.rs:28:13:28:13 | x |
|
||||
| main.rs:288:9:288:10 | c2 | main.rs:281:13:281:14 | c2 |
|
||||
| main.rs:289:9:289:10 | b4 | main.rs:280:13:280:14 | b4 |
|
||||
| main.rs:290:9:290:11 | a10 | main.rs:279:13:279:15 | a10 |
|
||||
| main.rs:421:9:421:9 | y | main.rs:418:13:418:13 | y |
|
||||
| main.rs:438:9:438:9 | i | main.rs:436:13:436:13 | i |
|
||||
| main.rs:450:9:450:9 | x | main.rs:446:13:446:13 | x |
|
||||
| main.rs:454:9:454:9 | x | main.rs:446:13:446:13 | x |
|
||||
| main.rs:505:5:505:5 | a | main.rs:501:13:501:13 | a |
|
||||
| main.rs:514:5:514:5 | a | main.rs:510:13:510:13 | a |
|
||||
| main.rs:451:9:451:9 | y | main.rs:448:13:448:13 | y |
|
||||
| main.rs:468:9:468:9 | i | main.rs:466:13:466:13 | i |
|
||||
| main.rs:480:9:480:9 | x | main.rs:476:13:476:13 | x |
|
||||
| main.rs:484:9:484:9 | x | main.rs:476:13:476:13 | x |
|
||||
| main.rs:535:5:535:5 | a | main.rs:531:13:531:13 | a |
|
||||
| main.rs:544:5:544:5 | a | main.rs:540:13:540:13 | a |
|
||||
variableReadAccess
|
||||
| main.rs:4:20:4:20 | s | main.rs:3:14:3:14 | s |
|
||||
| main.rs:8:20:8:20 | i | main.rs:7:14:7:14 | i |
|
||||
@@ -374,77 +387,84 @@ variableReadAccess
|
||||
| main.rs:325:9:325:9 | x | main.rs:324:10:324:10 | x |
|
||||
| main.rs:327:9:327:26 | immutable_variable | main.rs:323:9:323:26 | immutable_variable |
|
||||
| main.rs:328:15:328:16 | n2 | main.rs:326:9:326:10 | n2 |
|
||||
| main.rs:335:12:335:12 | v | main.rs:332:9:332:9 | v |
|
||||
| main.rs:336:19:336:22 | text | main.rs:334:9:334:12 | text |
|
||||
| main.rs:343:15:343:15 | a | main.rs:341:13:341:13 | a |
|
||||
| main.rs:345:15:345:15 | a | main.rs:341:13:341:13 | a |
|
||||
| main.rs:352:6:352:10 | ref_i | main.rs:350:9:350:13 | ref_i |
|
||||
| main.rs:353:15:353:15 | i | main.rs:349:13:349:13 | i |
|
||||
| main.rs:357:6:357:6 | x | main.rs:356:17:356:17 | x |
|
||||
| main.rs:358:10:358:10 | x | main.rs:356:17:356:17 | x |
|
||||
| main.rs:359:10:359:10 | x | main.rs:356:17:356:17 | x |
|
||||
| main.rs:360:12:360:12 | x | main.rs:356:17:356:17 | x |
|
||||
| main.rs:364:6:364:6 | x | main.rs:363:22:363:22 | x |
|
||||
| main.rs:365:10:365:10 | x | main.rs:363:22:363:22 | x |
|
||||
| main.rs:366:10:366:10 | x | main.rs:363:22:363:22 | x |
|
||||
| main.rs:367:6:367:6 | y | main.rs:363:39:363:39 | y |
|
||||
| main.rs:368:9:368:9 | x | main.rs:363:22:363:22 | x |
|
||||
| main.rs:375:6:375:6 | y | main.rs:373:9:373:9 | y |
|
||||
| main.rs:377:15:377:15 | x | main.rs:372:13:372:13 | x |
|
||||
| main.rs:384:9:384:9 | w | main.rs:380:9:380:9 | w |
|
||||
| main.rs:386:7:386:7 | w | main.rs:380:9:380:9 | w |
|
||||
| main.rs:388:15:388:15 | z | main.rs:379:13:379:13 | z |
|
||||
| main.rs:395:6:395:6 | y | main.rs:393:9:393:9 | y |
|
||||
| main.rs:396:15:396:15 | x | main.rs:392:13:392:13 | x |
|
||||
| main.rs:403:19:403:19 | x | main.rs:400:9:400:9 | x |
|
||||
| main.rs:405:5:405:7 | cap | main.rs:402:9:402:11 | cap |
|
||||
| main.rs:406:15:406:15 | x | main.rs:400:9:400:9 | x |
|
||||
| main.rs:413:19:413:19 | x | main.rs:410:13:410:13 | x |
|
||||
| main.rs:415:5:415:12 | closure1 | main.rs:412:9:412:16 | closure1 |
|
||||
| main.rs:416:15:416:15 | x | main.rs:410:13:410:13 | x |
|
||||
| main.rs:423:5:423:12 | closure2 | main.rs:420:13:420:20 | closure2 |
|
||||
| main.rs:424:15:424:15 | y | main.rs:418:13:418:13 | y |
|
||||
| main.rs:429:9:429:9 | z | main.rs:426:13:426:13 | z |
|
||||
| main.rs:431:5:431:12 | closure3 | main.rs:428:13:428:20 | closure3 |
|
||||
| main.rs:432:15:432:15 | z | main.rs:426:13:426:13 | z |
|
||||
| main.rs:441:5:441:9 | block | main.rs:437:9:437:13 | block |
|
||||
| main.rs:442:15:442:15 | i | main.rs:436:13:436:13 | i |
|
||||
| main.rs:447:15:447:15 | x | main.rs:446:13:446:13 | x |
|
||||
| main.rs:448:15:448:15 | x | main.rs:446:13:446:13 | x |
|
||||
| main.rs:449:8:449:8 | b | main.rs:445:8:445:8 | b |
|
||||
| main.rs:451:19:451:19 | x | main.rs:446:13:446:13 | x |
|
||||
| main.rs:452:19:452:19 | x | main.rs:446:13:446:13 | x |
|
||||
| main.rs:455:19:455:19 | x | main.rs:446:13:446:13 | x |
|
||||
| main.rs:456:19:456:19 | x | main.rs:446:13:446:13 | x |
|
||||
| main.rs:458:15:458:15 | x | main.rs:446:13:446:13 | x |
|
||||
| main.rs:463:8:463:9 | b1 | main.rs:461:13:461:14 | b1 |
|
||||
| main.rs:464:19:464:19 | x | main.rs:462:9:462:9 | x |
|
||||
| main.rs:466:19:466:19 | x | main.rs:462:9:462:9 | x |
|
||||
| main.rs:469:8:469:9 | b2 | main.rs:461:24:461:25 | b2 |
|
||||
| main.rs:470:19:470:19 | x | main.rs:462:9:462:9 | x |
|
||||
| main.rs:472:19:472:19 | x | main.rs:462:9:462:9 | x |
|
||||
| main.rs:483:16:483:19 | self | main.rs:482:20:482:23 | self |
|
||||
| main.rs:487:9:487:12 | self | main.rs:486:11:486:14 | self |
|
||||
| main.rs:493:13:493:16 | self | main.rs:490:23:490:26 | self |
|
||||
| main.rs:493:25:493:25 | n | main.rs:491:22:491:22 | n |
|
||||
| main.rs:495:9:495:9 | f | main.rs:491:17:491:17 | f |
|
||||
| main.rs:496:9:496:9 | f | main.rs:491:17:491:17 | f |
|
||||
| main.rs:502:15:502:15 | a | main.rs:501:13:501:13 | a |
|
||||
| main.rs:503:5:503:5 | a | main.rs:501:13:501:13 | a |
|
||||
| main.rs:504:15:504:15 | a | main.rs:501:13:501:13 | a |
|
||||
| main.rs:506:15:506:15 | a | main.rs:501:13:501:13 | a |
|
||||
| main.rs:511:15:511:15 | a | main.rs:510:13:510:13 | a |
|
||||
| main.rs:512:5:512:5 | a | main.rs:510:13:510:13 | a |
|
||||
| main.rs:513:15:513:15 | a | main.rs:510:13:510:13 | a |
|
||||
| main.rs:515:15:515:15 | a | main.rs:510:13:510:13 | a |
|
||||
| main.rs:521:15:521:15 | x | main.rs:519:9:519:9 | x |
|
||||
| main.rs:533:6:533:9 | self | main.rs:532:15:532:18 | self |
|
||||
| main.rs:539:3:539:3 | a | main.rs:538:11:538:11 | a |
|
||||
| main.rs:541:13:541:13 | a | main.rs:538:11:538:11 | a |
|
||||
| main.rs:564:9:564:25 | var_in_macro | main.rs:564:9:564:25 | var_in_macro |
|
||||
| main.rs:565:15:565:28 | var_from_macro | main.rs:563:9:563:22 | var_from_macro |
|
||||
| main.rs:570:30:570:41 | var_in_macro | main.rs:570:15:570:42 | var_in_macro |
|
||||
| main.rs:571:15:571:26 | var_in_macro | main.rs:566:9:566:20 | var_in_macro |
|
||||
| main.rs:335:9:335:9 | x | main.rs:334:10:334:10 | x |
|
||||
| main.rs:336:15:336:15 | f | main.rs:333:9:333:9 | f |
|
||||
| main.rs:339:9:339:9 | x | main.rs:338:10:338:10 | x |
|
||||
| main.rs:342:15:342:15 | f | main.rs:333:9:333:9 | f |
|
||||
| main.rs:347:17:347:17 | x | main.rs:346:14:346:14 | x |
|
||||
| main.rs:356:13:356:13 | x | main.rs:355:14:355:14 | x |
|
||||
| main.rs:357:19:357:19 | f | main.rs:354:13:354:13 | f |
|
||||
| main.rs:365:12:365:12 | v | main.rs:362:9:362:9 | v |
|
||||
| main.rs:366:19:366:22 | text | main.rs:364:9:364:12 | text |
|
||||
| main.rs:373:15:373:15 | a | main.rs:371:13:371:13 | a |
|
||||
| main.rs:375:15:375:15 | a | main.rs:371:13:371:13 | a |
|
||||
| main.rs:382:6:382:10 | ref_i | main.rs:380:9:380:13 | ref_i |
|
||||
| main.rs:383:15:383:15 | i | main.rs:379:13:379:13 | i |
|
||||
| main.rs:387:6:387:6 | x | main.rs:386:17:386:17 | x |
|
||||
| main.rs:388:10:388:10 | x | main.rs:386:17:386:17 | x |
|
||||
| main.rs:389:10:389:10 | x | main.rs:386:17:386:17 | x |
|
||||
| main.rs:390:12:390:12 | x | main.rs:386:17:386:17 | x |
|
||||
| main.rs:394:6:394:6 | x | main.rs:393:22:393:22 | x |
|
||||
| main.rs:395:10:395:10 | x | main.rs:393:22:393:22 | x |
|
||||
| main.rs:396:10:396:10 | x | main.rs:393:22:393:22 | x |
|
||||
| main.rs:397:6:397:6 | y | main.rs:393:39:393:39 | y |
|
||||
| main.rs:398:9:398:9 | x | main.rs:393:22:393:22 | x |
|
||||
| main.rs:405:6:405:6 | y | main.rs:403:9:403:9 | y |
|
||||
| main.rs:407:15:407:15 | x | main.rs:402:13:402:13 | x |
|
||||
| main.rs:414:9:414:9 | w | main.rs:410:9:410:9 | w |
|
||||
| main.rs:416:7:416:7 | w | main.rs:410:9:410:9 | w |
|
||||
| main.rs:418:15:418:15 | z | main.rs:409:13:409:13 | z |
|
||||
| main.rs:425:6:425:6 | y | main.rs:423:9:423:9 | y |
|
||||
| main.rs:426:15:426:15 | x | main.rs:422:13:422:13 | x |
|
||||
| main.rs:433:19:433:19 | x | main.rs:430:9:430:9 | x |
|
||||
| main.rs:435:5:435:7 | cap | main.rs:432:9:432:11 | cap |
|
||||
| main.rs:436:15:436:15 | x | main.rs:430:9:430:9 | x |
|
||||
| main.rs:443:19:443:19 | x | main.rs:440:13:440:13 | x |
|
||||
| main.rs:445:5:445:12 | closure1 | main.rs:442:9:442:16 | closure1 |
|
||||
| main.rs:446:15:446:15 | x | main.rs:440:13:440:13 | x |
|
||||
| main.rs:453:5:453:12 | closure2 | main.rs:450:13:450:20 | closure2 |
|
||||
| main.rs:454:15:454:15 | y | main.rs:448:13:448:13 | y |
|
||||
| main.rs:459:9:459:9 | z | main.rs:456:13:456:13 | z |
|
||||
| main.rs:461:5:461:12 | closure3 | main.rs:458:13:458:20 | closure3 |
|
||||
| main.rs:462:15:462:15 | z | main.rs:456:13:456:13 | z |
|
||||
| main.rs:471:5:471:9 | block | main.rs:467:9:467:13 | block |
|
||||
| main.rs:472:15:472:15 | i | main.rs:466:13:466:13 | i |
|
||||
| main.rs:477:15:477:15 | x | main.rs:476:13:476:13 | x |
|
||||
| main.rs:478:15:478:15 | x | main.rs:476:13:476:13 | x |
|
||||
| main.rs:479:8:479:8 | b | main.rs:475:8:475:8 | b |
|
||||
| main.rs:481:19:481:19 | x | main.rs:476:13:476:13 | x |
|
||||
| main.rs:482:19:482:19 | x | main.rs:476:13:476:13 | x |
|
||||
| main.rs:485:19:485:19 | x | main.rs:476:13:476:13 | x |
|
||||
| main.rs:486:19:486:19 | x | main.rs:476:13:476:13 | x |
|
||||
| main.rs:488:15:488:15 | x | main.rs:476:13:476:13 | x |
|
||||
| main.rs:493:8:493:9 | b1 | main.rs:491:13:491:14 | b1 |
|
||||
| main.rs:494:19:494:19 | x | main.rs:492:9:492:9 | x |
|
||||
| main.rs:496:19:496:19 | x | main.rs:492:9:492:9 | x |
|
||||
| main.rs:499:8:499:9 | b2 | main.rs:491:24:491:25 | b2 |
|
||||
| main.rs:500:19:500:19 | x | main.rs:492:9:492:9 | x |
|
||||
| main.rs:502:19:502:19 | x | main.rs:492:9:492:9 | x |
|
||||
| main.rs:513:16:513:19 | self | main.rs:512:20:512:23 | self |
|
||||
| main.rs:517:9:517:12 | self | main.rs:516:11:516:14 | self |
|
||||
| main.rs:523:13:523:16 | self | main.rs:520:23:520:26 | self |
|
||||
| main.rs:523:25:523:25 | n | main.rs:521:22:521:22 | n |
|
||||
| main.rs:525:9:525:9 | f | main.rs:521:17:521:17 | f |
|
||||
| main.rs:526:9:526:9 | f | main.rs:521:17:521:17 | f |
|
||||
| main.rs:532:15:532:15 | a | main.rs:531:13:531:13 | a |
|
||||
| main.rs:533:5:533:5 | a | main.rs:531:13:531:13 | a |
|
||||
| main.rs:534:15:534:15 | a | main.rs:531:13:531:13 | a |
|
||||
| main.rs:536:15:536:15 | a | main.rs:531:13:531:13 | a |
|
||||
| main.rs:541:15:541:15 | a | main.rs:540:13:540:13 | a |
|
||||
| main.rs:542:5:542:5 | a | main.rs:540:13:540:13 | a |
|
||||
| main.rs:543:15:543:15 | a | main.rs:540:13:540:13 | a |
|
||||
| main.rs:545:15:545:15 | a | main.rs:540:13:540:13 | a |
|
||||
| main.rs:551:15:551:15 | x | main.rs:549:9:549:9 | x |
|
||||
| main.rs:563:6:563:9 | self | main.rs:562:15:562:18 | self |
|
||||
| main.rs:569:3:569:3 | a | main.rs:568:11:568:11 | a |
|
||||
| main.rs:571:13:571:13 | a | main.rs:568:11:568:11 | a |
|
||||
| main.rs:594:9:594:25 | var_in_macro | main.rs:594:9:594:25 | var_in_macro |
|
||||
| main.rs:595:15:595:28 | var_from_macro | main.rs:593:9:593:22 | var_from_macro |
|
||||
| main.rs:600:30:600:41 | var_in_macro | main.rs:600:15:600:42 | var_in_macro |
|
||||
| main.rs:601:15:601:26 | var_in_macro | main.rs:596:9:596:20 | var_in_macro |
|
||||
variableInitializer
|
||||
| main.rs:16:9:16:10 | x1 | main.rs:16:14:16:16 | "a" |
|
||||
| main.rs:21:13:21:14 | x2 | main.rs:21:18:21:18 | 4 |
|
||||
@@ -470,49 +490,54 @@ variableInitializer
|
||||
| main.rs:318:9:318:10 | n1 | main.rs:319:9:319:26 | example_closure(...) |
|
||||
| main.rs:323:9:323:26 | immutable_variable | main.rs:324:9:325:9 | \|...\| x |
|
||||
| main.rs:326:9:326:10 | n2 | main.rs:327:9:327:29 | immutable_variable(...) |
|
||||
| main.rs:332:9:332:9 | v | main.rs:332:13:332:41 | &... |
|
||||
| main.rs:341:13:341:13 | a | main.rs:341:17:341:17 | 0 |
|
||||
| main.rs:349:13:349:13 | i | main.rs:349:17:349:17 | 1 |
|
||||
| main.rs:350:9:350:13 | ref_i | main.rs:351:9:351:14 | &mut i |
|
||||
| main.rs:372:13:372:13 | x | main.rs:372:17:372:17 | 2 |
|
||||
| main.rs:373:9:373:9 | y | main.rs:374:9:374:28 | mutate_param(...) |
|
||||
| main.rs:379:13:379:13 | z | main.rs:379:17:379:17 | 4 |
|
||||
| main.rs:380:9:380:9 | w | main.rs:381:9:381:19 | &mut ... |
|
||||
| main.rs:392:13:392:13 | x | main.rs:392:17:392:17 | 1 |
|
||||
| main.rs:393:9:393:9 | y | main.rs:394:9:394:14 | &mut x |
|
||||
| main.rs:400:9:400:9 | x | main.rs:400:13:400:15 | 100 |
|
||||
| main.rs:402:9:402:11 | cap | main.rs:402:15:404:5 | \|...\| ... |
|
||||
| main.rs:410:13:410:13 | x | main.rs:410:17:410:17 | 1 |
|
||||
| main.rs:412:9:412:16 | closure1 | main.rs:412:20:414:5 | \|...\| ... |
|
||||
| main.rs:418:13:418:13 | y | main.rs:418:17:418:17 | 2 |
|
||||
| main.rs:420:13:420:20 | closure2 | main.rs:420:24:422:5 | \|...\| ... |
|
||||
| main.rs:426:13:426:13 | z | main.rs:426:17:426:17 | 2 |
|
||||
| main.rs:428:13:428:20 | closure3 | main.rs:428:24:430:5 | \|...\| ... |
|
||||
| main.rs:436:13:436:13 | i | main.rs:436:22:436:22 | 0 |
|
||||
| main.rs:437:9:437:13 | block | main.rs:437:17:439:5 | { ... } |
|
||||
| main.rs:446:13:446:13 | x | main.rs:446:17:446:17 | 1 |
|
||||
| main.rs:462:9:462:9 | x | main.rs:462:13:462:13 | 1 |
|
||||
| main.rs:491:17:491:17 | f | main.rs:491:21:494:9 | \|...\| ... |
|
||||
| main.rs:501:13:501:13 | a | main.rs:501:17:501:35 | MyStruct {...} |
|
||||
| main.rs:510:13:510:13 | a | main.rs:510:17:510:25 | [...] |
|
||||
| main.rs:519:9:519:9 | x | main.rs:519:13:519:14 | 16 |
|
||||
| main.rs:523:9:523:9 | z | main.rs:523:13:523:14 | 17 |
|
||||
| main.rs:538:11:538:11 | a | main.rs:538:15:538:33 | MyStruct {...} |
|
||||
| main.rs:563:9:563:22 | var_from_macro | main.rs:564:9:564:25 | MacroExpr |
|
||||
| main.rs:564:9:564:25 | var_in_macro | main.rs:564:23:564:24 | 37 |
|
||||
| main.rs:566:9:566:20 | var_in_macro | main.rs:566:24:566:25 | 33 |
|
||||
| main.rs:570:15:570:42 | var_in_macro | main.rs:570:15:570:42 | 0 |
|
||||
| main.rs:333:9:333:9 | f | main.rs:334:9:335:9 | \|...\| x |
|
||||
| main.rs:354:13:354:13 | f | main.rs:355:13:356:13 | \|...\| x |
|
||||
| main.rs:362:9:362:9 | v | main.rs:362:13:362:41 | &... |
|
||||
| main.rs:371:13:371:13 | a | main.rs:371:17:371:17 | 0 |
|
||||
| main.rs:379:13:379:13 | i | main.rs:379:17:379:17 | 1 |
|
||||
| main.rs:380:9:380:13 | ref_i | main.rs:381:9:381:14 | &mut i |
|
||||
| main.rs:402:13:402:13 | x | main.rs:402:17:402:17 | 2 |
|
||||
| main.rs:403:9:403:9 | y | main.rs:404:9:404:28 | mutate_param(...) |
|
||||
| main.rs:409:13:409:13 | z | main.rs:409:17:409:17 | 4 |
|
||||
| main.rs:410:9:410:9 | w | main.rs:411:9:411:19 | &mut ... |
|
||||
| main.rs:422:13:422:13 | x | main.rs:422:17:422:17 | 1 |
|
||||
| main.rs:423:9:423:9 | y | main.rs:424:9:424:14 | &mut x |
|
||||
| main.rs:430:9:430:9 | x | main.rs:430:13:430:15 | 100 |
|
||||
| main.rs:432:9:432:11 | cap | main.rs:432:15:434:5 | \|...\| ... |
|
||||
| main.rs:440:13:440:13 | x | main.rs:440:17:440:17 | 1 |
|
||||
| main.rs:442:9:442:16 | closure1 | main.rs:442:20:444:5 | \|...\| ... |
|
||||
| main.rs:448:13:448:13 | y | main.rs:448:17:448:17 | 2 |
|
||||
| main.rs:450:13:450:20 | closure2 | main.rs:450:24:452:5 | \|...\| ... |
|
||||
| main.rs:456:13:456:13 | z | main.rs:456:17:456:17 | 2 |
|
||||
| main.rs:458:13:458:20 | closure3 | main.rs:458:24:460:5 | \|...\| ... |
|
||||
| main.rs:466:13:466:13 | i | main.rs:466:22:466:22 | 0 |
|
||||
| main.rs:467:9:467:13 | block | main.rs:467:17:469:5 | { ... } |
|
||||
| main.rs:476:13:476:13 | x | main.rs:476:17:476:17 | 1 |
|
||||
| main.rs:492:9:492:9 | x | main.rs:492:13:492:13 | 1 |
|
||||
| main.rs:521:17:521:17 | f | main.rs:521:21:524:9 | \|...\| ... |
|
||||
| main.rs:531:13:531:13 | a | main.rs:531:17:531:35 | MyStruct {...} |
|
||||
| main.rs:540:13:540:13 | a | main.rs:540:17:540:25 | [...] |
|
||||
| main.rs:549:9:549:9 | x | main.rs:549:13:549:14 | 16 |
|
||||
| main.rs:553:9:553:9 | z | main.rs:553:13:553:14 | 17 |
|
||||
| main.rs:568:11:568:11 | a | main.rs:568:15:568:33 | MyStruct {...} |
|
||||
| main.rs:593:9:593:22 | var_from_macro | main.rs:594:9:594:25 | MacroExpr |
|
||||
| main.rs:594:9:594:25 | var_in_macro | main.rs:594:23:594:24 | 37 |
|
||||
| main.rs:596:9:596:20 | var_in_macro | main.rs:596:24:596:25 | 33 |
|
||||
| main.rs:600:15:600:42 | var_in_macro | main.rs:600:15:600:42 | 0 |
|
||||
capturedVariable
|
||||
| main.rs:400:9:400:9 | x |
|
||||
| main.rs:410:13:410:13 | x |
|
||||
| main.rs:418:13:418:13 | y |
|
||||
| main.rs:426:13:426:13 | z |
|
||||
| main.rs:436:13:436:13 | i |
|
||||
| main.rs:490:23:490:26 | self |
|
||||
| main.rs:430:9:430:9 | x |
|
||||
| main.rs:440:13:440:13 | x |
|
||||
| main.rs:448:13:448:13 | y |
|
||||
| main.rs:456:13:456:13 | z |
|
||||
| main.rs:466:13:466:13 | i |
|
||||
| main.rs:520:23:520:26 | self |
|
||||
capturedAccess
|
||||
| main.rs:403:19:403:19 | x |
|
||||
| main.rs:413:19:413:19 | x |
|
||||
| main.rs:421:9:421:9 | y |
|
||||
| main.rs:429:9:429:9 | z |
|
||||
| main.rs:438:9:438:9 | i |
|
||||
| main.rs:493:13:493:16 | self |
|
||||
| main.rs:433:19:433:19 | x |
|
||||
| main.rs:443:19:443:19 | x |
|
||||
| main.rs:451:9:451:9 | y |
|
||||
| main.rs:459:9:459:9 | z |
|
||||
| main.rs:468:9:468:9 | i |
|
||||
| main.rs:523:13:523:16 | self |
|
||||
nestedFunctionAccess
|
||||
| main.rs:345:19:345:19 | f | main.rs:346:9:348:9 | fn f |
|
||||
| main.rs:351:23:351:23 | f | main.rs:346:9:348:9 | fn f |
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import rust
|
||||
import utils.test.InlineExpectationsTest
|
||||
import codeql.rust.elements.internal.VariableImpl::Impl as VariableImpl
|
||||
|
||||
query predicate variable(Variable v) { any() }
|
||||
|
||||
@@ -15,6 +16,10 @@ query predicate capturedVariable(Variable v) { v.isCaptured() }
|
||||
|
||||
query predicate capturedAccess(VariableAccess va) { va.isCapture() }
|
||||
|
||||
query predicate nestedFunctionAccess(VariableImpl::NestedFunctionAccess nfa, Function f) {
|
||||
f = nfa.getFunction()
|
||||
}
|
||||
|
||||
module VariableAccessTest implements TestSig {
|
||||
string getARelevantTag() { result = ["", "write_", "read_"] + "access" }
|
||||
|
||||
@@ -32,14 +37,9 @@ module VariableAccessTest implements TestSig {
|
||||
|
||||
private predicate decl(Variable v, string value) {
|
||||
exists(string filepath, int line, boolean inMacro | declAt(v, filepath, line, inMacro) |
|
||||
commmentAt(value, filepath, line) and
|
||||
inMacro = false
|
||||
commmentAt(value, filepath, line) and inMacro = false
|
||||
or
|
||||
(
|
||||
not commmentAt(_, filepath, line)
|
||||
or
|
||||
inMacro = true
|
||||
) and
|
||||
not (commmentAt(_, filepath, line) and inMacro = false) and
|
||||
value = v.getName()
|
||||
)
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
| Multiple children | 0 |
|
||||
| Multiple locations | 0 |
|
||||
| Multiple parents | 0 |
|
||||
| Multiple path resolutions | 0 |
|
||||
| Multiple positions | 0 |
|
||||
| Multiple primary QL classes | 0 |
|
||||
| Multiple toStrings | 0 |
|
||||
|
||||
@@ -14,11 +14,11 @@
|
||||
| Macro calls - resolved | 8 |
|
||||
| Macro calls - total | 9 |
|
||||
| Macro calls - unresolved | 1 |
|
||||
| Taint edges - number of edges | 2 |
|
||||
| Taint edges - number of edges | 3 |
|
||||
| Taint reach - nodes tainted | 0 |
|
||||
| Taint reach - per million nodes | 0 |
|
||||
| Taint sinks - cryptographic operations | 0 |
|
||||
| Taint sinks - query sinks | 0 |
|
||||
| Taint sinks - query sinks | 3 |
|
||||
| Taint sources - active | 0 |
|
||||
| Taint sources - disabled | 0 |
|
||||
| Taint sources - sensitive data | 0 |
|
||||
|
||||
@@ -1,4 +1,45 @@
|
||||
#select
|
||||
| sqlx.rs:67:30:67:52 | unsafe_query_4.as_str(...) | sqlx.rs:48:25:48:46 | ...::get | sqlx.rs:67:30:67:52 | unsafe_query_4.as_str(...) | This query depends on a $@. | sqlx.rs:48:25:48:46 | ...::get | user-provided value |
|
||||
| sqlx.rs:78:29:78:51 | unsafe_query_4.as_str(...) | sqlx.rs:48:25:48:46 | ...::get | sqlx.rs:78:29:78:51 | unsafe_query_4.as_str(...) | This query depends on a $@. | sqlx.rs:48:25:48:46 | ...::get | user-provided value |
|
||||
edges
|
||||
| sqlx.rs:48:9:48:21 | remote_string | sqlx.rs:56:34:56:89 | MacroExpr | provenance | |
|
||||
| sqlx.rs:48:25:48:46 | ...::get | sqlx.rs:48:25:48:69 | ...::get(...) [Ok] | provenance | Src:MaD:1 |
|
||||
| sqlx.rs:48:25:48:69 | ...::get(...) [Ok] | sqlx.rs:48:25:48:78 | ... .unwrap(...) | provenance | MaD:4 |
|
||||
| sqlx.rs:48:25:48:78 | ... .unwrap(...) | sqlx.rs:48:25:48:85 | ... .text(...) [Ok] | provenance | MaD:7 |
|
||||
| sqlx.rs:48:25:48:85 | ... .text(...) [Ok] | sqlx.rs:48:25:48:118 | ... .unwrap_or(...) | provenance | MaD:5 |
|
||||
| sqlx.rs:48:25:48:118 | ... .unwrap_or(...) | sqlx.rs:48:9:48:21 | remote_string | provenance | |
|
||||
| sqlx.rs:56:9:56:22 | unsafe_query_4 | sqlx.rs:67:30:67:43 | unsafe_query_4 | provenance | |
|
||||
| sqlx.rs:56:9:56:22 | unsafe_query_4 | sqlx.rs:78:29:78:42 | unsafe_query_4 | provenance | |
|
||||
| sqlx.rs:56:26:56:90 | res | sqlx.rs:56:34:56:89 | { ... } | provenance | |
|
||||
| sqlx.rs:56:34:56:89 | ...::format(...) | sqlx.rs:56:26:56:90 | res | provenance | |
|
||||
| sqlx.rs:56:34:56:89 | ...::must_use(...) | sqlx.rs:56:9:56:22 | unsafe_query_4 | provenance | |
|
||||
| sqlx.rs:56:34:56:89 | MacroExpr | sqlx.rs:56:34:56:89 | ...::format(...) | provenance | MaD:3 |
|
||||
| sqlx.rs:56:34:56:89 | { ... } | sqlx.rs:56:34:56:89 | ...::must_use(...) | provenance | MaD:6 |
|
||||
| sqlx.rs:67:30:67:43 | unsafe_query_4 | sqlx.rs:67:30:67:52 | unsafe_query_4.as_str(...) | provenance | MaD:2 |
|
||||
| sqlx.rs:78:29:78:42 | unsafe_query_4 | sqlx.rs:78:29:78:51 | unsafe_query_4.as_str(...) | provenance | MaD:2 |
|
||||
models
|
||||
| 1 | Source: repo:https://github.com/seanmonstar/reqwest:reqwest; crate::blocking::get; remote; ReturnValue.Variant[crate::result::Result::Ok(0)] |
|
||||
| 2 | Summary: lang:alloc; <crate::string::String>::as_str; Argument[self]; ReturnValue; taint |
|
||||
| 3 | Summary: lang:alloc; crate::fmt::format; Argument[0]; ReturnValue; taint |
|
||||
| 4 | Summary: lang:core; <crate::result::Result>::unwrap; Argument[self].Variant[crate::result::Result::Ok(0)]; ReturnValue; value |
|
||||
| 5 | Summary: lang:core; <crate::result::Result>::unwrap_or; Argument[self].Variant[crate::result::Result::Ok(0)]; ReturnValue; value |
|
||||
| 6 | Summary: lang:core; crate::hint::must_use; Argument[0]; ReturnValue; value |
|
||||
| 7 | Summary: repo:https://github.com/seanmonstar/reqwest:reqwest; <crate::blocking::response::Response>::text; Argument[self]; ReturnValue.Variant[crate::result::Result::Ok(0)]; taint |
|
||||
nodes
|
||||
| sqlx.rs:48:9:48:21 | remote_string | semmle.label | remote_string |
|
||||
| sqlx.rs:48:25:48:46 | ...::get | semmle.label | ...::get |
|
||||
| sqlx.rs:48:25:48:69 | ...::get(...) [Ok] | semmle.label | ...::get(...) [Ok] |
|
||||
| sqlx.rs:48:25:48:78 | ... .unwrap(...) | semmle.label | ... .unwrap(...) |
|
||||
| sqlx.rs:48:25:48:85 | ... .text(...) [Ok] | semmle.label | ... .text(...) [Ok] |
|
||||
| sqlx.rs:48:25:48:118 | ... .unwrap_or(...) | semmle.label | ... .unwrap_or(...) |
|
||||
| sqlx.rs:56:9:56:22 | unsafe_query_4 | semmle.label | unsafe_query_4 |
|
||||
| sqlx.rs:56:26:56:90 | res | semmle.label | res |
|
||||
| sqlx.rs:56:34:56:89 | ...::format(...) | semmle.label | ...::format(...) |
|
||||
| sqlx.rs:56:34:56:89 | ...::must_use(...) | semmle.label | ...::must_use(...) |
|
||||
| sqlx.rs:56:34:56:89 | MacroExpr | semmle.label | MacroExpr |
|
||||
| sqlx.rs:56:34:56:89 | { ... } | semmle.label | { ... } |
|
||||
| sqlx.rs:67:30:67:43 | unsafe_query_4 | semmle.label | unsafe_query_4 |
|
||||
| sqlx.rs:67:30:67:52 | unsafe_query_4.as_str(...) | semmle.label | unsafe_query_4.as_str(...) |
|
||||
| sqlx.rs:78:29:78:42 | unsafe_query_4 | semmle.label | unsafe_query_4 |
|
||||
| sqlx.rs:78:29:78:51 | unsafe_query_4.as_str(...) | semmle.label | unsafe_query_4.as_str(...) |
|
||||
subpaths
|
||||
|
||||
@@ -64,7 +64,7 @@ async fn test_sqlx_mysql(url: &str, enable_remote: bool) -> Result<(), sqlx::Err
|
||||
if enable_remote {
|
||||
let _ = conn.execute(unsafe_query_2.as_str()).await?; // $ sql-sink MISSING: Alert[rust/sql-injection]=remote1
|
||||
let _ = conn.execute(unsafe_query_3.as_str()).await?; // $ sql-sink MISSING: Alert[rust/sql-injection]=remote1
|
||||
let _ = conn.execute(unsafe_query_4.as_str()).await?; // $ sql-sink MISSING: Alert[rust/sql-injection]=remote1
|
||||
let _ = conn.execute(unsafe_query_4.as_str()).await?; // $ sql-sink Alert[rust/sql-injection]=remote1
|
||||
}
|
||||
|
||||
// prepared queries
|
||||
@@ -75,7 +75,7 @@ async fn test_sqlx_mysql(url: &str, enable_remote: bool) -> Result<(), sqlx::Err
|
||||
if enable_remote {
|
||||
let _ = sqlx::query(unsafe_query_2.as_str()).execute(&pool).await?; // $ sql-sink MISSING: Alert[rust/sql-injection]=remote1
|
||||
let _ = sqlx::query(unsafe_query_3.as_str()).execute(&pool).await?; // $ sql-sink MISSING: Alert[rust/sql-injection]=remote1
|
||||
let _ = sqlx::query(unsafe_query_4.as_str()).execute(&pool).await?; // $ sql-sink MISSING: Alert[rust/sql-injection]=remote1
|
||||
let _ = sqlx::query(unsafe_query_4.as_str()).execute(&pool).await?; // $ sql-sink Alert[rust/sql-injection]=remote1
|
||||
}
|
||||
let _ = sqlx::query(prepared_query_1.as_str()).bind(const_string).execute(&pool).await?; // $ sql-sink
|
||||
let _ = sqlx::query(prepared_query_1.as_str()).bind(arg_string).execute(&pool).await?; // $ sql-sink
|
||||
@@ -93,7 +93,7 @@ async fn test_sqlx_sqlite(url: &str, enable_remote: bool) -> Result<(), sqlx::Er
|
||||
|
||||
// construct queries
|
||||
let const_string = String::from("Alice");
|
||||
let remote_string = reqwest::blocking::get("http://example.com/").unwrap().text().unwrap_or(String::from("Alice")); // $ Source=remote2
|
||||
let remote_string = reqwest::blocking::get("http://example.com/").unwrap().text().unwrap_or(String::from("Alice")); // $ MISSING: Source=remote2
|
||||
let safe_query_1 = String::from("SELECT * FROM people WHERE firstname='") + &const_string + "'";
|
||||
let unsafe_query_1 = String::from("SELECT * FROM people WHERE firstname='") + &remote_string + "'";
|
||||
let prepared_query_1 = String::from("SELECT * FROM people WHERE firstname=?"); // (prepared arguments are safe)
|
||||
@@ -166,7 +166,7 @@ async fn test_sqlx_postgres(url: &str, enable_remote: bool) -> Result<(), sqlx::
|
||||
|
||||
// construct queries
|
||||
let const_string = String::from("Alice");
|
||||
let remote_string = reqwest::blocking::get("http://example.com/").unwrap().text().unwrap_or(String::from("Alice")); // $ Source=remote3
|
||||
let remote_string = reqwest::blocking::get("http://example.com/").unwrap().text().unwrap_or(String::from("Alice")); // $ MISSING: Source=remote3
|
||||
let safe_query_1 = String::from("SELECT * FROM people WHERE firstname='") + &const_string + "'";
|
||||
let unsafe_query_1 = String::from("SELECT * FROM people WHERE firstname='") + &remote_string + "'";
|
||||
let prepared_query_1 = String::from("SELECT * FROM people WHERE firstname=$1"); // (prepared arguments are safe)
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
extractionWarning
|
||||
| test_logging.rs:90:12:90:30 | expected R_PAREN |
|
||||
| test_logging.rs:90:12:90:30 | macro expansion failed: the macro '$crate::__private_api::format_args' expands to ERROR but a Expr was expected |
|
||||
@@ -0,0 +1,451 @@
|
||||
#select
|
||||
| test_logging.rs:42:5:42:36 | ...::log | test_logging.rs:42:28:42:35 | password | test_logging.rs:42:5:42:36 | ...::log | This operation writes $@ to a log file. | test_logging.rs:42:28:42:35 | password | password |
|
||||
| test_logging.rs:43:5:43:36 | ...::log | test_logging.rs:43:28:43:35 | password | test_logging.rs:43:5:43:36 | ...::log | This operation writes $@ to a log file. | test_logging.rs:43:28:43:35 | password | password |
|
||||
| test_logging.rs:44:5:44:35 | ...::log | test_logging.rs:44:27:44:34 | password | test_logging.rs:44:5:44:35 | ...::log | This operation writes $@ to a log file. | test_logging.rs:44:27:44:34 | password | password |
|
||||
| test_logging.rs:45:5:45:36 | ...::log | test_logging.rs:45:28:45:35 | password | test_logging.rs:45:5:45:36 | ...::log | This operation writes $@ to a log file. | test_logging.rs:45:28:45:35 | password | password |
|
||||
| test_logging.rs:46:5:46:35 | ...::log | test_logging.rs:46:27:46:34 | password | test_logging.rs:46:5:46:35 | ...::log | This operation writes $@ to a log file. | test_logging.rs:46:27:46:34 | password | password |
|
||||
| test_logging.rs:47:5:47:48 | ...::log | test_logging.rs:47:40:47:47 | password | test_logging.rs:47:5:47:48 | ...::log | This operation writes $@ to a log file. | test_logging.rs:47:40:47:47 | password | password |
|
||||
| test_logging.rs:52:5:52:36 | ...::log | test_logging.rs:52:28:52:35 | password | test_logging.rs:52:5:52:36 | ...::log | This operation writes $@ to a log file. | test_logging.rs:52:28:52:35 | password | password |
|
||||
| test_logging.rs:54:5:54:49 | ...::log | test_logging.rs:54:41:54:48 | password | test_logging.rs:54:5:54:49 | ...::log | This operation writes $@ to a log file. | test_logging.rs:54:41:54:48 | password | password |
|
||||
| test_logging.rs:56:5:56:47 | ...::log | test_logging.rs:56:39:56:46 | password | test_logging.rs:56:5:56:47 | ...::log | This operation writes $@ to a log file. | test_logging.rs:56:39:56:46 | password | password |
|
||||
| test_logging.rs:57:5:57:34 | ...::log | test_logging.rs:57:24:57:31 | password | test_logging.rs:57:5:57:34 | ...::log | This operation writes $@ to a log file. | test_logging.rs:57:24:57:31 | password | password |
|
||||
| test_logging.rs:58:5:58:36 | ...::log | test_logging.rs:58:24:58:31 | password | test_logging.rs:58:5:58:36 | ...::log | This operation writes $@ to a log file. | test_logging.rs:58:24:58:31 | password | password |
|
||||
| test_logging.rs:60:5:60:54 | ...::log | test_logging.rs:60:46:60:53 | password | test_logging.rs:60:5:60:54 | ...::log | This operation writes $@ to a log file. | test_logging.rs:60:46:60:53 | password | password |
|
||||
| test_logging.rs:61:5:61:55 | ...::log | test_logging.rs:61:21:61:28 | password | test_logging.rs:61:5:61:55 | ...::log | This operation writes $@ to a log file. | test_logging.rs:61:21:61:28 | password | password |
|
||||
| test_logging.rs:65:5:65:48 | ...::log | test_logging.rs:65:40:65:47 | password | test_logging.rs:65:5:65:48 | ...::log | This operation writes $@ to a log file. | test_logging.rs:65:40:65:47 | password | password |
|
||||
| test_logging.rs:67:5:67:66 | ...::log | test_logging.rs:67:58:67:65 | password | test_logging.rs:67:5:67:66 | ...::log | This operation writes $@ to a log file. | test_logging.rs:67:58:67:65 | password | password |
|
||||
| test_logging.rs:68:5:68:67 | ...::log | test_logging.rs:68:19:68:26 | password | test_logging.rs:68:5:68:67 | ...::log | This operation writes $@ to a log file. | test_logging.rs:68:19:68:26 | password | password |
|
||||
| test_logging.rs:72:5:72:47 | ...::log::<...> | test_logging.rs:72:39:72:46 | password | test_logging.rs:72:5:72:47 | ...::log::<...> | This operation writes $@ to a log file. | test_logging.rs:72:39:72:46 | password | password |
|
||||
| test_logging.rs:74:5:74:65 | ...::log::<...> | test_logging.rs:74:57:74:64 | password | test_logging.rs:74:5:74:65 | ...::log::<...> | This operation writes $@ to a log file. | test_logging.rs:74:57:74:64 | password | password |
|
||||
| test_logging.rs:75:5:75:51 | ...::log::<...> | test_logging.rs:75:21:75:28 | password | test_logging.rs:75:5:75:51 | ...::log::<...> | This operation writes $@ to a log file. | test_logging.rs:75:21:75:28 | password | password |
|
||||
| test_logging.rs:76:5:76:47 | ...::log::<...> | test_logging.rs:76:39:76:46 | password | test_logging.rs:76:5:76:47 | ...::log::<...> | This operation writes $@ to a log file. | test_logging.rs:76:39:76:46 | password | password |
|
||||
| test_logging.rs:82:5:82:44 | ...::log::<...> | test_logging.rs:82:36:82:43 | password | test_logging.rs:82:5:82:44 | ...::log::<...> | This operation writes $@ to a log file. | test_logging.rs:82:36:82:43 | password | password |
|
||||
| test_logging.rs:84:5:84:62 | ...::log::<...> | test_logging.rs:84:54:84:61 | password | test_logging.rs:84:5:84:62 | ...::log::<...> | This operation writes $@ to a log file. | test_logging.rs:84:54:84:61 | password | password |
|
||||
| test_logging.rs:85:5:85:48 | ...::log::<...> | test_logging.rs:85:21:85:28 | password | test_logging.rs:85:5:85:48 | ...::log::<...> | This operation writes $@ to a log file. | test_logging.rs:85:21:85:28 | password | password |
|
||||
| test_logging.rs:86:5:86:44 | ...::log::<...> | test_logging.rs:86:36:86:43 | password | test_logging.rs:86:5:86:44 | ...::log::<...> | This operation writes $@ to a log file. | test_logging.rs:86:36:86:43 | password | password |
|
||||
| test_logging.rs:94:5:94:29 | ...::log | test_logging.rs:93:15:93:22 | password | test_logging.rs:94:5:94:29 | ...::log | This operation writes $@ to a log file. | test_logging.rs:93:15:93:22 | password | password |
|
||||
| test_logging.rs:97:5:97:19 | ...::log | test_logging.rs:96:42:96:49 | password | test_logging.rs:97:5:97:19 | ...::log | This operation writes $@ to a log file. | test_logging.rs:96:42:96:49 | password | password |
|
||||
| test_logging.rs:100:5:100:19 | ...::log | test_logging.rs:99:38:99:45 | password | test_logging.rs:100:5:100:19 | ...::log | This operation writes $@ to a log file. | test_logging.rs:99:38:99:45 | password | password |
|
||||
| test_logging.rs:118:5:118:42 | ...::log | test_logging.rs:118:28:118:41 | get_password(...) | test_logging.rs:118:5:118:42 | ...::log | This operation writes $@ to a log file. | test_logging.rs:118:28:118:41 | get_password(...) | get_password(...) |
|
||||
| test_logging.rs:131:5:131:32 | ...::log | test_logging.rs:129:25:129:32 | password | test_logging.rs:131:5:131:32 | ...::log | This operation writes $@ to a log file. | test_logging.rs:129:25:129:32 | password | password |
|
||||
| test_logging.rs:152:5:152:38 | ...::_print | test_logging.rs:152:30:152:37 | password | test_logging.rs:152:5:152:38 | ...::_print | This operation writes $@ to a log file. | test_logging.rs:152:30:152:37 | password | password |
|
||||
| test_logging.rs:153:5:153:38 | ...::_print | test_logging.rs:153:30:153:37 | password | test_logging.rs:153:5:153:38 | ...::_print | This operation writes $@ to a log file. | test_logging.rs:153:30:153:37 | password | password |
|
||||
| test_logging.rs:154:5:154:39 | ...::_eprint | test_logging.rs:154:31:154:38 | password | test_logging.rs:154:5:154:39 | ...::_eprint | This operation writes $@ to a log file. | test_logging.rs:154:31:154:38 | password | password |
|
||||
| test_logging.rs:155:5:155:39 | ...::_eprint | test_logging.rs:155:31:155:38 | password | test_logging.rs:155:5:155:39 | ...::_eprint | This operation writes $@ to a log file. | test_logging.rs:155:31:155:38 | password | password |
|
||||
| test_logging.rs:158:16:158:47 | ...::panic_fmt | test_logging.rs:158:39:158:46 | password | test_logging.rs:158:16:158:47 | ...::panic_fmt | This operation writes $@ to a log file. | test_logging.rs:158:39:158:46 | password | password |
|
||||
| test_logging.rs:159:16:159:46 | ...::panic_fmt | test_logging.rs:159:38:159:45 | password | test_logging.rs:159:16:159:46 | ...::panic_fmt | This operation writes $@ to a log file. | test_logging.rs:159:38:159:45 | password | password |
|
||||
| test_logging.rs:160:16:160:55 | ...::panic_fmt | test_logging.rs:160:47:160:54 | password | test_logging.rs:160:16:160:55 | ...::panic_fmt | This operation writes $@ to a log file. | test_logging.rs:160:47:160:54 | password | password |
|
||||
| test_logging.rs:161:16:161:53 | ...::panic_fmt | test_logging.rs:161:45:161:52 | password | test_logging.rs:161:16:161:53 | ...::panic_fmt | This operation writes $@ to a log file. | test_logging.rs:161:45:161:52 | password | password |
|
||||
| test_logging.rs:162:16:162:55 | ...::panic_fmt | test_logging.rs:162:47:162:54 | password | test_logging.rs:162:16:162:55 | ...::panic_fmt | This operation writes $@ to a log file. | test_logging.rs:162:47:162:54 | password | password |
|
||||
| test_logging.rs:163:16:163:57 | ...::assert_failed | test_logging.rs:163:49:163:56 | password | test_logging.rs:163:16:163:57 | ...::assert_failed | This operation writes $@ to a log file. | test_logging.rs:163:49:163:56 | password | password |
|
||||
| test_logging.rs:164:16:164:57 | ...::assert_failed | test_logging.rs:164:49:164:56 | password | test_logging.rs:164:16:164:57 | ...::assert_failed | This operation writes $@ to a log file. | test_logging.rs:164:49:164:56 | password | password |
|
||||
| test_logging.rs:165:16:165:61 | ...::panic_fmt | test_logging.rs:165:53:165:60 | password | test_logging.rs:165:16:165:61 | ...::panic_fmt | This operation writes $@ to a log file. | test_logging.rs:165:53:165:60 | password | password |
|
||||
| test_logging.rs:166:16:166:63 | ...::assert_failed | test_logging.rs:166:55:166:62 | password | test_logging.rs:166:16:166:63 | ...::assert_failed | This operation writes $@ to a log file. | test_logging.rs:166:55:166:62 | password | password |
|
||||
| test_logging.rs:167:17:167:64 | ...::assert_failed | test_logging.rs:167:56:167:63 | password | test_logging.rs:167:17:167:64 | ...::assert_failed | This operation writes $@ to a log file. | test_logging.rs:167:56:167:63 | password | password |
|
||||
| test_logging.rs:168:27:168:32 | expect | test_logging.rs:168:58:168:65 | password | test_logging.rs:168:27:168:32 | expect | This operation writes $@ to a log file. | test_logging.rs:168:58:168:65 | password | password |
|
||||
| test_logging.rs:174:30:174:34 | write | test_logging.rs:174:62:174:69 | password | test_logging.rs:174:30:174:34 | write | This operation writes $@ to a log file. | test_logging.rs:174:62:174:69 | password | password |
|
||||
| test_logging.rs:175:30:175:38 | write_all | test_logging.rs:175:66:175:73 | password | test_logging.rs:175:30:175:38 | write_all | This operation writes $@ to a log file. | test_logging.rs:175:66:175:73 | password | password |
|
||||
| test_logging.rs:178:9:178:13 | write | test_logging.rs:178:41:178:48 | password | test_logging.rs:178:9:178:13 | write | This operation writes $@ to a log file. | test_logging.rs:178:41:178:48 | password | password |
|
||||
| test_logging.rs:181:9:181:13 | write | test_logging.rs:181:41:181:48 | password | test_logging.rs:181:9:181:13 | write | This operation writes $@ to a log file. | test_logging.rs:181:41:181:48 | password | password |
|
||||
edges
|
||||
| test_logging.rs:42:12:42:35 | MacroExpr | test_logging.rs:42:5:42:36 | ...::log | provenance | MaD:9 Sink:MaD:9 |
|
||||
| test_logging.rs:42:28:42:35 | password | test_logging.rs:42:12:42:35 | MacroExpr | provenance | |
|
||||
| test_logging.rs:43:12:43:35 | MacroExpr | test_logging.rs:43:5:43:36 | ...::log | provenance | MaD:9 Sink:MaD:9 |
|
||||
| test_logging.rs:43:28:43:35 | password | test_logging.rs:43:12:43:35 | MacroExpr | provenance | |
|
||||
| test_logging.rs:44:11:44:34 | MacroExpr | test_logging.rs:44:5:44:35 | ...::log | provenance | MaD:9 Sink:MaD:9 |
|
||||
| test_logging.rs:44:27:44:34 | password | test_logging.rs:44:11:44:34 | MacroExpr | provenance | |
|
||||
| test_logging.rs:45:12:45:35 | MacroExpr | test_logging.rs:45:5:45:36 | ...::log | provenance | MaD:9 Sink:MaD:9 |
|
||||
| test_logging.rs:45:28:45:35 | password | test_logging.rs:45:12:45:35 | MacroExpr | provenance | |
|
||||
| test_logging.rs:46:11:46:34 | MacroExpr | test_logging.rs:46:5:46:35 | ...::log | provenance | MaD:9 Sink:MaD:9 |
|
||||
| test_logging.rs:46:27:46:34 | password | test_logging.rs:46:11:46:34 | MacroExpr | provenance | |
|
||||
| test_logging.rs:47:24:47:47 | MacroExpr | test_logging.rs:47:5:47:48 | ...::log | provenance | MaD:9 Sink:MaD:9 |
|
||||
| test_logging.rs:47:40:47:47 | password | test_logging.rs:47:24:47:47 | MacroExpr | provenance | |
|
||||
| test_logging.rs:52:12:52:35 | MacroExpr | test_logging.rs:52:5:52:36 | ...::log | provenance | MaD:9 Sink:MaD:9 |
|
||||
| test_logging.rs:52:28:52:35 | password | test_logging.rs:52:12:52:35 | MacroExpr | provenance | |
|
||||
| test_logging.rs:54:12:54:48 | MacroExpr | test_logging.rs:54:5:54:49 | ...::log | provenance | MaD:9 Sink:MaD:9 |
|
||||
| test_logging.rs:54:41:54:48 | password | test_logging.rs:54:12:54:48 | MacroExpr | provenance | |
|
||||
| test_logging.rs:56:12:56:46 | MacroExpr | test_logging.rs:56:5:56:47 | ...::log | provenance | MaD:9 Sink:MaD:9 |
|
||||
| test_logging.rs:56:39:56:46 | password | test_logging.rs:56:12:56:46 | MacroExpr | provenance | |
|
||||
| test_logging.rs:57:12:57:33 | MacroExpr | test_logging.rs:57:5:57:34 | ...::log | provenance | MaD:9 Sink:MaD:9 |
|
||||
| test_logging.rs:57:24:57:31 | password | test_logging.rs:57:12:57:33 | MacroExpr | provenance | |
|
||||
| test_logging.rs:58:12:58:35 | MacroExpr | test_logging.rs:58:5:58:36 | ...::log | provenance | MaD:9 Sink:MaD:9 |
|
||||
| test_logging.rs:58:24:58:31 | password | test_logging.rs:58:12:58:35 | MacroExpr | provenance | |
|
||||
| test_logging.rs:60:30:60:53 | MacroExpr | test_logging.rs:60:5:60:54 | ...::log | provenance | MaD:9 Sink:MaD:9 |
|
||||
| test_logging.rs:60:46:60:53 | password | test_logging.rs:60:30:60:53 | MacroExpr | provenance | |
|
||||
| test_logging.rs:61:20:61:28 | &... [&ref, tuple.0, &ref] | test_logging.rs:61:5:61:55 | ...::log | provenance | MaD:10 Sink:MaD:10 Sink:MaD:10 |
|
||||
| test_logging.rs:61:20:61:28 | &... [&ref, tuple.0, &ref] | test_logging.rs:61:5:61:55 | ...::log | provenance | MaD:10 Sink:MaD:10 Sink:MaD:10 Sink:MaD:10 |
|
||||
| test_logging.rs:61:20:61:28 | &... [&ref, tuple.0] | test_logging.rs:61:5:61:55 | ...::log | provenance | MaD:10 Sink:MaD:10 Sink:MaD:10 |
|
||||
| test_logging.rs:61:20:61:28 | &password | test_logging.rs:61:20:61:28 | TupleExpr [tuple.0] | provenance | |
|
||||
| test_logging.rs:61:20:61:28 | &password [&ref] | test_logging.rs:61:20:61:28 | TupleExpr [tuple.0, &ref] | provenance | |
|
||||
| test_logging.rs:61:20:61:28 | TupleExpr [tuple.0, &ref] | test_logging.rs:61:20:61:28 | &... [&ref, tuple.0, &ref] | provenance | |
|
||||
| test_logging.rs:61:20:61:28 | TupleExpr [tuple.0] | test_logging.rs:61:20:61:28 | &... [&ref, tuple.0] | provenance | |
|
||||
| test_logging.rs:61:21:61:28 | password | test_logging.rs:61:20:61:28 | &password | provenance | Config |
|
||||
| test_logging.rs:61:21:61:28 | password | test_logging.rs:61:20:61:28 | &password [&ref] | provenance | |
|
||||
| test_logging.rs:65:24:65:47 | MacroExpr | test_logging.rs:65:5:65:48 | ...::log | provenance | MaD:9 Sink:MaD:9 |
|
||||
| test_logging.rs:65:40:65:47 | password | test_logging.rs:65:24:65:47 | MacroExpr | provenance | |
|
||||
| test_logging.rs:67:42:67:65 | MacroExpr | test_logging.rs:67:5:67:66 | ...::log | provenance | MaD:9 Sink:MaD:9 |
|
||||
| test_logging.rs:67:58:67:65 | password | test_logging.rs:67:42:67:65 | MacroExpr | provenance | |
|
||||
| test_logging.rs:68:18:68:26 | &... [&ref, tuple.0, &ref] | test_logging.rs:68:5:68:67 | ...::log | provenance | MaD:10 Sink:MaD:10 Sink:MaD:10 |
|
||||
| test_logging.rs:68:18:68:26 | &... [&ref, tuple.0, &ref] | test_logging.rs:68:5:68:67 | ...::log | provenance | MaD:10 Sink:MaD:10 Sink:MaD:10 Sink:MaD:10 |
|
||||
| test_logging.rs:68:18:68:26 | &... [&ref, tuple.0] | test_logging.rs:68:5:68:67 | ...::log | provenance | MaD:10 Sink:MaD:10 Sink:MaD:10 |
|
||||
| test_logging.rs:68:18:68:26 | &password | test_logging.rs:68:18:68:26 | TupleExpr [tuple.0] | provenance | |
|
||||
| test_logging.rs:68:18:68:26 | &password [&ref] | test_logging.rs:68:18:68:26 | TupleExpr [tuple.0, &ref] | provenance | |
|
||||
| test_logging.rs:68:18:68:26 | TupleExpr [tuple.0, &ref] | test_logging.rs:68:18:68:26 | &... [&ref, tuple.0, &ref] | provenance | |
|
||||
| test_logging.rs:68:18:68:26 | TupleExpr [tuple.0] | test_logging.rs:68:18:68:26 | &... [&ref, tuple.0] | provenance | |
|
||||
| test_logging.rs:68:19:68:26 | password | test_logging.rs:68:18:68:26 | &password | provenance | Config |
|
||||
| test_logging.rs:68:19:68:26 | password | test_logging.rs:68:18:68:26 | &password [&ref] | provenance | |
|
||||
| test_logging.rs:72:23:72:46 | MacroExpr | test_logging.rs:72:5:72:47 | ...::log::<...> | provenance | MaD:9 Sink:MaD:9 |
|
||||
| test_logging.rs:72:39:72:46 | password | test_logging.rs:72:23:72:46 | MacroExpr | provenance | |
|
||||
| test_logging.rs:74:41:74:64 | MacroExpr | test_logging.rs:74:5:74:65 | ...::log::<...> | provenance | MaD:9 Sink:MaD:9 |
|
||||
| test_logging.rs:74:57:74:64 | password | test_logging.rs:74:41:74:64 | MacroExpr | provenance | |
|
||||
| test_logging.rs:75:20:75:28 | &... [&ref, tuple.0, &ref] | test_logging.rs:75:5:75:51 | ...::log::<...> | provenance | MaD:10 Sink:MaD:10 Sink:MaD:10 |
|
||||
| test_logging.rs:75:20:75:28 | &... [&ref, tuple.0, &ref] | test_logging.rs:75:5:75:51 | ...::log::<...> | provenance | MaD:10 Sink:MaD:10 Sink:MaD:10 Sink:MaD:10 |
|
||||
| test_logging.rs:75:20:75:28 | &... [&ref, tuple.0] | test_logging.rs:75:5:75:51 | ...::log::<...> | provenance | MaD:10 Sink:MaD:10 Sink:MaD:10 |
|
||||
| test_logging.rs:75:20:75:28 | &password | test_logging.rs:75:20:75:28 | TupleExpr [tuple.0] | provenance | |
|
||||
| test_logging.rs:75:20:75:28 | &password [&ref] | test_logging.rs:75:20:75:28 | TupleExpr [tuple.0, &ref] | provenance | |
|
||||
| test_logging.rs:75:20:75:28 | TupleExpr [tuple.0, &ref] | test_logging.rs:75:20:75:28 | &... [&ref, tuple.0, &ref] | provenance | |
|
||||
| test_logging.rs:75:20:75:28 | TupleExpr [tuple.0] | test_logging.rs:75:20:75:28 | &... [&ref, tuple.0] | provenance | |
|
||||
| test_logging.rs:75:21:75:28 | password | test_logging.rs:75:20:75:28 | &password | provenance | Config |
|
||||
| test_logging.rs:75:21:75:28 | password | test_logging.rs:75:20:75:28 | &password [&ref] | provenance | |
|
||||
| test_logging.rs:76:23:76:46 | MacroExpr | test_logging.rs:76:5:76:47 | ...::log::<...> | provenance | MaD:9 Sink:MaD:9 |
|
||||
| test_logging.rs:76:39:76:46 | password | test_logging.rs:76:23:76:46 | MacroExpr | provenance | |
|
||||
| test_logging.rs:82:20:82:43 | MacroExpr | test_logging.rs:82:5:82:44 | ...::log::<...> | provenance | MaD:9 Sink:MaD:9 |
|
||||
| test_logging.rs:82:36:82:43 | password | test_logging.rs:82:20:82:43 | MacroExpr | provenance | |
|
||||
| test_logging.rs:84:38:84:61 | MacroExpr | test_logging.rs:84:5:84:62 | ...::log::<...> | provenance | MaD:9 Sink:MaD:9 |
|
||||
| test_logging.rs:84:54:84:61 | password | test_logging.rs:84:38:84:61 | MacroExpr | provenance | |
|
||||
| test_logging.rs:85:20:85:28 | &... [&ref, tuple.0, &ref] | test_logging.rs:85:5:85:48 | ...::log::<...> | provenance | MaD:10 Sink:MaD:10 Sink:MaD:10 |
|
||||
| test_logging.rs:85:20:85:28 | &... [&ref, tuple.0, &ref] | test_logging.rs:85:5:85:48 | ...::log::<...> | provenance | MaD:10 Sink:MaD:10 Sink:MaD:10 Sink:MaD:10 |
|
||||
| test_logging.rs:85:20:85:28 | &... [&ref, tuple.0] | test_logging.rs:85:5:85:48 | ...::log::<...> | provenance | MaD:10 Sink:MaD:10 Sink:MaD:10 |
|
||||
| test_logging.rs:85:20:85:28 | &password | test_logging.rs:85:20:85:28 | TupleExpr [tuple.0] | provenance | |
|
||||
| test_logging.rs:85:20:85:28 | &password [&ref] | test_logging.rs:85:20:85:28 | TupleExpr [tuple.0, &ref] | provenance | |
|
||||
| test_logging.rs:85:20:85:28 | TupleExpr [tuple.0, &ref] | test_logging.rs:85:20:85:28 | &... [&ref, tuple.0, &ref] | provenance | |
|
||||
| test_logging.rs:85:20:85:28 | TupleExpr [tuple.0] | test_logging.rs:85:20:85:28 | &... [&ref, tuple.0] | provenance | |
|
||||
| test_logging.rs:85:21:85:28 | password | test_logging.rs:85:20:85:28 | &password | provenance | Config |
|
||||
| test_logging.rs:85:21:85:28 | password | test_logging.rs:85:20:85:28 | &password [&ref] | provenance | |
|
||||
| test_logging.rs:86:20:86:43 | MacroExpr | test_logging.rs:86:5:86:44 | ...::log::<...> | provenance | MaD:9 Sink:MaD:9 |
|
||||
| test_logging.rs:86:36:86:43 | password | test_logging.rs:86:20:86:43 | MacroExpr | provenance | |
|
||||
| test_logging.rs:93:9:93:10 | m1 | test_logging.rs:94:11:94:28 | MacroExpr | provenance | |
|
||||
| test_logging.rs:93:14:93:22 | &password | test_logging.rs:93:9:93:10 | m1 | provenance | |
|
||||
| test_logging.rs:93:15:93:22 | password | test_logging.rs:93:14:93:22 | &password | provenance | Config |
|
||||
| test_logging.rs:94:11:94:28 | MacroExpr | test_logging.rs:94:5:94:29 | ...::log | provenance | MaD:9 Sink:MaD:9 |
|
||||
| test_logging.rs:96:9:96:10 | m2 | test_logging.rs:97:11:97:18 | MacroExpr | provenance | |
|
||||
| test_logging.rs:96:41:96:49 | &password | test_logging.rs:96:9:96:10 | m2 | provenance | |
|
||||
| test_logging.rs:96:42:96:49 | password | test_logging.rs:96:41:96:49 | &password | provenance | Config |
|
||||
| test_logging.rs:97:11:97:18 | MacroExpr | test_logging.rs:97:5:97:19 | ...::log | provenance | MaD:9 Sink:MaD:9 |
|
||||
| test_logging.rs:99:9:99:10 | m3 | test_logging.rs:100:11:100:18 | MacroExpr | provenance | |
|
||||
| test_logging.rs:99:14:99:46 | res | test_logging.rs:99:22:99:45 | { ... } | provenance | |
|
||||
| test_logging.rs:99:22:99:45 | ...::format(...) | test_logging.rs:99:14:99:46 | res | provenance | |
|
||||
| test_logging.rs:99:22:99:45 | ...::must_use(...) | test_logging.rs:99:9:99:10 | m3 | provenance | |
|
||||
| test_logging.rs:99:22:99:45 | MacroExpr | test_logging.rs:99:22:99:45 | ...::format(...) | provenance | MaD:13 |
|
||||
| test_logging.rs:99:22:99:45 | { ... } | test_logging.rs:99:22:99:45 | ...::must_use(...) | provenance | MaD:14 |
|
||||
| test_logging.rs:99:38:99:45 | password | test_logging.rs:99:22:99:45 | MacroExpr | provenance | |
|
||||
| test_logging.rs:100:11:100:18 | MacroExpr | test_logging.rs:100:5:100:19 | ...::log | provenance | MaD:9 Sink:MaD:9 |
|
||||
| test_logging.rs:118:12:118:41 | MacroExpr | test_logging.rs:118:5:118:42 | ...::log | provenance | MaD:9 Sink:MaD:9 |
|
||||
| test_logging.rs:118:28:118:41 | get_password(...) | test_logging.rs:118:12:118:41 | MacroExpr | provenance | |
|
||||
| test_logging.rs:129:9:129:10 | t1 [tuple.1] | test_logging.rs:131:28:131:29 | t1 [tuple.1] | provenance | |
|
||||
| test_logging.rs:129:14:129:33 | TupleExpr [tuple.1] | test_logging.rs:129:9:129:10 | t1 [tuple.1] | provenance | |
|
||||
| test_logging.rs:129:25:129:32 | password | test_logging.rs:129:14:129:33 | TupleExpr [tuple.1] | provenance | |
|
||||
| test_logging.rs:131:12:131:31 | MacroExpr | test_logging.rs:131:5:131:32 | ...::log | provenance | MaD:9 Sink:MaD:9 |
|
||||
| test_logging.rs:131:28:131:29 | t1 [tuple.1] | test_logging.rs:131:28:131:31 | t1.1 | provenance | |
|
||||
| test_logging.rs:131:28:131:31 | t1.1 | test_logging.rs:131:12:131:31 | MacroExpr | provenance | |
|
||||
| test_logging.rs:152:12:152:37 | MacroExpr | test_logging.rs:152:5:152:38 | ...::_print | provenance | MaD:8 Sink:MaD:8 |
|
||||
| test_logging.rs:152:30:152:37 | password | test_logging.rs:152:12:152:37 | MacroExpr | provenance | |
|
||||
| test_logging.rs:153:14:153:37 | MacroExpr | test_logging.rs:153:5:153:38 | ...::_print | provenance | MaD:8 Sink:MaD:8 |
|
||||
| test_logging.rs:153:30:153:37 | password | test_logging.rs:153:14:153:37 | MacroExpr | provenance | |
|
||||
| test_logging.rs:154:13:154:38 | MacroExpr | test_logging.rs:154:5:154:39 | ...::_eprint | provenance | MaD:7 Sink:MaD:7 |
|
||||
| test_logging.rs:154:31:154:38 | password | test_logging.rs:154:13:154:38 | MacroExpr | provenance | |
|
||||
| test_logging.rs:155:15:155:38 | MacroExpr | test_logging.rs:155:5:155:39 | ...::_eprint | provenance | MaD:7 Sink:MaD:7 |
|
||||
| test_logging.rs:155:31:155:38 | password | test_logging.rs:155:15:155:38 | MacroExpr | provenance | |
|
||||
| test_logging.rs:158:23:158:46 | MacroExpr | test_logging.rs:158:16:158:47 | ...::panic_fmt | provenance | MaD:3 Sink:MaD:3 |
|
||||
| test_logging.rs:158:39:158:46 | password | test_logging.rs:158:23:158:46 | MacroExpr | provenance | |
|
||||
| test_logging.rs:159:22:159:45 | MacroExpr | test_logging.rs:159:16:159:46 | ...::panic_fmt | provenance | MaD:3 Sink:MaD:3 |
|
||||
| test_logging.rs:159:38:159:45 | password | test_logging.rs:159:22:159:45 | MacroExpr | provenance | |
|
||||
| test_logging.rs:160:31:160:54 | MacroExpr | test_logging.rs:160:16:160:55 | ...::panic_fmt | provenance | MaD:3 Sink:MaD:3 |
|
||||
| test_logging.rs:160:47:160:54 | password | test_logging.rs:160:31:160:54 | MacroExpr | provenance | |
|
||||
| test_logging.rs:161:29:161:52 | MacroExpr | test_logging.rs:161:16:161:53 | ...::panic_fmt | provenance | MaD:3 Sink:MaD:3 |
|
||||
| test_logging.rs:161:45:161:52 | password | test_logging.rs:161:29:161:52 | MacroExpr | provenance | |
|
||||
| test_logging.rs:162:31:162:54 | MacroExpr | test_logging.rs:162:16:162:55 | ...::panic_fmt | provenance | MaD:3 Sink:MaD:3 |
|
||||
| test_logging.rs:162:47:162:54 | password | test_logging.rs:162:31:162:54 | MacroExpr | provenance | |
|
||||
| test_logging.rs:163:33:163:56 | ...::Some(...) [Some] | test_logging.rs:163:16:163:57 | ...::assert_failed | provenance | MaD:2 Sink:MaD:2 |
|
||||
| test_logging.rs:163:33:163:56 | MacroExpr | test_logging.rs:163:33:163:56 | ...::Some(...) [Some] | provenance | |
|
||||
| test_logging.rs:163:49:163:56 | password | test_logging.rs:163:33:163:56 | MacroExpr | provenance | |
|
||||
| test_logging.rs:164:33:164:56 | ...::Some(...) [Some] | test_logging.rs:164:16:164:57 | ...::assert_failed | provenance | MaD:2 Sink:MaD:2 |
|
||||
| test_logging.rs:164:33:164:56 | MacroExpr | test_logging.rs:164:33:164:56 | ...::Some(...) [Some] | provenance | |
|
||||
| test_logging.rs:164:49:164:56 | password | test_logging.rs:164:33:164:56 | MacroExpr | provenance | |
|
||||
| test_logging.rs:165:37:165:60 | MacroExpr | test_logging.rs:165:16:165:61 | ...::panic_fmt | provenance | MaD:3 Sink:MaD:3 |
|
||||
| test_logging.rs:165:53:165:60 | password | test_logging.rs:165:37:165:60 | MacroExpr | provenance | |
|
||||
| test_logging.rs:166:39:166:62 | ...::Some(...) [Some] | test_logging.rs:166:16:166:63 | ...::assert_failed | provenance | MaD:2 Sink:MaD:2 |
|
||||
| test_logging.rs:166:39:166:62 | MacroExpr | test_logging.rs:166:39:166:62 | ...::Some(...) [Some] | provenance | |
|
||||
| test_logging.rs:166:55:166:62 | password | test_logging.rs:166:39:166:62 | MacroExpr | provenance | |
|
||||
| test_logging.rs:167:40:167:63 | ...::Some(...) [Some] | test_logging.rs:167:17:167:64 | ...::assert_failed | provenance | MaD:2 Sink:MaD:2 |
|
||||
| test_logging.rs:167:40:167:63 | MacroExpr | test_logging.rs:167:40:167:63 | ...::Some(...) [Some] | provenance | |
|
||||
| test_logging.rs:167:56:167:63 | password | test_logging.rs:167:40:167:63 | MacroExpr | provenance | |
|
||||
| test_logging.rs:168:34:168:66 | MacroExpr | test_logging.rs:168:34:168:75 | ... .as_str(...) | provenance | MaD:12 |
|
||||
| test_logging.rs:168:34:168:66 | res | test_logging.rs:168:42:168:65 | { ... } | provenance | |
|
||||
| test_logging.rs:168:34:168:75 | ... .as_str(...) | test_logging.rs:168:27:168:32 | expect | provenance | MaD:1 Sink:MaD:1 |
|
||||
| test_logging.rs:168:42:168:65 | ...::format(...) | test_logging.rs:168:34:168:66 | res | provenance | |
|
||||
| test_logging.rs:168:42:168:65 | ...::must_use(...) | test_logging.rs:168:34:168:66 | MacroExpr | provenance | |
|
||||
| test_logging.rs:168:42:168:65 | MacroExpr | test_logging.rs:168:42:168:65 | ...::format(...) | provenance | MaD:13 |
|
||||
| test_logging.rs:168:42:168:65 | { ... } | test_logging.rs:168:42:168:65 | ...::must_use(...) | provenance | MaD:14 |
|
||||
| test_logging.rs:168:58:168:65 | password | test_logging.rs:168:42:168:65 | MacroExpr | provenance | |
|
||||
| test_logging.rs:174:36:174:70 | MacroExpr | test_logging.rs:174:36:174:81 | ... .as_bytes(...) | provenance | MaD:11 |
|
||||
| test_logging.rs:174:36:174:70 | res | test_logging.rs:174:44:174:69 | { ... } | provenance | |
|
||||
| test_logging.rs:174:36:174:81 | ... .as_bytes(...) | test_logging.rs:174:30:174:34 | write | provenance | MaD:5 Sink:MaD:5 |
|
||||
| test_logging.rs:174:44:174:69 | ...::format(...) | test_logging.rs:174:36:174:70 | res | provenance | |
|
||||
| test_logging.rs:174:44:174:69 | ...::must_use(...) | test_logging.rs:174:36:174:70 | MacroExpr | provenance | |
|
||||
| test_logging.rs:174:44:174:69 | MacroExpr | test_logging.rs:174:44:174:69 | ...::format(...) | provenance | MaD:13 |
|
||||
| test_logging.rs:174:44:174:69 | { ... } | test_logging.rs:174:44:174:69 | ...::must_use(...) | provenance | MaD:14 |
|
||||
| test_logging.rs:174:62:174:69 | password | test_logging.rs:174:44:174:69 | MacroExpr | provenance | |
|
||||
| test_logging.rs:175:40:175:74 | MacroExpr | test_logging.rs:175:40:175:85 | ... .as_bytes(...) | provenance | MaD:11 |
|
||||
| test_logging.rs:175:40:175:74 | res | test_logging.rs:175:48:175:73 | { ... } | provenance | |
|
||||
| test_logging.rs:175:40:175:85 | ... .as_bytes(...) | test_logging.rs:175:30:175:38 | write_all | provenance | MaD:6 Sink:MaD:6 |
|
||||
| test_logging.rs:175:48:175:73 | ...::format(...) | test_logging.rs:175:40:175:74 | res | provenance | |
|
||||
| test_logging.rs:175:48:175:73 | ...::must_use(...) | test_logging.rs:175:40:175:74 | MacroExpr | provenance | |
|
||||
| test_logging.rs:175:48:175:73 | MacroExpr | test_logging.rs:175:48:175:73 | ...::format(...) | provenance | MaD:13 |
|
||||
| test_logging.rs:175:48:175:73 | { ... } | test_logging.rs:175:48:175:73 | ...::must_use(...) | provenance | MaD:14 |
|
||||
| test_logging.rs:175:66:175:73 | password | test_logging.rs:175:48:175:73 | MacroExpr | provenance | |
|
||||
| test_logging.rs:178:15:178:49 | MacroExpr | test_logging.rs:178:15:178:60 | ... .as_bytes(...) | provenance | MaD:11 |
|
||||
| test_logging.rs:178:15:178:49 | res | test_logging.rs:178:23:178:48 | { ... } | provenance | |
|
||||
| test_logging.rs:178:15:178:60 | ... .as_bytes(...) | test_logging.rs:178:9:178:13 | write | provenance | MaD:5 Sink:MaD:5 |
|
||||
| test_logging.rs:178:23:178:48 | ...::format(...) | test_logging.rs:178:15:178:49 | res | provenance | |
|
||||
| test_logging.rs:178:23:178:48 | ...::must_use(...) | test_logging.rs:178:15:178:49 | MacroExpr | provenance | |
|
||||
| test_logging.rs:178:23:178:48 | MacroExpr | test_logging.rs:178:23:178:48 | ...::format(...) | provenance | MaD:13 |
|
||||
| test_logging.rs:178:23:178:48 | { ... } | test_logging.rs:178:23:178:48 | ...::must_use(...) | provenance | MaD:14 |
|
||||
| test_logging.rs:178:41:178:48 | password | test_logging.rs:178:23:178:48 | MacroExpr | provenance | |
|
||||
| test_logging.rs:181:15:181:49 | MacroExpr | test_logging.rs:181:15:181:60 | ... .as_bytes(...) | provenance | MaD:11 |
|
||||
| test_logging.rs:181:15:181:49 | res | test_logging.rs:181:23:181:48 | { ... } | provenance | |
|
||||
| test_logging.rs:181:15:181:60 | ... .as_bytes(...) | test_logging.rs:181:9:181:13 | write | provenance | MaD:4 Sink:MaD:4 |
|
||||
| test_logging.rs:181:23:181:48 | ...::format(...) | test_logging.rs:181:15:181:49 | res | provenance | |
|
||||
| test_logging.rs:181:23:181:48 | ...::must_use(...) | test_logging.rs:181:15:181:49 | MacroExpr | provenance | |
|
||||
| test_logging.rs:181:23:181:48 | MacroExpr | test_logging.rs:181:23:181:48 | ...::format(...) | provenance | MaD:13 |
|
||||
| test_logging.rs:181:23:181:48 | { ... } | test_logging.rs:181:23:181:48 | ...::must_use(...) | provenance | MaD:14 |
|
||||
| test_logging.rs:181:41:181:48 | password | test_logging.rs:181:23:181:48 | MacroExpr | provenance | |
|
||||
models
|
||||
| 1 | Sink: lang:core; <crate::option::Option>::expect; log-injection; Argument[0] |
|
||||
| 2 | Sink: lang:core; crate::panicking::assert_failed; log-injection; Argument[3].Variant[crate::option::Option::Some(0)] |
|
||||
| 3 | Sink: lang:core; crate::panicking::panic_fmt; log-injection; Argument[0] |
|
||||
| 4 | Sink: lang:std; <crate::io::stdio::StderrLock as crate::io::Write>::write; log-injection; Argument[0] |
|
||||
| 5 | Sink: lang:std; <crate::io::stdio::StdoutLock as crate::io::Write>::write; log-injection; Argument[0] |
|
||||
| 6 | Sink: lang:std; <crate::io::stdio::StdoutLock as crate::io::Write>::write_all; log-injection; Argument[0] |
|
||||
| 7 | Sink: lang:std; crate::io::stdio::_eprint; log-injection; Argument[0] |
|
||||
| 8 | Sink: lang:std; crate::io::stdio::_print; log-injection; Argument[0] |
|
||||
| 9 | Sink: repo:https://github.com/rust-lang/log:log; crate::__private_api::log; log-injection; Argument[0] |
|
||||
| 10 | Sink: repo:https://github.com/rust-lang/log:log; crate::__private_api::log; log-injection; Argument[2] |
|
||||
| 11 | Summary: lang:alloc; <crate::string::String>::as_bytes; Argument[self]; ReturnValue; taint |
|
||||
| 12 | Summary: lang:alloc; <crate::string::String>::as_str; Argument[self]; ReturnValue; taint |
|
||||
| 13 | Summary: lang:alloc; crate::fmt::format; Argument[0]; ReturnValue; taint |
|
||||
| 14 | Summary: lang:core; crate::hint::must_use; Argument[0]; ReturnValue; value |
|
||||
nodes
|
||||
| test_logging.rs:42:5:42:36 | ...::log | semmle.label | ...::log |
|
||||
| test_logging.rs:42:12:42:35 | MacroExpr | semmle.label | MacroExpr |
|
||||
| test_logging.rs:42:28:42:35 | password | semmle.label | password |
|
||||
| test_logging.rs:43:5:43:36 | ...::log | semmle.label | ...::log |
|
||||
| test_logging.rs:43:12:43:35 | MacroExpr | semmle.label | MacroExpr |
|
||||
| test_logging.rs:43:28:43:35 | password | semmle.label | password |
|
||||
| test_logging.rs:44:5:44:35 | ...::log | semmle.label | ...::log |
|
||||
| test_logging.rs:44:11:44:34 | MacroExpr | semmle.label | MacroExpr |
|
||||
| test_logging.rs:44:27:44:34 | password | semmle.label | password |
|
||||
| test_logging.rs:45:5:45:36 | ...::log | semmle.label | ...::log |
|
||||
| test_logging.rs:45:12:45:35 | MacroExpr | semmle.label | MacroExpr |
|
||||
| test_logging.rs:45:28:45:35 | password | semmle.label | password |
|
||||
| test_logging.rs:46:5:46:35 | ...::log | semmle.label | ...::log |
|
||||
| test_logging.rs:46:11:46:34 | MacroExpr | semmle.label | MacroExpr |
|
||||
| test_logging.rs:46:27:46:34 | password | semmle.label | password |
|
||||
| test_logging.rs:47:5:47:48 | ...::log | semmle.label | ...::log |
|
||||
| test_logging.rs:47:24:47:47 | MacroExpr | semmle.label | MacroExpr |
|
||||
| test_logging.rs:47:40:47:47 | password | semmle.label | password |
|
||||
| test_logging.rs:52:5:52:36 | ...::log | semmle.label | ...::log |
|
||||
| test_logging.rs:52:12:52:35 | MacroExpr | semmle.label | MacroExpr |
|
||||
| test_logging.rs:52:28:52:35 | password | semmle.label | password |
|
||||
| test_logging.rs:54:5:54:49 | ...::log | semmle.label | ...::log |
|
||||
| test_logging.rs:54:12:54:48 | MacroExpr | semmle.label | MacroExpr |
|
||||
| test_logging.rs:54:41:54:48 | password | semmle.label | password |
|
||||
| test_logging.rs:56:5:56:47 | ...::log | semmle.label | ...::log |
|
||||
| test_logging.rs:56:12:56:46 | MacroExpr | semmle.label | MacroExpr |
|
||||
| test_logging.rs:56:39:56:46 | password | semmle.label | password |
|
||||
| test_logging.rs:57:5:57:34 | ...::log | semmle.label | ...::log |
|
||||
| test_logging.rs:57:12:57:33 | MacroExpr | semmle.label | MacroExpr |
|
||||
| test_logging.rs:57:24:57:31 | password | semmle.label | password |
|
||||
| test_logging.rs:58:5:58:36 | ...::log | semmle.label | ...::log |
|
||||
| test_logging.rs:58:12:58:35 | MacroExpr | semmle.label | MacroExpr |
|
||||
| test_logging.rs:58:24:58:31 | password | semmle.label | password |
|
||||
| test_logging.rs:60:5:60:54 | ...::log | semmle.label | ...::log |
|
||||
| test_logging.rs:60:30:60:53 | MacroExpr | semmle.label | MacroExpr |
|
||||
| test_logging.rs:60:46:60:53 | password | semmle.label | password |
|
||||
| test_logging.rs:61:5:61:55 | ...::log | semmle.label | ...::log |
|
||||
| test_logging.rs:61:20:61:28 | &... [&ref, tuple.0, &ref] | semmle.label | &... [&ref, tuple.0, &ref] |
|
||||
| test_logging.rs:61:20:61:28 | &... [&ref, tuple.0] | semmle.label | &... [&ref, tuple.0] |
|
||||
| test_logging.rs:61:20:61:28 | &password | semmle.label | &password |
|
||||
| test_logging.rs:61:20:61:28 | &password [&ref] | semmle.label | &password [&ref] |
|
||||
| test_logging.rs:61:20:61:28 | TupleExpr [tuple.0, &ref] | semmle.label | TupleExpr [tuple.0, &ref] |
|
||||
| test_logging.rs:61:20:61:28 | TupleExpr [tuple.0] | semmle.label | TupleExpr [tuple.0] |
|
||||
| test_logging.rs:61:21:61:28 | password | semmle.label | password |
|
||||
| test_logging.rs:65:5:65:48 | ...::log | semmle.label | ...::log |
|
||||
| test_logging.rs:65:24:65:47 | MacroExpr | semmle.label | MacroExpr |
|
||||
| test_logging.rs:65:40:65:47 | password | semmle.label | password |
|
||||
| test_logging.rs:67:5:67:66 | ...::log | semmle.label | ...::log |
|
||||
| test_logging.rs:67:42:67:65 | MacroExpr | semmle.label | MacroExpr |
|
||||
| test_logging.rs:67:58:67:65 | password | semmle.label | password |
|
||||
| test_logging.rs:68:5:68:67 | ...::log | semmle.label | ...::log |
|
||||
| test_logging.rs:68:18:68:26 | &... [&ref, tuple.0, &ref] | semmle.label | &... [&ref, tuple.0, &ref] |
|
||||
| test_logging.rs:68:18:68:26 | &... [&ref, tuple.0] | semmle.label | &... [&ref, tuple.0] |
|
||||
| test_logging.rs:68:18:68:26 | &password | semmle.label | &password |
|
||||
| test_logging.rs:68:18:68:26 | &password [&ref] | semmle.label | &password [&ref] |
|
||||
| test_logging.rs:68:18:68:26 | TupleExpr [tuple.0, &ref] | semmle.label | TupleExpr [tuple.0, &ref] |
|
||||
| test_logging.rs:68:18:68:26 | TupleExpr [tuple.0] | semmle.label | TupleExpr [tuple.0] |
|
||||
| test_logging.rs:68:19:68:26 | password | semmle.label | password |
|
||||
| test_logging.rs:72:5:72:47 | ...::log::<...> | semmle.label | ...::log::<...> |
|
||||
| test_logging.rs:72:23:72:46 | MacroExpr | semmle.label | MacroExpr |
|
||||
| test_logging.rs:72:39:72:46 | password | semmle.label | password |
|
||||
| test_logging.rs:74:5:74:65 | ...::log::<...> | semmle.label | ...::log::<...> |
|
||||
| test_logging.rs:74:41:74:64 | MacroExpr | semmle.label | MacroExpr |
|
||||
| test_logging.rs:74:57:74:64 | password | semmle.label | password |
|
||||
| test_logging.rs:75:5:75:51 | ...::log::<...> | semmle.label | ...::log::<...> |
|
||||
| test_logging.rs:75:20:75:28 | &... [&ref, tuple.0, &ref] | semmle.label | &... [&ref, tuple.0, &ref] |
|
||||
| test_logging.rs:75:20:75:28 | &... [&ref, tuple.0] | semmle.label | &... [&ref, tuple.0] |
|
||||
| test_logging.rs:75:20:75:28 | &password | semmle.label | &password |
|
||||
| test_logging.rs:75:20:75:28 | &password [&ref] | semmle.label | &password [&ref] |
|
||||
| test_logging.rs:75:20:75:28 | TupleExpr [tuple.0, &ref] | semmle.label | TupleExpr [tuple.0, &ref] |
|
||||
| test_logging.rs:75:20:75:28 | TupleExpr [tuple.0] | semmle.label | TupleExpr [tuple.0] |
|
||||
| test_logging.rs:75:21:75:28 | password | semmle.label | password |
|
||||
| test_logging.rs:76:5:76:47 | ...::log::<...> | semmle.label | ...::log::<...> |
|
||||
| test_logging.rs:76:23:76:46 | MacroExpr | semmle.label | MacroExpr |
|
||||
| test_logging.rs:76:39:76:46 | password | semmle.label | password |
|
||||
| test_logging.rs:82:5:82:44 | ...::log::<...> | semmle.label | ...::log::<...> |
|
||||
| test_logging.rs:82:20:82:43 | MacroExpr | semmle.label | MacroExpr |
|
||||
| test_logging.rs:82:36:82:43 | password | semmle.label | password |
|
||||
| test_logging.rs:84:5:84:62 | ...::log::<...> | semmle.label | ...::log::<...> |
|
||||
| test_logging.rs:84:38:84:61 | MacroExpr | semmle.label | MacroExpr |
|
||||
| test_logging.rs:84:54:84:61 | password | semmle.label | password |
|
||||
| test_logging.rs:85:5:85:48 | ...::log::<...> | semmle.label | ...::log::<...> |
|
||||
| test_logging.rs:85:20:85:28 | &... [&ref, tuple.0, &ref] | semmle.label | &... [&ref, tuple.0, &ref] |
|
||||
| test_logging.rs:85:20:85:28 | &... [&ref, tuple.0] | semmle.label | &... [&ref, tuple.0] |
|
||||
| test_logging.rs:85:20:85:28 | &password | semmle.label | &password |
|
||||
| test_logging.rs:85:20:85:28 | &password [&ref] | semmle.label | &password [&ref] |
|
||||
| test_logging.rs:85:20:85:28 | TupleExpr [tuple.0, &ref] | semmle.label | TupleExpr [tuple.0, &ref] |
|
||||
| test_logging.rs:85:20:85:28 | TupleExpr [tuple.0] | semmle.label | TupleExpr [tuple.0] |
|
||||
| test_logging.rs:85:21:85:28 | password | semmle.label | password |
|
||||
| test_logging.rs:86:5:86:44 | ...::log::<...> | semmle.label | ...::log::<...> |
|
||||
| test_logging.rs:86:20:86:43 | MacroExpr | semmle.label | MacroExpr |
|
||||
| test_logging.rs:86:36:86:43 | password | semmle.label | password |
|
||||
| test_logging.rs:93:9:93:10 | m1 | semmle.label | m1 |
|
||||
| test_logging.rs:93:14:93:22 | &password | semmle.label | &password |
|
||||
| test_logging.rs:93:15:93:22 | password | semmle.label | password |
|
||||
| test_logging.rs:94:5:94:29 | ...::log | semmle.label | ...::log |
|
||||
| test_logging.rs:94:11:94:28 | MacroExpr | semmle.label | MacroExpr |
|
||||
| test_logging.rs:96:9:96:10 | m2 | semmle.label | m2 |
|
||||
| test_logging.rs:96:41:96:49 | &password | semmle.label | &password |
|
||||
| test_logging.rs:96:42:96:49 | password | semmle.label | password |
|
||||
| test_logging.rs:97:5:97:19 | ...::log | semmle.label | ...::log |
|
||||
| test_logging.rs:97:11:97:18 | MacroExpr | semmle.label | MacroExpr |
|
||||
| test_logging.rs:99:9:99:10 | m3 | semmle.label | m3 |
|
||||
| test_logging.rs:99:14:99:46 | res | semmle.label | res |
|
||||
| test_logging.rs:99:22:99:45 | ...::format(...) | semmle.label | ...::format(...) |
|
||||
| test_logging.rs:99:22:99:45 | ...::must_use(...) | semmle.label | ...::must_use(...) |
|
||||
| test_logging.rs:99:22:99:45 | MacroExpr | semmle.label | MacroExpr |
|
||||
| test_logging.rs:99:22:99:45 | { ... } | semmle.label | { ... } |
|
||||
| test_logging.rs:99:38:99:45 | password | semmle.label | password |
|
||||
| test_logging.rs:100:5:100:19 | ...::log | semmle.label | ...::log |
|
||||
| test_logging.rs:100:11:100:18 | MacroExpr | semmle.label | MacroExpr |
|
||||
| test_logging.rs:118:5:118:42 | ...::log | semmle.label | ...::log |
|
||||
| test_logging.rs:118:12:118:41 | MacroExpr | semmle.label | MacroExpr |
|
||||
| test_logging.rs:118:28:118:41 | get_password(...) | semmle.label | get_password(...) |
|
||||
| test_logging.rs:129:9:129:10 | t1 [tuple.1] | semmle.label | t1 [tuple.1] |
|
||||
| test_logging.rs:129:14:129:33 | TupleExpr [tuple.1] | semmle.label | TupleExpr [tuple.1] |
|
||||
| test_logging.rs:129:25:129:32 | password | semmle.label | password |
|
||||
| test_logging.rs:131:5:131:32 | ...::log | semmle.label | ...::log |
|
||||
| test_logging.rs:131:12:131:31 | MacroExpr | semmle.label | MacroExpr |
|
||||
| test_logging.rs:131:28:131:29 | t1 [tuple.1] | semmle.label | t1 [tuple.1] |
|
||||
| test_logging.rs:131:28:131:31 | t1.1 | semmle.label | t1.1 |
|
||||
| test_logging.rs:152:5:152:38 | ...::_print | semmle.label | ...::_print |
|
||||
| test_logging.rs:152:12:152:37 | MacroExpr | semmle.label | MacroExpr |
|
||||
| test_logging.rs:152:30:152:37 | password | semmle.label | password |
|
||||
| test_logging.rs:153:5:153:38 | ...::_print | semmle.label | ...::_print |
|
||||
| test_logging.rs:153:14:153:37 | MacroExpr | semmle.label | MacroExpr |
|
||||
| test_logging.rs:153:30:153:37 | password | semmle.label | password |
|
||||
| test_logging.rs:154:5:154:39 | ...::_eprint | semmle.label | ...::_eprint |
|
||||
| test_logging.rs:154:13:154:38 | MacroExpr | semmle.label | MacroExpr |
|
||||
| test_logging.rs:154:31:154:38 | password | semmle.label | password |
|
||||
| test_logging.rs:155:5:155:39 | ...::_eprint | semmle.label | ...::_eprint |
|
||||
| test_logging.rs:155:15:155:38 | MacroExpr | semmle.label | MacroExpr |
|
||||
| test_logging.rs:155:31:155:38 | password | semmle.label | password |
|
||||
| test_logging.rs:158:16:158:47 | ...::panic_fmt | semmle.label | ...::panic_fmt |
|
||||
| test_logging.rs:158:23:158:46 | MacroExpr | semmle.label | MacroExpr |
|
||||
| test_logging.rs:158:39:158:46 | password | semmle.label | password |
|
||||
| test_logging.rs:159:16:159:46 | ...::panic_fmt | semmle.label | ...::panic_fmt |
|
||||
| test_logging.rs:159:22:159:45 | MacroExpr | semmle.label | MacroExpr |
|
||||
| test_logging.rs:159:38:159:45 | password | semmle.label | password |
|
||||
| test_logging.rs:160:16:160:55 | ...::panic_fmt | semmle.label | ...::panic_fmt |
|
||||
| test_logging.rs:160:31:160:54 | MacroExpr | semmle.label | MacroExpr |
|
||||
| test_logging.rs:160:47:160:54 | password | semmle.label | password |
|
||||
| test_logging.rs:161:16:161:53 | ...::panic_fmt | semmle.label | ...::panic_fmt |
|
||||
| test_logging.rs:161:29:161:52 | MacroExpr | semmle.label | MacroExpr |
|
||||
| test_logging.rs:161:45:161:52 | password | semmle.label | password |
|
||||
| test_logging.rs:162:16:162:55 | ...::panic_fmt | semmle.label | ...::panic_fmt |
|
||||
| test_logging.rs:162:31:162:54 | MacroExpr | semmle.label | MacroExpr |
|
||||
| test_logging.rs:162:47:162:54 | password | semmle.label | password |
|
||||
| test_logging.rs:163:16:163:57 | ...::assert_failed | semmle.label | ...::assert_failed |
|
||||
| test_logging.rs:163:33:163:56 | ...::Some(...) [Some] | semmle.label | ...::Some(...) [Some] |
|
||||
| test_logging.rs:163:33:163:56 | MacroExpr | semmle.label | MacroExpr |
|
||||
| test_logging.rs:163:49:163:56 | password | semmle.label | password |
|
||||
| test_logging.rs:164:16:164:57 | ...::assert_failed | semmle.label | ...::assert_failed |
|
||||
| test_logging.rs:164:33:164:56 | ...::Some(...) [Some] | semmle.label | ...::Some(...) [Some] |
|
||||
| test_logging.rs:164:33:164:56 | MacroExpr | semmle.label | MacroExpr |
|
||||
| test_logging.rs:164:49:164:56 | password | semmle.label | password |
|
||||
| test_logging.rs:165:16:165:61 | ...::panic_fmt | semmle.label | ...::panic_fmt |
|
||||
| test_logging.rs:165:37:165:60 | MacroExpr | semmle.label | MacroExpr |
|
||||
| test_logging.rs:165:53:165:60 | password | semmle.label | password |
|
||||
| test_logging.rs:166:16:166:63 | ...::assert_failed | semmle.label | ...::assert_failed |
|
||||
| test_logging.rs:166:39:166:62 | ...::Some(...) [Some] | semmle.label | ...::Some(...) [Some] |
|
||||
| test_logging.rs:166:39:166:62 | MacroExpr | semmle.label | MacroExpr |
|
||||
| test_logging.rs:166:55:166:62 | password | semmle.label | password |
|
||||
| test_logging.rs:167:17:167:64 | ...::assert_failed | semmle.label | ...::assert_failed |
|
||||
| test_logging.rs:167:40:167:63 | ...::Some(...) [Some] | semmle.label | ...::Some(...) [Some] |
|
||||
| test_logging.rs:167:40:167:63 | MacroExpr | semmle.label | MacroExpr |
|
||||
| test_logging.rs:167:56:167:63 | password | semmle.label | password |
|
||||
| test_logging.rs:168:27:168:32 | expect | semmle.label | expect |
|
||||
| test_logging.rs:168:34:168:66 | MacroExpr | semmle.label | MacroExpr |
|
||||
| test_logging.rs:168:34:168:66 | res | semmle.label | res |
|
||||
| test_logging.rs:168:34:168:75 | ... .as_str(...) | semmle.label | ... .as_str(...) |
|
||||
| test_logging.rs:168:42:168:65 | ...::format(...) | semmle.label | ...::format(...) |
|
||||
| test_logging.rs:168:42:168:65 | ...::must_use(...) | semmle.label | ...::must_use(...) |
|
||||
| test_logging.rs:168:42:168:65 | MacroExpr | semmle.label | MacroExpr |
|
||||
| test_logging.rs:168:42:168:65 | { ... } | semmle.label | { ... } |
|
||||
| test_logging.rs:168:58:168:65 | password | semmle.label | password |
|
||||
| test_logging.rs:174:30:174:34 | write | semmle.label | write |
|
||||
| test_logging.rs:174:36:174:70 | MacroExpr | semmle.label | MacroExpr |
|
||||
| test_logging.rs:174:36:174:70 | res | semmle.label | res |
|
||||
| test_logging.rs:174:36:174:81 | ... .as_bytes(...) | semmle.label | ... .as_bytes(...) |
|
||||
| test_logging.rs:174:44:174:69 | ...::format(...) | semmle.label | ...::format(...) |
|
||||
| test_logging.rs:174:44:174:69 | ...::must_use(...) | semmle.label | ...::must_use(...) |
|
||||
| test_logging.rs:174:44:174:69 | MacroExpr | semmle.label | MacroExpr |
|
||||
| test_logging.rs:174:44:174:69 | { ... } | semmle.label | { ... } |
|
||||
| test_logging.rs:174:62:174:69 | password | semmle.label | password |
|
||||
| test_logging.rs:175:30:175:38 | write_all | semmle.label | write_all |
|
||||
| test_logging.rs:175:40:175:74 | MacroExpr | semmle.label | MacroExpr |
|
||||
| test_logging.rs:175:40:175:74 | res | semmle.label | res |
|
||||
| test_logging.rs:175:40:175:85 | ... .as_bytes(...) | semmle.label | ... .as_bytes(...) |
|
||||
| test_logging.rs:175:48:175:73 | ...::format(...) | semmle.label | ...::format(...) |
|
||||
| test_logging.rs:175:48:175:73 | ...::must_use(...) | semmle.label | ...::must_use(...) |
|
||||
| test_logging.rs:175:48:175:73 | MacroExpr | semmle.label | MacroExpr |
|
||||
| test_logging.rs:175:48:175:73 | { ... } | semmle.label | { ... } |
|
||||
| test_logging.rs:175:66:175:73 | password | semmle.label | password |
|
||||
| test_logging.rs:178:9:178:13 | write | semmle.label | write |
|
||||
| test_logging.rs:178:15:178:49 | MacroExpr | semmle.label | MacroExpr |
|
||||
| test_logging.rs:178:15:178:49 | res | semmle.label | res |
|
||||
| test_logging.rs:178:15:178:60 | ... .as_bytes(...) | semmle.label | ... .as_bytes(...) |
|
||||
| test_logging.rs:178:23:178:48 | ...::format(...) | semmle.label | ...::format(...) |
|
||||
| test_logging.rs:178:23:178:48 | ...::must_use(...) | semmle.label | ...::must_use(...) |
|
||||
| test_logging.rs:178:23:178:48 | MacroExpr | semmle.label | MacroExpr |
|
||||
| test_logging.rs:178:23:178:48 | { ... } | semmle.label | { ... } |
|
||||
| test_logging.rs:178:41:178:48 | password | semmle.label | password |
|
||||
| test_logging.rs:181:9:181:13 | write | semmle.label | write |
|
||||
| test_logging.rs:181:15:181:49 | MacroExpr | semmle.label | MacroExpr |
|
||||
| test_logging.rs:181:15:181:49 | res | semmle.label | res |
|
||||
| test_logging.rs:181:15:181:60 | ... .as_bytes(...) | semmle.label | ... .as_bytes(...) |
|
||||
| test_logging.rs:181:23:181:48 | ...::format(...) | semmle.label | ...::format(...) |
|
||||
| test_logging.rs:181:23:181:48 | ...::must_use(...) | semmle.label | ...::must_use(...) |
|
||||
| test_logging.rs:181:23:181:48 | MacroExpr | semmle.label | MacroExpr |
|
||||
| test_logging.rs:181:23:181:48 | { ... } | semmle.label | { ... } |
|
||||
| test_logging.rs:181:41:181:48 | password | semmle.label | password |
|
||||
subpaths
|
||||
@@ -0,0 +1,4 @@
|
||||
query: queries/security/CWE-312/CleartextLogging.ql
|
||||
postprocess:
|
||||
- utils/test/InlineExpectationsTestQuery.ql
|
||||
- utils/test/PrettyPrintModels.ql
|
||||
4
rust/ql/test/query-tests/security/CWE-312/options.yml
Normal file
4
rust/ql/test/query-tests/security/CWE-312/options.yml
Normal file
@@ -0,0 +1,4 @@
|
||||
qltest_cargo_check: true
|
||||
qltest_dependencies:
|
||||
- log = { version = "0.4.25", features = ["kv"] }
|
||||
- simple_logger = { version = "5.0.0" }
|
||||
189
rust/ql/test/query-tests/security/CWE-312/test_logging.rs
Normal file
189
rust/ql/test/query-tests/security/CWE-312/test_logging.rs
Normal file
@@ -0,0 +1,189 @@
|
||||
|
||||
use log::{debug, error, info, trace, warn, log, Level};
|
||||
use std::io::Write as _;
|
||||
use std::fmt::Write as _;
|
||||
|
||||
// --- tests ---
|
||||
|
||||
fn get_password() -> String {
|
||||
"123456".to_string()
|
||||
}
|
||||
|
||||
fn use_password(password: &String) {
|
||||
// ...
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
struct MyStruct1 {
|
||||
harmless: String,
|
||||
password: String,
|
||||
}
|
||||
|
||||
impl std::fmt::Display for MyStruct1 {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
|
||||
write!(f, "{} {}", self.harmless, self.password)
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
struct MyStruct2 {
|
||||
harmless: String,
|
||||
password: String,
|
||||
}
|
||||
|
||||
impl std::fmt::Display for MyStruct2 {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
|
||||
write!(f, "{} [REDACTED]", self.harmless) // doesn't output password
|
||||
}
|
||||
}
|
||||
|
||||
fn test_log(harmless: String, password: String, encrypted_password: String) {
|
||||
// logging macros
|
||||
debug!("message = {}", password); // $ Alert[rust/cleartext-logging]
|
||||
error!("message = {}", password); // $ Alert[rust/cleartext-logging]
|
||||
info!("message = {}", password); // $ Alert[rust/cleartext-logging]
|
||||
trace!("message = {}", password); // $ Alert[rust/cleartext-logging]
|
||||
warn!("message = {}", password); // $ Alert[rust/cleartext-logging]
|
||||
log!(Level::Error, "message = {}", password); // $ Alert[rust/cleartext-logging]
|
||||
|
||||
// debug! macro, various formatting
|
||||
debug!("message");
|
||||
debug!("message = {}", harmless);
|
||||
debug!("message = {}", password); // $ Alert[rust/cleartext-logging]
|
||||
debug!("message = {}", encrypted_password);
|
||||
debug!("message = {} {}", harmless, password); // $ Alert[rust/cleartext-logging]
|
||||
debug!("message = {harmless}");
|
||||
debug!("message = {harmless} {}", password); // $ Alert[rust/cleartext-logging]
|
||||
debug!("message = {password}"); // $ Alert[rust/cleartext-logging]
|
||||
debug!("message = {password:?}"); // $ Alert[rust/cleartext-logging]
|
||||
debug!(target: "target", "message = {}", harmless);
|
||||
debug!(target: "target", "message = {}", password); // $ Alert[rust/cleartext-logging]
|
||||
debug!(target: &password, "message = {}", harmless); // $ Alert[rust/cleartext-logging]
|
||||
|
||||
// log! macro, various formatting
|
||||
log!(Level::Error, "message = {}", harmless);
|
||||
log!(Level::Error, "message = {}", password); // $ Alert[rust/cleartext-logging]
|
||||
log!(target: "target", Level::Error, "message = {}", harmless);
|
||||
log!(target: "target", Level::Error, "message = {}", password); // $ Alert[rust/cleartext-logging]
|
||||
log!(target: &password, Level::Error, "message = {}", harmless); // $ Alert[rust/cleartext-logging]
|
||||
|
||||
// structured logging
|
||||
error!(value = 1; "message = {}", harmless);
|
||||
error!(value = 1; "message = {}", password); // $ Alert[rust/cleartext-logging]
|
||||
error!(target: "target", value = 1; "message");
|
||||
error!(target: "target", value = 1; "message = {}", password); // $ Alert[rust/cleartext-logging]
|
||||
error!(target: &password, value = 1; "message"); // $ Alert[rust/cleartext-logging]
|
||||
error!(value = 1; "message = {}", password); // $ Alert[rust/cleartext-logging]
|
||||
error!(value = password.as_str(); "message"); // $ MISSING: Alert[rust/cleartext-logging]
|
||||
error!(value:? = password.as_str(); "message"); // $ MISSING: Alert[rust/cleartext-logging]
|
||||
|
||||
let value1 = 1;
|
||||
error!(value1; "message = {}", harmless);
|
||||
error!(value1; "message = {}", password); // $ Alert[rust/cleartext-logging]
|
||||
error!(target: "target", value1; "message");
|
||||
error!(target: "target", value1; "message = {}", password); // $ Alert[rust/cleartext-logging]
|
||||
error!(target: &password, value1; "message"); // $ Alert[rust/cleartext-logging]
|
||||
error!(value1; "message = {}", password); // $ Alert[rust/cleartext-logging]
|
||||
|
||||
let value2 = password.as_str();
|
||||
error!(value2; "message"); // $ MISSING: Alert[rust/cleartext-logging]
|
||||
error!(value2:?; "message"); // $ MISSING: Alert[rust/cleartext-logging]
|
||||
|
||||
// pre-formatted
|
||||
let m1 = &password; // $ Source=m1
|
||||
info!("message = {}", m1); // $ Alert[rust/cleartext-logging]=m1
|
||||
|
||||
let m2 = "message = ".to_string() + &password; // $ Source=m2
|
||||
info!("{}", m2); // $ Alert[rust/cleartext-logging]=m2
|
||||
|
||||
let m3 = format!("message = {}", password); // $ Source=m3
|
||||
info!("{}", m3); // $ Alert[rust/cleartext-logging]=m3
|
||||
|
||||
let mut m4 = String::new();
|
||||
write!(&mut m4, "message = {}", password); // $ MISSING: Source=m4
|
||||
info!("{}", m4); // $ MISSING: Alert[rust/cleartext-logging]=m4
|
||||
|
||||
let mut m5 = String::new();
|
||||
writeln!(&mut m5, "message = {}", password); // $ MISSING: Source=m5
|
||||
info!("{}", m5); // $ MISSING: Alert[rust/cleartext-logging]=m5
|
||||
|
||||
let mut m6 = Vec::new();
|
||||
write!(&mut m6, "message = {}", password); // $ MISSING: Source=m6
|
||||
info!("{}", std::str::from_utf8(&m6).unwrap()); // $ MISSING: Alert[rust/cleartext-logging]=m6
|
||||
unsafe {
|
||||
info!("{}", std::str::from_utf8_unchecked(&m6)); // $ MISSING: Alert[rust/cleartext-logging]=m6
|
||||
}
|
||||
|
||||
// logging with a call
|
||||
trace!("message = {}", get_password()); // $ Alert[rust/cleartext-logging]
|
||||
|
||||
let str1 = "123456".to_string();
|
||||
trace!("message = {}", &str1); // $ MISSING: Alert[rust/cleartext-logging]
|
||||
use_password(&str1); // (proves that `str1` is a password)
|
||||
trace!("message = {}", &str1); // $ MISSING: Alert[rust/cleartext-logging]
|
||||
|
||||
let str2 = "123456".to_string();
|
||||
trace!("message = {}", &str2);
|
||||
|
||||
// logging from a tuple
|
||||
let t1 = (harmless, password); // $ Source=t1
|
||||
trace!("message = {}", t1.0);
|
||||
trace!("message = {}", t1.1); // $ Alert[rust/cleartext-logging]=t1
|
||||
trace!("message = {:?}", t1); // $ MISSING: Alert[rust/cleartext-logging]=t1
|
||||
trace!("message = {:#?}", t1); // $ MISSING: Alert[rust/cleartext-logging]=t1
|
||||
|
||||
// logging from a struct
|
||||
let s1 = MyStruct1 { harmless: "foo".to_string(), password: "123456".to_string() }; // $ MISSING: Source=s1
|
||||
warn!("message = {}", s1.harmless);
|
||||
warn!("message = {}", s1.password); // $ MISSING: Alert[rust/cleartext-logging]
|
||||
warn!("message = {}", s1); // $ MISSING: Alert[rust/cleartext-logging]=s1
|
||||
warn!("message = {:?}", s1); // $ MISSING: Alert[rust/cleartext-logging]=s1
|
||||
warn!("message = {:#?}", s1); // $ MISSING: Alert[rust/cleartext-logging]=s1
|
||||
|
||||
let s2 = MyStruct2 { harmless: "foo".to_string(), password: "123456".to_string() }; // $ MISSING: Source=s2
|
||||
warn!("message = {}", s2.harmless);
|
||||
warn!("message = {}", s2.password); // $ MISSING: Alert[rust/cleartext-logging]
|
||||
warn!("message = {}", s2); // (this implementation does not output the password field)
|
||||
warn!("message = {:?}", s2); // $ MISSING: Alert[rust/cleartext-logging]=s2
|
||||
warn!("message = {:#?}", s2); // $ MISSING: Alert[rust/cleartext-logging]=s2
|
||||
}
|
||||
|
||||
fn test_std(password: String, i: i32, opt_i: Option<i32>) {
|
||||
print!("message = {}\n", password); // $ Alert[rust/cleartext-logging]
|
||||
println!("message = {}", password); // $ Alert[rust/cleartext-logging]
|
||||
eprint!("message = {}\n", password); // $ Alert[rust/cleartext-logging]
|
||||
eprintln!("message = {}", password); // $ Alert[rust/cleartext-logging]
|
||||
|
||||
match i {
|
||||
1 => { panic!("message = {}", password); } // $ Alert[rust/cleartext-logging]
|
||||
2 => { todo!("message = {}", password); } // $ Alert[rust/cleartext-logging]
|
||||
3 => { unimplemented!("message = {}", password); } // $ Alert[rust/cleartext-logging]
|
||||
4 => { unreachable!("message = {}", password); } // $ Alert[rust/cleartext-logging]
|
||||
5 => { assert!(false, "message = {}", password); } // $ Alert[rust/cleartext-logging]
|
||||
6 => { assert_eq!(1, 2, "message = {}", password); } // $ Alert[rust/cleartext-logging]
|
||||
7 => { assert_ne!(1, 1, "message = {}", password); } // $ Alert[rust/cleartext-logging]
|
||||
8 => { debug_assert!(false, "message = {}", password); } // $ Alert[rust/cleartext-logging]
|
||||
9 => { debug_assert_eq!(1, 2, "message = {}", password); } // $ Alert[rust/cleartext-logging]
|
||||
10 => { debug_assert_ne!(1, 1, "message = {}", password); } // $ Alert[rust/cleartext-logging]
|
||||
11 => { _ = opt_i.expect(format!("message = {}", password).as_str()); } // $ Alert[rust/cleartext-logging]
|
||||
_ => {}
|
||||
}
|
||||
|
||||
std::io::stdout().lock().write_fmt(format_args!("message = {}\n", password)); // $ MISSING: Alert[rust/cleartext-logging]
|
||||
std::io::stderr().lock().write_fmt(format_args!("message = {}\n", password)); // $ MISSING: Alert[rust/cleartext-logging]
|
||||
std::io::stdout().lock().write(format!("message = {}\n", password).as_bytes()); // $ Alert[rust/cleartext-logging]
|
||||
std::io::stdout().lock().write_all(format!("message = {}\n", password).as_bytes()); // $ Alert[rust/cleartext-logging]
|
||||
|
||||
let mut out = std::io::stdout().lock();
|
||||
out.write(format!("message = {}\n", password).as_bytes()); // $ Alert[rust/cleartext-logging]
|
||||
|
||||
let mut err = std::io::stderr().lock();
|
||||
err.write(format!("message = {}\n", password).as_bytes()); // $ Alert[rust/cleartext-logging]
|
||||
}
|
||||
|
||||
fn main() {
|
||||
simple_logger::SimpleLogger::new().init().unwrap();
|
||||
|
||||
test_log("harmless".to_string(), "123456".to_string(), "[encrypted]".to_string());
|
||||
test_std("123456".to_string(), 0, None);
|
||||
}
|
||||
@@ -1,44 +1,49 @@
|
||||
#select
|
||||
| test.rs:31:9:31:25 | ...::stdout(...) | test.rs:29:1:29:13 | Attr | test.rs:31:9:31:25 | ...::stdout(...) | Call to ...::stdout(...) in a function with the ctor attribute. |
|
||||
| test.rs:36:9:36:25 | ...::stdout(...) | test.rs:34:1:34:13 | Attr | test.rs:36:9:36:25 | ...::stdout(...) | Call to ...::stdout(...) in a function with the dtor attribute. |
|
||||
| test.rs:43:9:43:25 | ...::stdout(...) | test.rs:40:1:40:13 | Attr | test.rs:43:9:43:25 | ...::stdout(...) | Call to ...::stdout(...) in a function with the dtor attribute. |
|
||||
| test.rs:53:9:53:16 | stdout(...) | test.rs:51:1:51:7 | Attr | test.rs:53:9:53:16 | stdout(...) | Call to stdout(...) in a function with the ctor attribute. |
|
||||
| test.rs:58:9:58:16 | stderr(...) | test.rs:56:1:56:7 | Attr | test.rs:58:9:58:16 | stderr(...) | Call to stderr(...) in a function with the ctor attribute. |
|
||||
| test.rs:63:14:63:28 | ...::_print(...) | test.rs:61:1:61:7 | Attr | test.rs:63:14:63:28 | ...::_print(...) | Call to ...::_print(...) in a function with the ctor attribute. |
|
||||
| test.rs:69:9:69:24 | ...::stdin(...) | test.rs:66:1:66:7 | Attr | test.rs:69:9:69:24 | ...::stdin(...) | Call to ...::stdin(...) in a function with the ctor attribute. |
|
||||
| test.rs:90:5:90:35 | ...::sleep(...) | test.rs:88:1:88:7 | Attr | test.rs:90:5:90:35 | ...::sleep(...) | Call to ...::sleep(...) in a function with the ctor attribute. |
|
||||
| test.rs:97:5:97:23 | ...::exit(...) | test.rs:95:1:95:7 | Attr | test.rs:97:5:97:23 | ...::exit(...) | Call to ...::exit(...) in a function with the ctor attribute. |
|
||||
| test.rs:126:9:126:16 | stderr(...) | test.rs:129:1:129:7 | Attr | test.rs:126:9:126:16 | stderr(...) | Call to stderr(...) in a function with the ctor attribute. |
|
||||
| test.rs:126:9:126:16 | stderr(...) | test.rs:145:1:145:7 | Attr | test.rs:126:9:126:16 | stderr(...) | Call to stderr(...) in a function with the ctor attribute. |
|
||||
| test.rs:126:9:126:44 | ... .write_all(...) | test.rs:129:1:129:7 | Attr | test.rs:126:9:126:44 | ... .write_all(...) | Call to ... .write_all(...) in a function with the ctor attribute. |
|
||||
| test.rs:126:9:126:44 | ... .write_all(...) | test.rs:145:1:145:7 | Attr | test.rs:126:9:126:44 | ... .write_all(...) | Call to ... .write_all(...) in a function with the ctor attribute. |
|
||||
| test.rs:171:5:171:15 | ...::stdout(...) | test.rs:169:1:169:7 | Attr | test.rs:171:5:171:15 | ...::stdout(...) | Call to ...::stdout(...) in a function with the ctor attribute. |
|
||||
| test.rs:30:9:30:25 | ...::stdout(...) | test.rs:28:1:28:13 | Attr | test.rs:30:9:30:25 | ...::stdout(...) | Call to ...::stdout(...) in a function with the ctor attribute. |
|
||||
| test.rs:35:9:35:25 | ...::stdout(...) | test.rs:33:1:33:13 | Attr | test.rs:35:9:35:25 | ...::stdout(...) | Call to ...::stdout(...) in a function with the dtor attribute. |
|
||||
| test.rs:42:9:42:25 | ...::stdout(...) | test.rs:39:1:39:13 | Attr | test.rs:42:9:42:25 | ...::stdout(...) | Call to ...::stdout(...) in a function with the dtor attribute. |
|
||||
| test.rs:52:9:52:16 | stdout(...) | test.rs:50:1:50:7 | Attr | test.rs:52:9:52:16 | stdout(...) | Call to stdout(...) in a function with the ctor attribute. |
|
||||
| test.rs:57:9:57:16 | stderr(...) | test.rs:55:1:55:7 | Attr | test.rs:57:9:57:16 | stderr(...) | Call to stderr(...) in a function with the ctor attribute. |
|
||||
| test.rs:62:14:62:28 | ...::_print(...) | test.rs:60:1:60:7 | Attr | test.rs:62:14:62:28 | ...::_print(...) | Call to ...::_print(...) in a function with the ctor attribute. |
|
||||
| test.rs:68:9:68:24 | ...::stdin(...) | test.rs:65:1:65:7 | Attr | test.rs:68:9:68:24 | ...::stdin(...) | Call to ...::stdin(...) in a function with the ctor attribute. |
|
||||
| test.rs:89:5:89:35 | ...::sleep(...) | test.rs:87:1:87:7 | Attr | test.rs:89:5:89:35 | ...::sleep(...) | Call to ...::sleep(...) in a function with the ctor attribute. |
|
||||
| test.rs:96:5:96:23 | ...::exit(...) | test.rs:94:1:94:7 | Attr | test.rs:96:5:96:23 | ...::exit(...) | Call to ...::exit(...) in a function with the ctor attribute. |
|
||||
| test.rs:125:9:125:16 | stderr(...) | test.rs:128:1:128:7 | Attr | test.rs:125:9:125:16 | stderr(...) | Call to stderr(...) in a function with the ctor attribute. |
|
||||
| test.rs:125:9:125:16 | stderr(...) | test.rs:144:1:144:7 | Attr | test.rs:125:9:125:16 | stderr(...) | Call to stderr(...) in a function with the ctor attribute. |
|
||||
| test.rs:125:9:125:16 | stderr(...) | test.rs:150:1:150:7 | Attr | test.rs:125:9:125:16 | stderr(...) | Call to stderr(...) in a function with the ctor attribute. |
|
||||
| test.rs:125:9:125:44 | ... .write_all(...) | test.rs:128:1:128:7 | Attr | test.rs:125:9:125:44 | ... .write_all(...) | Call to ... .write_all(...) in a function with the ctor attribute. |
|
||||
| test.rs:125:9:125:44 | ... .write_all(...) | test.rs:144:1:144:7 | Attr | test.rs:125:9:125:44 | ... .write_all(...) | Call to ... .write_all(...) in a function with the ctor attribute. |
|
||||
| test.rs:125:9:125:44 | ... .write_all(...) | test.rs:150:1:150:7 | Attr | test.rs:125:9:125:44 | ... .write_all(...) | Call to ... .write_all(...) in a function with the ctor attribute. |
|
||||
| test.rs:170:5:170:15 | ...::stdout(...) | test.rs:168:1:168:7 | Attr | test.rs:170:5:170:15 | ...::stdout(...) | Call to ...::stdout(...) in a function with the ctor attribute. |
|
||||
edges
|
||||
| test.rs:29:1:29:13 | Attr | test.rs:29:1:32:1 | fn bad1_1 |
|
||||
| test.rs:29:1:32:1 | fn bad1_1 | test.rs:31:9:31:25 | ...::stdout(...) |
|
||||
| test.rs:34:1:34:13 | Attr | test.rs:34:1:37:1 | fn bad1_2 |
|
||||
| test.rs:34:1:37:1 | fn bad1_2 | test.rs:36:9:36:25 | ...::stdout(...) |
|
||||
| test.rs:39:1:44:1 | fn bad1_3 | test.rs:43:9:43:25 | ...::stdout(...) |
|
||||
| test.rs:40:1:40:13 | Attr | test.rs:39:1:44:1 | fn bad1_3 |
|
||||
| test.rs:51:1:51:7 | Attr | test.rs:51:1:54:1 | fn bad2_1 |
|
||||
| test.rs:51:1:54:1 | fn bad2_1 | test.rs:53:9:53:16 | stdout(...) |
|
||||
| test.rs:56:1:56:7 | Attr | test.rs:56:1:59:1 | fn bad2_2 |
|
||||
| test.rs:56:1:59:1 | fn bad2_2 | test.rs:58:9:58:16 | stderr(...) |
|
||||
| test.rs:61:1:61:7 | Attr | test.rs:61:1:64:1 | fn bad2_3 |
|
||||
| test.rs:61:1:64:1 | fn bad2_3 | test.rs:63:14:63:28 | ...::_print(...) |
|
||||
| test.rs:66:1:66:7 | Attr | test.rs:66:1:70:1 | fn bad2_4 |
|
||||
| test.rs:66:1:70:1 | fn bad2_4 | test.rs:69:9:69:24 | ...::stdin(...) |
|
||||
| test.rs:88:1:88:7 | Attr | test.rs:88:1:91:1 | fn bad2_7 |
|
||||
| test.rs:88:1:91:1 | fn bad2_7 | test.rs:90:5:90:35 | ...::sleep(...) |
|
||||
| test.rs:95:1:95:7 | Attr | test.rs:95:1:98:1 | fn bad2_8 |
|
||||
| test.rs:95:1:98:1 | fn bad2_8 | test.rs:97:5:97:23 | ...::exit(...) |
|
||||
| test.rs:125:1:127:1 | fn call_target3_1 | test.rs:126:9:126:16 | stderr(...) |
|
||||
| test.rs:125:1:127:1 | fn call_target3_1 | test.rs:126:9:126:44 | ... .write_all(...) |
|
||||
| test.rs:129:1:129:7 | Attr | test.rs:129:1:132:1 | fn bad3_1 |
|
||||
| test.rs:129:1:132:1 | fn bad3_1 | test.rs:131:5:131:20 | call_target3_1(...) |
|
||||
| test.rs:131:5:131:20 | call_target3_1(...) | test.rs:125:1:127:1 | fn call_target3_1 |
|
||||
| test.rs:145:1:145:7 | Attr | test.rs:145:1:149:1 | fn bad3_3 |
|
||||
| test.rs:145:1:149:1 | fn bad3_3 | test.rs:147:5:147:20 | call_target3_1(...) |
|
||||
| test.rs:147:5:147:20 | call_target3_1(...) | test.rs:125:1:127:1 | fn call_target3_1 |
|
||||
| test.rs:169:1:169:7 | Attr | test.rs:169:1:172:1 | fn bad4_1 |
|
||||
| test.rs:169:1:172:1 | fn bad4_1 | test.rs:171:5:171:15 | ...::stdout(...) |
|
||||
| test.rs:28:1:28:13 | Attr | test.rs:28:1:31:1 | fn bad1_1 |
|
||||
| test.rs:28:1:31:1 | fn bad1_1 | test.rs:30:9:30:25 | ...::stdout(...) |
|
||||
| test.rs:33:1:33:13 | Attr | test.rs:33:1:36:1 | fn bad1_2 |
|
||||
| test.rs:33:1:36:1 | fn bad1_2 | test.rs:35:9:35:25 | ...::stdout(...) |
|
||||
| test.rs:38:1:43:1 | fn bad1_3 | test.rs:42:9:42:25 | ...::stdout(...) |
|
||||
| test.rs:39:1:39:13 | Attr | test.rs:38:1:43:1 | fn bad1_3 |
|
||||
| test.rs:50:1:50:7 | Attr | test.rs:50:1:53:1 | fn bad2_1 |
|
||||
| test.rs:50:1:53:1 | fn bad2_1 | test.rs:52:9:52:16 | stdout(...) |
|
||||
| test.rs:55:1:55:7 | Attr | test.rs:55:1:58:1 | fn bad2_2 |
|
||||
| test.rs:55:1:58:1 | fn bad2_2 | test.rs:57:9:57:16 | stderr(...) |
|
||||
| test.rs:60:1:60:7 | Attr | test.rs:60:1:63:1 | fn bad2_3 |
|
||||
| test.rs:60:1:63:1 | fn bad2_3 | test.rs:62:14:62:28 | ...::_print(...) |
|
||||
| test.rs:65:1:65:7 | Attr | test.rs:65:1:69:1 | fn bad2_4 |
|
||||
| test.rs:65:1:69:1 | fn bad2_4 | test.rs:68:9:68:24 | ...::stdin(...) |
|
||||
| test.rs:87:1:87:7 | Attr | test.rs:87:1:90:1 | fn bad2_7 |
|
||||
| test.rs:87:1:90:1 | fn bad2_7 | test.rs:89:5:89:35 | ...::sleep(...) |
|
||||
| test.rs:94:1:94:7 | Attr | test.rs:94:1:97:1 | fn bad2_8 |
|
||||
| test.rs:94:1:97:1 | fn bad2_8 | test.rs:96:5:96:23 | ...::exit(...) |
|
||||
| test.rs:124:1:126:1 | fn call_target3_1 | test.rs:125:9:125:16 | stderr(...) |
|
||||
| test.rs:124:1:126:1 | fn call_target3_1 | test.rs:125:9:125:44 | ... .write_all(...) |
|
||||
| test.rs:128:1:128:7 | Attr | test.rs:128:1:131:1 | fn bad3_1 |
|
||||
| test.rs:128:1:131:1 | fn bad3_1 | test.rs:130:5:130:20 | call_target3_1(...) |
|
||||
| test.rs:130:5:130:20 | call_target3_1(...) | test.rs:124:1:126:1 | fn call_target3_1 |
|
||||
| test.rs:144:1:144:7 | Attr | test.rs:144:1:148:1 | fn bad3_3 |
|
||||
| test.rs:144:1:148:1 | fn bad3_3 | test.rs:146:5:146:20 | call_target3_1(...) |
|
||||
| test.rs:146:5:146:20 | call_target3_1(...) | test.rs:124:1:126:1 | fn call_target3_1 |
|
||||
| test.rs:150:1:150:7 | Attr | test.rs:150:1:153:1 | fn bad3_4 |
|
||||
| test.rs:150:1:153:1 | fn bad3_4 | test.rs:152:5:152:12 | bad3_3(...) |
|
||||
| test.rs:152:5:152:12 | bad3_3(...) | test.rs:144:1:148:1 | fn bad3_3 |
|
||||
| test.rs:168:1:168:7 | Attr | test.rs:168:1:171:1 | fn bad4_1 |
|
||||
| test.rs:168:1:171:1 | fn bad4_1 | test.rs:170:5:170:15 | ...::stdout(...) |
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
// --- attribute variants ---
|
||||
|
||||
use std::io::Write;
|
||||
@@ -123,7 +122,7 @@ unsafe fn harmless2_11() {
|
||||
// --- transitive cases ---
|
||||
|
||||
fn call_target3_1() {
|
||||
_ = stderr().write_all(b"Hello, world!"); // $ Alert=source3_1 Alert=source3_3 MISSING: Alert=source3_4
|
||||
_ = stderr().write_all(b"Hello, world!"); // $ Alert=source3_1 Alert=source3_3 Alert=source3_4
|
||||
}
|
||||
|
||||
#[ctor] // $ Source=source3_1
|
||||
@@ -148,7 +147,7 @@ fn bad3_3() {
|
||||
call_target3_2();
|
||||
}
|
||||
|
||||
#[ctor] // $ MISSING: Source=source3_4
|
||||
#[ctor] // $ Source=source3_4
|
||||
fn bad3_4() {
|
||||
bad3_3();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
unexpectedModel
|
||||
expectedModel
|
||||
@@ -0,0 +1,11 @@
|
||||
import rust
|
||||
import utils.modelgenerator.internal.CaptureModels
|
||||
import utils.test.InlineMadTest
|
||||
|
||||
module InlineMadTestConfig implements InlineMadTestConfigSig {
|
||||
string getCapturedModel(Function c) { result = ContentSensitive::captureFlow(c, _) }
|
||||
|
||||
string getKind() { result = "summary" }
|
||||
}
|
||||
|
||||
import InlineMadTest<InlineMadTestConfig>
|
||||
512
rust/ql/test/utils-tests/modelgenerator/option.rs
Normal file
512
rust/ql/test/utils-tests/modelgenerator/option.rs
Normal file
@@ -0,0 +1,512 @@
|
||||
// This code below is adapted from the `Option` implementation in the Rust core library which is
|
||||
// released under the MIT licenses with the following copyright notice:
|
||||
//
|
||||
// Copyright (c) The Rust Project Contributors
|
||||
|
||||
use core::ops::{Deref, DerefMut};
|
||||
use core::pin::Pin;
|
||||
use core::{hint, mem};
|
||||
|
||||
#[derive(Copy, Eq, Debug, Hash)]
|
||||
pub enum MyOption<T> {
|
||||
MyNone,
|
||||
MySome(T),
|
||||
}
|
||||
|
||||
use MyOption::*;
|
||||
|
||||
// Type implementation
|
||||
|
||||
impl<T> MyOption<T> {
|
||||
pub fn is_some(&self) -> bool {
|
||||
matches!(*self, MySome(_))
|
||||
}
|
||||
|
||||
// summary=repo::test;<crate::option::MyOption>::is_some_and;Argument[0].ReturnValue;ReturnValue;value;dfc-generated
|
||||
// summary=repo::test;<crate::option::MyOption>::is_some_and;Argument[self].Variant[crate::option::MyOption::MySome(0)];Argument[0].Parameter[0];value;dfc-generated
|
||||
pub fn is_some_and(self, f: impl FnOnce(T) -> bool) -> bool {
|
||||
match self {
|
||||
MyNone => false,
|
||||
MySome(x) => f(x),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn is_none(&self) -> bool {
|
||||
!self.is_some()
|
||||
}
|
||||
|
||||
// summary=repo::test;<crate::option::MyOption>::is_none_or;Argument[0].ReturnValue;ReturnValue;value;dfc-generated
|
||||
// summary=repo::test;<crate::option::MyOption>::is_none_or;Argument[self].Variant[crate::option::MyOption::MySome(0)];Argument[0].Parameter[0];value;dfc-generated
|
||||
pub fn is_none_or(self, f: impl FnOnce(T) -> bool) -> bool {
|
||||
match self {
|
||||
MyNone => true,
|
||||
MySome(x) => f(x),
|
||||
}
|
||||
}
|
||||
|
||||
// summary=repo::test;<crate::option::MyOption>::as_ref;Argument[self].Variant[crate::option::MyOption::MySome(0)];ReturnValue.Variant[crate::option::MyOption::MySome(0)];value;dfc-generated
|
||||
pub fn as_ref(&self) -> MyOption<&T> {
|
||||
match *self {
|
||||
MySome(ref x) => MySome(x),
|
||||
MyNone => MyNone,
|
||||
}
|
||||
}
|
||||
|
||||
// summary=repo::test;<crate::option::MyOption>::as_mut;Argument[self].Variant[crate::option::MyOption::MySome(0)];ReturnValue.Variant[crate::option::MyOption::MySome(0)];value;dfc-generated
|
||||
pub fn as_mut(&mut self) -> MyOption<&mut T> {
|
||||
match *self {
|
||||
MySome(ref mut x) => MySome(x),
|
||||
MyNone => MyNone,
|
||||
}
|
||||
}
|
||||
|
||||
// MISSING: Flow through `Pin`
|
||||
pub fn as_pin_ref(self: Pin<&Self>) -> MyOption<Pin<&T>> {
|
||||
// FIXME(const-hack): use `map` once that is possible
|
||||
match Pin::get_ref(self).as_ref() {
|
||||
// SAFETY: `x` is guaranteed to be pinned because it comes from `self`
|
||||
// which is pinned.
|
||||
MySome(x) => unsafe { MySome(Pin::new_unchecked(x)) },
|
||||
MyNone => MyNone,
|
||||
}
|
||||
}
|
||||
|
||||
// MISSING: Flow through `Pin`
|
||||
pub fn as_pin_mut(self: Pin<&mut Self>) -> MyOption<Pin<&mut T>> {
|
||||
// SAFETY: `get_unchecked_mut` is never used to move the `MyOption` inside `self`.
|
||||
// `x` is guaranteed to be pinned because it comes from `self` which is pinned.
|
||||
unsafe {
|
||||
// FIXME(const-hack): use `map` once that is possible
|
||||
match Pin::get_unchecked_mut(self).as_mut() {
|
||||
MySome(x) => MySome(Pin::new_unchecked(x)),
|
||||
MyNone => MyNone,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// summary=repo::test;<crate::option::MyOption>::unwrap;Argument[self].Variant[crate::option::MyOption::MySome(0)];ReturnValue;value;dfc-generated
|
||||
pub fn unwrap(self) -> T {
|
||||
match self {
|
||||
MySome(val) => val,
|
||||
MyNone => panic!("called `MyOption::unwrap()` on a `MyNone` value"),
|
||||
}
|
||||
}
|
||||
|
||||
// summary=repo::test;<crate::option::MyOption>::unwrap_or;Argument[0];ReturnValue;value;dfc-generated
|
||||
// summary=repo::test;<crate::option::MyOption>::unwrap_or;Argument[self].Variant[crate::option::MyOption::MySome(0)];ReturnValue;value;dfc-generated
|
||||
pub fn unwrap_or(self, default: T) -> T {
|
||||
match self {
|
||||
MySome(x) => x,
|
||||
MyNone => default,
|
||||
}
|
||||
}
|
||||
|
||||
// summary=repo::test;<crate::option::MyOption>::unwrap_or_else;Argument[self].Variant[crate::option::MyOption::MySome(0)];ReturnValue;value;dfc-generated
|
||||
// summary=repo::test;<crate::option::MyOption>::unwrap_or_else;Argument[0].ReturnValue;ReturnValue;value;dfc-generated
|
||||
pub fn unwrap_or_else<F>(self, f: F) -> T
|
||||
where
|
||||
F: FnOnce() -> T,
|
||||
{
|
||||
match self {
|
||||
MySome(x) => x,
|
||||
MyNone => f(),
|
||||
}
|
||||
}
|
||||
|
||||
// summary=repo::test;<crate::option::MyOption>::unwrap_or_default;Argument[self].Variant[crate::option::MyOption::MySome(0)];ReturnValue;value;dfc-generated
|
||||
pub fn unwrap_or_default(self) -> T
|
||||
where
|
||||
T: Default,
|
||||
{
|
||||
match self {
|
||||
MySome(x) => x,
|
||||
MyNone => T::default(),
|
||||
}
|
||||
}
|
||||
// summary=repo::test;<crate::option::MyOption>::unwrap_unchecked;Argument[self].Variant[crate::option::MyOption::MySome(0)];ReturnValue;value;dfc-generated
|
||||
#[track_caller]
|
||||
pub unsafe fn unwrap_unchecked(self) -> T {
|
||||
match self {
|
||||
MySome(val) => val,
|
||||
// SAFETY: the safety contract must be upheld by the caller.
|
||||
MyNone => unsafe { hint::unreachable_unchecked() },
|
||||
}
|
||||
}
|
||||
|
||||
// Transforming contained values
|
||||
|
||||
// summary=repo::test;<crate::option::MyOption>::map;Argument[0].ReturnValue;ReturnValue.Variant[crate::option::MyOption::MySome(0)];value;dfc-generated
|
||||
// summary=repo::test;<crate::option::MyOption>::map;Argument[self].Variant[crate::option::MyOption::MySome(0)];Argument[0].Parameter[0];value;dfc-generated
|
||||
pub fn map<U, F>(self, f: F) -> MyOption<U>
|
||||
where
|
||||
F: FnOnce(T) -> U,
|
||||
{
|
||||
match self {
|
||||
MySome(x) => MySome(f(x)),
|
||||
MyNone => MyNone,
|
||||
}
|
||||
}
|
||||
|
||||
// summary=repo::test;<crate::option::MyOption>::inspect;Argument[self];ReturnValue;value;dfc-generated
|
||||
// MISSING: Due to `ref` pattern.
|
||||
pub fn inspect<F: FnOnce(&T)>(self, f: F) -> Self {
|
||||
if let MySome(ref x) = self {
|
||||
f(x);
|
||||
}
|
||||
|
||||
self
|
||||
}
|
||||
|
||||
// summary=repo::test;<crate::option::MyOption>::map_or;Argument[0];ReturnValue;value;dfc-generated
|
||||
// summary=repo::test;<crate::option::MyOption>::map_or;Argument[1].ReturnValue;ReturnValue;value;dfc-generated
|
||||
// summary=repo::test;<crate::option::MyOption>::map_or;Argument[self].Variant[crate::option::MyOption::MySome(0)];Argument[1].Parameter[0];value;dfc-generated
|
||||
pub fn map_or<U, F>(self, default: U, f: F) -> U
|
||||
where
|
||||
F: FnOnce(T) -> U,
|
||||
{
|
||||
match self {
|
||||
MySome(t) => f(t),
|
||||
MyNone => default,
|
||||
}
|
||||
}
|
||||
|
||||
// summary=repo::test;<crate::option::MyOption>::map_or_else;Argument[0].ReturnValue;ReturnValue;value;dfc-generated
|
||||
// summary=repo::test;<crate::option::MyOption>::map_or_else;Argument[1].ReturnValue;ReturnValue;value;dfc-generated
|
||||
// summary=repo::test;<crate::option::MyOption>::map_or_else;Argument[self].Variant[crate::option::MyOption::MySome(0)];Argument[1].Parameter[0];value;dfc-generated
|
||||
pub fn map_or_else<U, D, F>(self, default: D, f: F) -> U
|
||||
where
|
||||
D: FnOnce() -> U,
|
||||
F: FnOnce(T) -> U,
|
||||
{
|
||||
match self {
|
||||
MySome(t) => f(t),
|
||||
MyNone => default(),
|
||||
}
|
||||
}
|
||||
|
||||
// summary=repo::test;<crate::option::MyOption>::ok_or;Argument[self].Variant[crate::option::MyOption::MySome(0)];ReturnValue.Variant[crate::result::Result::Ok(0)];value;dfc-generated
|
||||
// summary=repo::test;<crate::option::MyOption>::ok_or;Argument[0];ReturnValue.Variant[crate::result::Result::Err(0)];value;dfc-generated
|
||||
pub fn ok_or<E>(self, err: E) -> Result<T, E> {
|
||||
match self {
|
||||
MySome(v) => Ok(v),
|
||||
MyNone => Err(err),
|
||||
}
|
||||
}
|
||||
|
||||
// summary=repo::test;<crate::option::MyOption>::ok_or_else;Argument[self].Variant[crate::option::MyOption::MySome(0)];ReturnValue.Variant[crate::result::Result::Ok(0)];value;dfc-generated
|
||||
// summary=repo::test;<crate::option::MyOption>::ok_or_else;Argument[0].ReturnValue;ReturnValue.Variant[crate::result::Result::Err(0)];value;dfc-generated
|
||||
pub fn ok_or_else<E, F>(self, err: F) -> Result<T, E>
|
||||
where
|
||||
F: FnOnce() -> E,
|
||||
{
|
||||
match self {
|
||||
MySome(v) => Ok(v),
|
||||
MyNone => Err(err()),
|
||||
}
|
||||
}
|
||||
|
||||
// MISSING: `Deref` trait
|
||||
pub fn as_deref(&self) -> MyOption<&T::Target>
|
||||
where
|
||||
T: Deref,
|
||||
{
|
||||
self.as_ref().map(|t| t.deref())
|
||||
}
|
||||
|
||||
// MISSING: `Deref` trait
|
||||
pub fn as_deref_mut(&mut self) -> MyOption<&mut T::Target>
|
||||
where
|
||||
T: DerefMut,
|
||||
{
|
||||
self.as_mut().map(|t| t.deref_mut())
|
||||
}
|
||||
|
||||
// summary=repo::test;<crate::option::MyOption>::and;Argument[0];ReturnValue;value;dfc-generated
|
||||
pub fn and<U>(self, optb: MyOption<U>) -> MyOption<U> {
|
||||
match self {
|
||||
MySome(_) => optb,
|
||||
MyNone => MyNone,
|
||||
}
|
||||
}
|
||||
|
||||
// summary=repo::test;<crate::option::MyOption>::and_then;Argument[0].ReturnValue;ReturnValue;value;dfc-generated
|
||||
// summary=repo::test;<crate::option::MyOption>::and_then;Argument[self].Variant[crate::option::MyOption::MySome(0)];Argument[0].Parameter[0];value;dfc-generated
|
||||
pub fn and_then<U, F>(self, f: F) -> MyOption<U>
|
||||
where
|
||||
F: FnOnce(T) -> MyOption<U>,
|
||||
{
|
||||
match self {
|
||||
MySome(x) => f(x),
|
||||
MyNone => MyNone,
|
||||
}
|
||||
}
|
||||
|
||||
// MISSING: Reference passed to predicate
|
||||
pub fn filter<P>(self, predicate: P) -> Self
|
||||
where
|
||||
P: FnOnce(&T) -> bool,
|
||||
{
|
||||
if let MySome(x) = self {
|
||||
if predicate(&x) {
|
||||
return MySome(x);
|
||||
}
|
||||
}
|
||||
MyNone
|
||||
}
|
||||
|
||||
// summary=repo::test;<crate::option::MyOption>::or;Argument[0];ReturnValue;value;dfc-generated
|
||||
// summary=repo::test;<crate::option::MyOption>::or;Argument[self];ReturnValue;value;dfc-generated
|
||||
pub fn or(self, optb: MyOption<T>) -> MyOption<T> {
|
||||
match self {
|
||||
x @ MySome(_) => x,
|
||||
MyNone => optb,
|
||||
}
|
||||
}
|
||||
|
||||
// summary=repo::test;<crate::option::MyOption>::or_else;Argument[self];ReturnValue;value;dfc-generated
|
||||
// summary=repo::test;<crate::option::MyOption>::or_else;Argument[0].ReturnValue;ReturnValue;value;dfc-generated
|
||||
pub fn or_else<F>(self, f: F) -> MyOption<T>
|
||||
where
|
||||
F: FnOnce() -> MyOption<T>,
|
||||
{
|
||||
match self {
|
||||
x @ MySome(_) => x,
|
||||
MyNone => f(),
|
||||
}
|
||||
}
|
||||
|
||||
// summary=repo::test;<crate::option::MyOption>::xor;Argument[0];ReturnValue;value;dfc-generated
|
||||
// summary=repo::test;<crate::option::MyOption>::xor;Argument[self];ReturnValue;value;dfc-generated
|
||||
pub fn xor(self, optb: MyOption<T>) -> MyOption<T> {
|
||||
match (self, optb) {
|
||||
(a @ MySome(_), MyNone) => a,
|
||||
(MyNone, b @ MySome(_)) => b,
|
||||
_ => MyNone,
|
||||
}
|
||||
}
|
||||
|
||||
// MISSING: summary=repo::test;<crate::option::MyOption>::insert;Argument[0];ReturnValue;value;dfc-generated
|
||||
// SPURIOUS-summary=repo::test;<crate::option::MyOption>::insert;Argument[self].Variant[crate::option::MyOption::MySome(0)];ReturnValue;value;dfc-generated
|
||||
pub fn insert(&mut self, value: T) -> &mut T {
|
||||
*self = MySome(value);
|
||||
|
||||
// SAFETY: the code above just filled the MyOption
|
||||
unsafe { self.as_mut().unwrap_unchecked() }
|
||||
}
|
||||
|
||||
// summary=repo::test;<crate::option::MyOption>::get_or_insert;Argument[self].Variant[crate::option::MyOption::MySome(0)];ReturnValue;value;dfc-generated
|
||||
// MISSING: repo::test;<crate::option::MyOption>::get_or_insert;Argument[0];ReturnValue;value;dfc-generated
|
||||
pub fn get_or_insert(&mut self, value: T) -> &mut T {
|
||||
self.get_or_insert_with(|| value)
|
||||
}
|
||||
|
||||
// summary=repo::test;<crate::option::MyOption>::get_or_insert_default;Argument[self].Variant[crate::option::MyOption::MySome(0)];ReturnValue;value;dfc-generated
|
||||
pub fn get_or_insert_default(&mut self) -> &mut T
|
||||
where
|
||||
T: Default,
|
||||
{
|
||||
self.get_or_insert_with(T::default)
|
||||
}
|
||||
|
||||
// summary=repo::test;<crate::option::MyOption>::get_or_insert_with;Argument[self].Variant[crate::option::MyOption::MySome(0)];ReturnValue;value;dfc-generated
|
||||
// MISSING: Mutating `self` parameter.
|
||||
pub fn get_or_insert_with<F>(&mut self, f: F) -> &mut T
|
||||
where
|
||||
F: FnOnce() -> T,
|
||||
{
|
||||
if let MyNone = self {
|
||||
*self = MySome(f());
|
||||
}
|
||||
|
||||
// SAFETY: a `MyNone` variant for `self` would have been replaced by a `MySome`
|
||||
// variant in the code above.
|
||||
unsafe { self.as_mut().unwrap_unchecked() }
|
||||
}
|
||||
|
||||
// MISSING: Uses `mem::replace`
|
||||
pub fn take(&mut self) -> MyOption<T> {
|
||||
// FIXME(const-hack) replace `mem::replace` by `mem::take` when the latter is const ready
|
||||
mem::replace(self, MyNone)
|
||||
}
|
||||
|
||||
// summary=repo::test;<crate::option::MyOption>::take_if;Argument[self].Variant[crate::option::MyOption::MySome(0)];Argument[0].Parameter[0];value;dfc-generated
|
||||
// MISSING: Uses `take` which doesn't have flow
|
||||
pub fn take_if<P>(&mut self, predicate: P) -> MyOption<T>
|
||||
where
|
||||
P: FnOnce(&mut T) -> bool,
|
||||
{
|
||||
if self.as_mut().map_or(false, predicate) { self.take() } else { MyNone }
|
||||
}
|
||||
|
||||
// MISSING: Uses `mem::replace`
|
||||
pub fn replace(&mut self, value: T) -> MyOption<T> {
|
||||
mem::replace(self, MySome(value))
|
||||
}
|
||||
|
||||
// summary=repo::test;<crate::option::MyOption>::zip;Argument[0].Variant[crate::option::MyOption::MySome(0)];ReturnValue.Variant[crate::option::MyOption::MySome(0)].Tuple[1];value;dfc-generated
|
||||
// summary=repo::test;<crate::option::MyOption>::zip;Argument[self].Variant[crate::option::MyOption::MySome(0)];ReturnValue.Variant[crate::option::MyOption::MySome(0)].Tuple[0];value;dfc-generated
|
||||
pub fn zip<U>(self, other: MyOption<U>) -> MyOption<(T, U)> {
|
||||
match (self, other) {
|
||||
(MySome(a), MySome(b)) => MySome((a, b)),
|
||||
_ => MyNone,
|
||||
}
|
||||
}
|
||||
|
||||
// summary=repo::test;<crate::option::MyOption>::zip_with;Argument[self].Variant[crate::option::MyOption::MySome(0)];Argument[1].Parameter[0];value;dfc-generated
|
||||
// summary=repo::test;<crate::option::MyOption>::zip_with;Argument[0].Variant[crate::option::MyOption::MySome(0)];Argument[1].Parameter[1];value;dfc-generated
|
||||
// summary=repo::test;<crate::option::MyOption>::zip_with;Argument[1].ReturnValue;ReturnValue.Variant[crate::option::MyOption::MySome(0)];value;dfc-generated
|
||||
pub fn zip_with<U, F, R>(self, other: MyOption<U>, f: F) -> MyOption<R>
|
||||
where
|
||||
F: FnOnce(T, U) -> R,
|
||||
{
|
||||
match (self, other) {
|
||||
(MySome(a), MySome(b)) => MySome(f(a, b)),
|
||||
_ => MyNone,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<T, U> MyOption<(T, U)> {
|
||||
// summary=repo::test;<crate::option::MyOption>::unzip;Argument[self].Variant[crate::option::MyOption::MySome(0)].Tuple[0];ReturnValue.Tuple[0].Variant[crate::option::MyOption::MySome(0)];value;dfc-generated
|
||||
// summary=repo::test;<crate::option::MyOption>::unzip;Argument[self].Variant[crate::option::MyOption::MySome(0)].Tuple[1];ReturnValue.Tuple[1].Variant[crate::option::MyOption::MySome(0)];value;dfc-generated
|
||||
pub fn unzip(self) -> (MyOption<T>, MyOption<U>) {
|
||||
match self {
|
||||
MySome((a, b)) => (MySome(a), MySome(b)),
|
||||
MyNone => (MyNone, MyNone),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<T> MyOption<&T> {
|
||||
// summary=repo::test;<crate::option::MyOption>::copied;Argument[self].Variant[crate::option::MyOption::MySome(0)];ReturnValue.Variant[crate::option::MyOption::MySome(0)];value;dfc-generated
|
||||
pub fn copied(self) -> MyOption<T>
|
||||
where
|
||||
T: Copy,
|
||||
{
|
||||
// FIXME(const-hack): this implementation, which sidesteps using `MyOption::map` since it's not const
|
||||
// ready yet, should be reverted when possible to avoid code repetition
|
||||
match self {
|
||||
MySome(&v) => MySome(v),
|
||||
MyNone => MyNone,
|
||||
}
|
||||
}
|
||||
|
||||
// summary=repo::test;<crate::option::MyOption>::cloned;Argument[self].Variant[crate::option::MyOption::MySome(0)];ReturnValue.Variant[crate::option::MyOption::MySome(0)];value;dfc-generated
|
||||
pub fn cloned(self) -> MyOption<T>
|
||||
where
|
||||
T: Clone,
|
||||
{
|
||||
match self {
|
||||
MySome(t) => MySome(t.clone()),
|
||||
MyNone => MyNone,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<T> MyOption<&mut T> {
|
||||
// summary=repo::test;<crate::option::MyOption>::copied;Argument[self].Variant[crate::option::MyOption::MySome(0)];ReturnValue.Variant[crate::option::MyOption::MySome(0)];value;dfc-generated
|
||||
pub fn copied(self) -> MyOption<T>
|
||||
where
|
||||
T: Copy,
|
||||
{
|
||||
match self {
|
||||
MySome(&mut t) => MySome(t),
|
||||
MyNone => MyNone,
|
||||
}
|
||||
}
|
||||
|
||||
// summary=repo::test;<crate::option::MyOption>::cloned;Argument[self].Variant[crate::option::MyOption::MySome(0)];ReturnValue.Variant[crate::option::MyOption::MySome(0)];value;dfc-generated
|
||||
pub fn cloned(self) -> MyOption<T>
|
||||
where
|
||||
T: Clone,
|
||||
{
|
||||
match self {
|
||||
MySome(t) => MySome(t.clone()),
|
||||
MyNone => MyNone,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<T, E> MyOption<Result<T, E>> {
|
||||
// summary=repo::test;<crate::option::MyOption>::transpose;Argument[self].Variant[crate::option::MyOption::MySome(0)].Variant[crate::result::Result::Err(0)];ReturnValue.Variant[crate::result::Result::Err(0)];value;dfc-generated
|
||||
// summary=repo::test;<crate::option::MyOption>::transpose;Argument[self].Variant[crate::option::MyOption::MySome(0)].Variant[crate::result::Result::Ok(0)];ReturnValue.Variant[crate::result::Result::Ok(0)].Variant[crate::option::MyOption::MySome(0)];value;dfc-generated
|
||||
pub fn transpose(self) -> Result<MyOption<T>, E> {
|
||||
match self {
|
||||
MySome(Ok(x)) => Ok(MySome(x)),
|
||||
MySome(Err(e)) => Err(e),
|
||||
MyNone => Ok(MyNone),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<T> Clone for MyOption<T>
|
||||
where
|
||||
T: Clone,
|
||||
{
|
||||
// summary=repo::test;<crate::option::MyOption as crate::clone::Clone>::clone;Argument[self].Variant[crate::option::MyOption::MySome(0)];ReturnValue.Variant[crate::option::MyOption::MySome(0)];value;dfc-generated
|
||||
fn clone(&self) -> Self {
|
||||
match self {
|
||||
MySome(x) => MySome(x.clone()),
|
||||
MyNone => MyNone,
|
||||
}
|
||||
}
|
||||
|
||||
// MISSING: Flow through `clone_from` trait method which is not modeled.
|
||||
fn clone_from(&mut self, source: &Self) {
|
||||
match (self, source) {
|
||||
(MySome(to), MySome(from)) => to.clone_from(from),
|
||||
(to, from) => *to = from.clone(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<T> Default for MyOption<T> {
|
||||
fn default() -> MyOption<T> {
|
||||
MyNone
|
||||
}
|
||||
}
|
||||
|
||||
impl<T> From<T> for MyOption<T> {
|
||||
// summary=repo::test;<crate::option::MyOption as crate::convert::From>::from;Argument[0];ReturnValue.Variant[crate::option::MyOption::MySome(0)];value;dfc-generated
|
||||
fn from(val: T) -> MyOption<T> {
|
||||
MySome(val)
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a, T> From<&'a MyOption<T>> for MyOption<&'a T> {
|
||||
// summary=repo::test;<crate::option::MyOption as crate::convert::From>::from;Argument[0].Variant[crate::option::MyOption::MySome(0)];ReturnValue.Variant[crate::option::MyOption::MySome(0)];value;dfc-generated
|
||||
fn from(o: &'a MyOption<T>) -> MyOption<&'a T> {
|
||||
o.as_ref()
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a, T> From<&'a mut MyOption<T>> for MyOption<&'a mut T> {
|
||||
// summary=repo::test;<crate::option::MyOption as crate::convert::From>::from;Argument[0].Variant[crate::option::MyOption::MySome(0)];ReturnValue.Variant[crate::option::MyOption::MySome(0)];value;dfc-generated
|
||||
fn from(o: &'a mut MyOption<T>) -> MyOption<&'a mut T> {
|
||||
o.as_mut()
|
||||
}
|
||||
}
|
||||
|
||||
impl<T: PartialEq> PartialEq for MyOption<T> {
|
||||
fn eq(&self, other: &Self) -> bool {
|
||||
// Spelling out the cases explicitly optimizes better than
|
||||
// `_ => false`
|
||||
match (self, other) {
|
||||
(MySome(l), MySome(r)) => *l == *r,
|
||||
(MySome(_), MyNone) => false,
|
||||
(MyNone, MySome(_)) => false,
|
||||
(MyNone, MyNone) => true,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<T> MyOption<MyOption<T>> {
|
||||
// summary=repo::test;<crate::option::MyOption>::flatten;Argument[self].Variant[crate::option::MyOption::MySome(0)];ReturnValue;value;dfc-generated
|
||||
pub fn flatten(self) -> MyOption<T> {
|
||||
// FIXME(const-hack): could be written with `and_then`
|
||||
match self {
|
||||
MySome(inner) => inner,
|
||||
MyNone => MyNone,
|
||||
}
|
||||
}
|
||||
}
|
||||
78
rust/ql/test/utils-tests/modelgenerator/summaries.rs
Normal file
78
rust/ql/test/utils-tests/modelgenerator/summaries.rs
Normal file
@@ -0,0 +1,78 @@
|
||||
// summary=repo::test;crate::summaries::identity;Argument[0];ReturnValue;value;dfc-generated
|
||||
pub fn identity<A>(a: A) -> A {
|
||||
a
|
||||
}
|
||||
|
||||
// no summary since this function is not public.
|
||||
fn identity_unexported<A>(a: A) -> A {
|
||||
a
|
||||
}
|
||||
|
||||
pub enum Either<A, B> {
|
||||
Left(A),
|
||||
Right(B),
|
||||
}
|
||||
|
||||
use Either::*;
|
||||
|
||||
impl<A, B> Either<A, B> {
|
||||
// summary=repo::test;<crate::summaries::Either>::new;Argument[0];ReturnValue.Variant[crate::summaries::Either::Right(0)];value;dfc-generated
|
||||
pub fn new(b: B) -> Self {
|
||||
Right(b)
|
||||
}
|
||||
|
||||
// summary=repo::test;<crate::summaries::Either>::unwrap;Argument[self].Variant[crate::summaries::Either::Right(0)];ReturnValue;value;dfc-generated
|
||||
pub fn unwrap(self) -> B {
|
||||
match self {
|
||||
Left(a) => panic!("Left cannot be unwrapped"),
|
||||
Right(b) => b,
|
||||
}
|
||||
}
|
||||
|
||||
// summary=repo::test;<crate::summaries::Either>::zip;Argument[0].Variant[crate::summaries::Either::Left(0)];ReturnValue.Variant[crate::summaries::Either::Left(0)];value;dfc-generated
|
||||
// summary=repo::test;<crate::summaries::Either>::zip;Argument[0].Variant[crate::summaries::Either::Right(0)];ReturnValue.Variant[crate::summaries::Either::Right(0)].Tuple[1];value;dfc-generated
|
||||
// summary=repo::test;<crate::summaries::Either>::zip;Argument[self].Variant[crate::summaries::Either::Left(0)];ReturnValue.Variant[crate::summaries::Either::Left(0)];value;dfc-generated
|
||||
// summary=repo::test;<crate::summaries::Either>::zip;Argument[self].Variant[crate::summaries::Either::Right(0)];ReturnValue.Variant[crate::summaries::Either::Right(0)].Tuple[0];value;dfc-generated
|
||||
pub fn zip<C>(self, other: Either<A, C>) -> Either<A, (B, C)> {
|
||||
match (self, other) {
|
||||
(Right(b), Right(d)) => Right((b, d)),
|
||||
(Left(a), _) => Left(a),
|
||||
(_, Left(a)) => Left(a),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct MyStruct {
|
||||
foo: i64,
|
||||
bar: f64,
|
||||
}
|
||||
|
||||
impl MyStruct {
|
||||
// summary=repo::test;<crate::summaries::MyStruct>::new;Argument[0];ReturnValue.Struct[crate::summaries::MyStruct::foo];value;dfc-generated
|
||||
// summary=repo::test;<crate::summaries::MyStruct>::new;Argument[1];ReturnValue.Struct[crate::summaries::MyStruct::bar];value;dfc-generated
|
||||
pub fn new(a: i64, b: f64) -> MyStruct {
|
||||
MyStruct { foo: a, bar: b }
|
||||
}
|
||||
|
||||
// summary=repo::test;<crate::summaries::MyStruct>::get_foo;Argument[self].Struct[crate::summaries::MyStruct::foo];ReturnValue;value;dfc-generated
|
||||
pub fn get_foo(self) -> i64 {
|
||||
match self {
|
||||
MyStruct { foo, bar: _ } => foo,
|
||||
}
|
||||
}
|
||||
|
||||
// summary=repo::test;<crate::summaries::MyStruct>::get_bar;Argument[self].Struct[crate::summaries::MyStruct::bar];ReturnValue;value;dfc-generated
|
||||
pub fn get_bar(self) -> f64 {
|
||||
match self {
|
||||
MyStruct { foo: _, bar } => bar,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Higher-order functions
|
||||
|
||||
// summary=repo::test;crate::summaries::apply;Argument[0];Argument[1].Parameter[0];value;dfc-generated
|
||||
// summary=repo::test;crate::summaries::apply;Argument[1].ReturnValue;ReturnValue;value;dfc-generated
|
||||
pub fn apply<F>(n: i64, f: F) -> i64 where F : FnOnce(i64) -> i64 {
|
||||
f(n)
|
||||
}
|
||||
Reference in New Issue
Block a user