diff --git a/rust/ql/lib/codeql/rust/dataflow/internal/DataFlowImpl.qll b/rust/ql/lib/codeql/rust/dataflow/internal/DataFlowImpl.qll index 0c116ee03e52..f718afa4887d 100644 --- a/rust/ql/lib/codeql/rust/dataflow/internal/DataFlowImpl.qll +++ b/rust/ql/lib/codeql/rust/dataflow/internal/DataFlowImpl.qll @@ -860,6 +860,17 @@ module RustDataFlow implements InputSig { node instanceof Node::ClosureParameterNode } + predicate neverSkipInPathGraph(Node node) { + node.getCfgNode() = any(LetStmtCfgNode s).getPat() + or + node.getCfgNode() = any(AssignmentExprCfgNode a).getLhs() + or + exists(MatchExprCfgNode match | + node.asExpr() = match.getScrutinee() or + node.asExpr() = match.getArmPat(_) + ) + } + class DataFlowExpr = ExprCfgNode; /** Gets the node corresponding to `e`. */ @@ -962,8 +973,8 @@ module RustDataFlow implements InputSig { /** Holds if path `p` resolves to variant `v`. */ private predicate pathResolveToVariantCanonicalPath(PathAstNode p, VariantCanonicalPath v) { exists(CrateOriginOption crate, string path, string name | - resolveExtendedCanonicalPath(p, crate, path + "::" + name) and - v = MkVariantCanonicalPath(crate, path, name) + resolveExtendedCanonicalPath(p, pragma[only_bind_into](crate), path + "::" + name) and + v = MkVariantCanonicalPath(pragma[only_bind_into](crate), path, name) ) } @@ -1086,63 +1097,65 @@ module RustDataFlow implements InputSig { ) } + pragma[nomagic] + private predicate storeContentStep(Node node1, Content c, Node node2) { + exists(CallExprCfgNode call, int pos | + tupleVariantConstruction(call.getCallExpr(), + c.(VariantPositionContent).getVariantCanonicalPath(pos)) and + node1.asExpr() = call.getArgument(pos) and + node2.asExpr() = call + ) + or + exists(RecordExprCfgNode re, string field | + ( + // Expression is for a struct-like enum variant. + recordVariantConstruction(re.getRecordExpr(), + c.(VariantFieldContent).getVariantCanonicalPath(field)) + or + // Expression is for a struct. + structConstruction(re.getRecordExpr(), c.(StructFieldContent).getStructCanonicalPath(field)) + ) and + node1.asExpr() = re.getFieldExpr(field) and + node2.asExpr() = re + ) + or + exists(TupleExprCfgNode tuple | + node1.asExpr() = tuple.getField(c.(TuplePositionContent).getPosition()) and + node2.asExpr() = tuple + ) + or + c instanceof ArrayElementContent and + node1.asExpr() = + [ + node2.asExpr().(ArrayRepeatExprCfgNode).getRepeatOperand(), + node2.asExpr().(ArrayListExprCfgNode).getAnExpr() + ] + or + tupleAssignment(node1, node2.(PostUpdateNode).getPreUpdateNode(), c) + or + exists(AssignmentExprCfgNode assignment, IndexExprCfgNode index | + c instanceof ArrayElementContent and + assignment.getLhs() = index and + node1.asExpr() = assignment.getRhs() and + node2.(PostUpdateNode).getPreUpdateNode().asExpr() = index.getBase() + ) + or + exists(RefExprCfgNode ref | + c instanceof ReferenceContent and + node1.asExpr() = ref.getExpr() and + node2.asExpr() = ref + ) + or + VariableCapture::storeStep(node1, c, node2) + } + /** * Holds if data can flow from `node1` to `node2` via a store into `c`. Thus, * `node2` references an object with a content `c.getAStoreContent()` that * contains the value of `node1`. */ predicate storeStep(Node node1, ContentSet cs, Node node2) { - exists(Content c | c = cs.(SingletonContentSet).getContent() | - exists(CallExprCfgNode call, int pos | - tupleVariantConstruction(call.getCallExpr(), - c.(VariantPositionContent).getVariantCanonicalPath(pos)) and - node1.asExpr() = call.getArgument(pos) and - node2.asExpr() = call - ) - or - exists(RecordExprCfgNode re, string field | - ( - // Expression is for a struct-like enum variant. - recordVariantConstruction(re.getRecordExpr(), - c.(VariantFieldContent).getVariantCanonicalPath(field)) - or - // Expression is for a struct. - structConstruction(re.getRecordExpr(), - c.(StructFieldContent).getStructCanonicalPath(field)) - ) and - node1.asExpr() = re.getFieldExpr(field) and - node2.asExpr() = re - ) - or - exists(TupleExprCfgNode tuple | - node1.asExpr() = tuple.getField(c.(TuplePositionContent).getPosition()) and - node2.asExpr() = tuple - ) - or - c instanceof ArrayElementContent and - node1.asExpr() = - [ - node2.asExpr().(ArrayRepeatExprCfgNode).getRepeatOperand(), - node2.asExpr().(ArrayListExprCfgNode).getAnExpr() - ] - or - tupleAssignment(node1, node2.(PostUpdateNode).getPreUpdateNode(), c) - or - exists(AssignmentExprCfgNode assignment, IndexExprCfgNode index | - c instanceof ArrayElementContent and - assignment.getLhs() = index and - node1.asExpr() = assignment.getRhs() and - node2.(PostUpdateNode).getPreUpdateNode().asExpr() = index.getBase() - ) - or - exists(RefExprCfgNode ref | - c instanceof ReferenceContent and - node1.asExpr() = ref.getExpr() and - node2.asExpr() = ref - ) - or - VariableCapture::storeStep(node1, c, node2) - ) + storeContentStep(node1, cs.(SingletonContentSet).getContent(), node2) or FlowSummaryImpl::Private::Steps::summaryStoreStep(node1.(Node::FlowSummaryNode).getSummaryNode(), cs, node2.(Node::FlowSummaryNode).getSummaryNode()) diff --git a/rust/ql/test/library-tests/dataflow/barrier/inline-flow.expected b/rust/ql/test/library-tests/dataflow/barrier/inline-flow.expected index 7df553b65a06..266b4c4be8ce 100644 --- a/rust/ql/test/library-tests/dataflow/barrier/inline-flow.expected +++ b/rust/ql/test/library-tests/dataflow/barrier/inline-flow.expected @@ -1,22 +1,32 @@ models edges -| main.rs:9:13:9:19 | ...: ... | main.rs:9:30:14:1 | { ... } | provenance | | -| main.rs:21:13:21:21 | source(...) | main.rs:22:10:22:10 | s | provenance | | -| main.rs:26:13:26:21 | source(...) | main.rs:27:22:27:22 | s | provenance | | -| main.rs:27:13:27:23 | sanitize(...) | main.rs:28:10:28:10 | s | provenance | | +| main.rs:9:13:9:19 | ...: ... | main.rs:10:11:10:11 | s | provenance | | +| main.rs:10:11:10:11 | s | main.rs:9:30:14:1 | { ... } | provenance | | +| main.rs:21:9:21:9 | s | main.rs:22:10:22:10 | s | provenance | | +| main.rs:21:13:21:21 | source(...) | main.rs:21:9:21:9 | s | provenance | | +| main.rs:26:9:26:9 | s | main.rs:27:22:27:22 | s | provenance | | +| main.rs:26:13:26:21 | source(...) | main.rs:26:9:26:9 | s | provenance | | +| main.rs:27:9:27:9 | s | main.rs:28:10:28:10 | s | provenance | | +| main.rs:27:13:27:23 | sanitize(...) | main.rs:27:9:27:9 | s | provenance | | | main.rs:27:22:27:22 | s | main.rs:9:13:9:19 | ...: ... | provenance | | | main.rs:27:22:27:22 | s | main.rs:27:13:27:23 | sanitize(...) | provenance | | -| main.rs:32:13:32:21 | source(...) | main.rs:33:10:33:10 | s | provenance | | +| main.rs:32:9:32:9 | s | main.rs:33:10:33:10 | s | provenance | | +| main.rs:32:13:32:21 | source(...) | main.rs:32:9:32:9 | s | provenance | | nodes | main.rs:9:13:9:19 | ...: ... | semmle.label | ...: ... | | main.rs:9:30:14:1 | { ... } | semmle.label | { ... } | +| main.rs:10:11:10:11 | s | semmle.label | s | | main.rs:17:10:17:18 | source(...) | semmle.label | source(...) | +| main.rs:21:9:21:9 | s | semmle.label | s | | main.rs:21:13:21:21 | source(...) | semmle.label | source(...) | | main.rs:22:10:22:10 | s | semmle.label | s | +| main.rs:26:9:26:9 | s | semmle.label | s | | main.rs:26:13:26:21 | source(...) | semmle.label | source(...) | +| main.rs:27:9:27:9 | s | semmle.label | s | | main.rs:27:13:27:23 | sanitize(...) | semmle.label | sanitize(...) | | main.rs:27:22:27:22 | s | semmle.label | s | | main.rs:28:10:28:10 | s | semmle.label | s | +| main.rs:32:9:32:9 | s | semmle.label | s | | main.rs:32:13:32:21 | source(...) | semmle.label | source(...) | | main.rs:33:10:33:10 | s | semmle.label | s | subpaths diff --git a/rust/ql/test/library-tests/dataflow/closures/inline-flow.expected b/rust/ql/test/library-tests/dataflow/closures/inline-flow.expected index 0c58b547208c..a2cee10f246d 100644 --- a/rust/ql/test/library-tests/dataflow/closures/inline-flow.expected +++ b/rust/ql/test/library-tests/dataflow/closures/inline-flow.expected @@ -3,11 +3,14 @@ edges | main.rs:11:20:11:52 | if cond {...} else {...} | main.rs:12:10:12:16 | f(...) | provenance | | | main.rs:11:30:11:39 | source(...) | main.rs:11:20:11:52 | if cond {...} else {...} | provenance | | | main.rs:16:20:16:23 | ... | main.rs:18:18:18:21 | data | provenance | | -| main.rs:22:13:22:22 | source(...) | main.rs:23:13:23:13 | a | provenance | | +| main.rs:22:9:22:9 | a | main.rs:23:13:23:13 | a | provenance | | +| main.rs:22:13:22:22 | source(...) | main.rs:22:9:22:9 | a | provenance | | | main.rs:23:13:23:13 | a | main.rs:16:20:16:23 | ... | provenance | | | main.rs:27:20:27:23 | ... | main.rs:28:9:32:9 | if cond {...} else {...} | provenance | | -| main.rs:33:13:33:22 | source(...) | main.rs:34:21:34:21 | a | provenance | | -| main.rs:34:13:34:22 | f(...) | main.rs:35:10:35:10 | b | provenance | | +| main.rs:33:9:33:9 | a | main.rs:34:21:34:21 | a | provenance | | +| main.rs:33:13:33:22 | source(...) | main.rs:33:9:33:9 | a | provenance | | +| main.rs:34:9:34:9 | b | main.rs:35:10:35:10 | b | provenance | | +| main.rs:34:13:34:22 | f(...) | main.rs:34:9:34:9 | b | provenance | | | main.rs:34:21:34:21 | a | main.rs:27:20:27:23 | ... | provenance | | | main.rs:34:21:34:21 | a | main.rs:34:13:34:22 | f(...) | provenance | | | main.rs:42:16:42:25 | source(...) | main.rs:44:5:44:5 | [post] f [captured capt] | provenance | | @@ -20,11 +23,14 @@ nodes | main.rs:12:10:12:16 | f(...) | semmle.label | f(...) | | main.rs:16:20:16:23 | ... | semmle.label | ... | | main.rs:18:18:18:21 | data | semmle.label | data | +| main.rs:22:9:22:9 | a | semmle.label | a | | main.rs:22:13:22:22 | source(...) | semmle.label | source(...) | | main.rs:23:13:23:13 | a | semmle.label | a | | main.rs:27:20:27:23 | ... | semmle.label | ... | | main.rs:28:9:32:9 | if cond {...} else {...} | semmle.label | if cond {...} else {...} | +| main.rs:33:9:33:9 | a | semmle.label | a | | main.rs:33:13:33:22 | source(...) | semmle.label | source(...) | +| main.rs:34:9:34:9 | b | semmle.label | b | | main.rs:34:13:34:22 | f(...) | semmle.label | f(...) | | main.rs:34:21:34:21 | a | semmle.label | a | | main.rs:35:10:35:10 | b | semmle.label | b | diff --git a/rust/ql/test/library-tests/dataflow/global/inline-flow.expected b/rust/ql/test/library-tests/dataflow/global/inline-flow.expected index 406b84d68cd6..cce443fe5dc2 100644 --- a/rust/ql/test/library-tests/dataflow/global/inline-flow.expected +++ b/rust/ql/test/library-tests/dataflow/global/inline-flow.expected @@ -2,16 +2,21 @@ models edges | main.rs:12:28:14:1 | { ... } | main.rs:17:13:17:23 | get_data(...) | provenance | | | main.rs:13:5:13:13 | source(...) | main.rs:12:28:14:1 | { ... } | provenance | | -| main.rs:17:13:17:23 | get_data(...) | main.rs:18:10:18:10 | a | provenance | | +| main.rs:17:9:17:9 | a | main.rs:18:10:18:10 | a | provenance | | +| main.rs:17:13:17:23 | get_data(...) | main.rs:17:9:17:9 | a | provenance | | | main.rs:21:12:21:17 | ...: i64 | main.rs:22:10:22:10 | n | provenance | | -| main.rs:26:13:26:21 | source(...) | main.rs:27:13:27:13 | a | provenance | | +| main.rs:26:9:26:9 | a | main.rs:27:13:27:13 | a | provenance | | +| main.rs:26:13:26:21 | source(...) | main.rs:26:9:26:9 | a | provenance | | | main.rs:27:13:27:13 | a | main.rs:21:12:21:17 | ...: i64 | provenance | | | main.rs:30:17:30:22 | ...: i64 | main.rs:30:32:32:1 | { ... } | provenance | | -| main.rs:35:13:35:21 | source(...) | main.rs:36:26:36:26 | a | provenance | | -| main.rs:36:13:36:27 | pass_through(...) | main.rs:37:10:37:10 | b | provenance | | +| main.rs:35:9:35:9 | a | main.rs:36:26:36:26 | a | provenance | | +| main.rs:35:13:35:21 | source(...) | main.rs:35:9:35:9 | a | provenance | | +| main.rs:36:9:36:9 | b | main.rs:37:10:37:10 | b | provenance | | +| main.rs:36:13:36:27 | pass_through(...) | main.rs:36:9:36:9 | b | provenance | | | main.rs:36:26:36:26 | a | main.rs:30:17:30:22 | ...: i64 | provenance | | | main.rs:36:26:36:26 | a | main.rs:36:13:36:27 | pass_through(...) | provenance | | -| main.rs:41:13:44:6 | pass_through(...) | main.rs:45:10:45:10 | a | provenance | | +| main.rs:41:9:41:9 | a | main.rs:45:10:45:10 | a | provenance | | +| main.rs:41:13:44:6 | pass_through(...) | main.rs:41:9:41:9 | a | provenance | | | 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 | | @@ -19,28 +24,37 @@ edges | 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:13:77:25 | mn.get_data(...) | main.rs:78:10:78:10 | a | provenance | | -| main.rs:83:13:83:21 | source(...) | main.rs:84:16:84:16 | a | 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:13:89:21 | source(...) | main.rs:90:29:90:29 | a | provenance | | -| main.rs:90:13:90:30 | mn.data_through(...) | main.rs:91:10:91:10 | b | 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 | | nodes | main.rs:12:28:14:1 | { ... } | semmle.label | { ... } | | main.rs:13:5:13:13 | source(...) | semmle.label | source(...) | +| main.rs:17:9:17:9 | a | semmle.label | a | | main.rs:17:13:17:23 | get_data(...) | semmle.label | get_data(...) | | main.rs:18:10:18:10 | a | semmle.label | a | | main.rs:21:12:21:17 | ...: i64 | semmle.label | ...: i64 | | main.rs:22:10:22:10 | n | semmle.label | n | +| main.rs:26:9:26:9 | a | semmle.label | a | | main.rs:26:13:26:21 | source(...) | semmle.label | source(...) | | main.rs:27:13:27:13 | a | semmle.label | a | | main.rs:30:17:30:22 | ...: i64 | semmle.label | ...: i64 | | main.rs:30:32:32:1 | { ... } | semmle.label | { ... } | +| main.rs:35:9:35:9 | a | semmle.label | a | | main.rs:35:13:35:21 | source(...) | semmle.label | source(...) | +| main.rs:36:9:36:9 | b | semmle.label | b | | main.rs:36:13:36:27 | pass_through(...) | semmle.label | pass_through(...) | | main.rs:36:26:36:26 | a | semmle.label | a | | main.rs:37:10:37:10 | b | semmle.label | b | +| main.rs:41:9:41:9 | a | semmle.label | a | | main.rs:41:13:44:6 | pass_through(...) | semmle.label | pass_through(...) | | main.rs:41:26:44:5 | { ... } | semmle.label | { ... } | | main.rs:43:9:43:18 | source(...) | semmle.label | source(...) | @@ -51,11 +65,15 @@ nodes | 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 | diff --git a/rust/ql/test/library-tests/dataflow/local/inline-flow.expected b/rust/ql/test/library-tests/dataflow/local/inline-flow.expected index f7d7f4ee79d7..1495cfe4748e 100644 --- a/rust/ql/test/library-tests/dataflow/local/inline-flow.expected +++ b/rust/ql/test/library-tests/dataflow/local/inline-flow.expected @@ -3,96 +3,137 @@ models | 2 | Summary: lang:core; ::unwrap_or; Argument[0]; ReturnValue; value | | 3 | Summary: lang:core; ::unwrap_or; Argument[self].Variant[crate::option::Option::Some(0)]; ReturnValue; value | edges -| main.rs:19:13:19:21 | source(...) | main.rs:20:10:20:10 | s | provenance | | -| main.rs:24:13:24:21 | source(...) | main.rs:27:10:27:10 | c | provenance | | -| main.rs:31:13:31:21 | source(...) | main.rs:36:10:36:10 | b | provenance | | -| main.rs:45:15:45:23 | source(...) | main.rs:47:10:47:10 | b | provenance | | -| main.rs:53:9:53:17 | source(...) | main.rs:54:10:54:10 | i | provenance | | -| main.rs:94:13:94:26 | TupleExpr [tuple.0] | main.rs:95:10:95:10 | a [tuple.0] | provenance | | +| 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 | | +| main.rs:24:9:24:9 | a | main.rs:26:9:26:9 | c | provenance | | +| main.rs:24:13:24:21 | source(...) | main.rs:24:9:24:9 | a | provenance | | +| main.rs:26:9:26:9 | c | main.rs:27:10:27:10 | c | provenance | | +| main.rs:31:9:31:9 | a | main.rs:32:9:32:9 | b | provenance | | +| main.rs:31:13:31:21 | source(...) | main.rs:31:9:31:9 | a | provenance | | +| main.rs:32:9:32:9 | b | main.rs:36:10:36:10 | b | provenance | | +| main.rs:44:9:44:9 | b | main.rs:47:10:47:10 | b | provenance | | +| main.rs:45:15:45:23 | source(...) | main.rs:44:9:44:9 | b | provenance | | +| main.rs:53:5:53:5 | i | main.rs:54:10:54:10 | i | provenance | | +| main.rs:53:9:53:17 | source(...) | main.rs:53:5:53:5 | i | provenance | | +| main.rs:94:9:94:9 | a [tuple.0] | main.rs:95:10:95:10 | a [tuple.0] | provenance | | +| main.rs:94:13:94:26 | TupleExpr [tuple.0] | main.rs:94:9:94:9 | a [tuple.0] | provenance | | | main.rs:94:14:94:22 | source(...) | main.rs:94:13:94:26 | TupleExpr [tuple.0] | provenance | | | main.rs:95:10:95:10 | a [tuple.0] | main.rs:95:10:95:12 | a.0 | provenance | | -| main.rs:108:17:108:31 | TupleExpr [tuple.1] | main.rs:110:10:110:10 | a [tuple.1] | provenance | | +| main.rs:108:9:108:13 | a [tuple.1] | main.rs:110:10:110:10 | a [tuple.1] | provenance | | +| main.rs:108:17:108:31 | TupleExpr [tuple.1] | main.rs:108:9:108:13 | a [tuple.1] | provenance | | | main.rs:108:21:108:30 | source(...) | main.rs:108:17:108:31 | TupleExpr [tuple.1] | provenance | | | main.rs:110:10:110:10 | a [tuple.1] | main.rs:110:10:110:12 | a.1 | provenance | | | main.rs:111:5:111:5 | [post] a [tuple.0] | main.rs:112:5:112:5 | a [tuple.0] | provenance | | | main.rs:111:11:111:20 | source(...) | main.rs:111:5:111:5 | [post] a [tuple.0] | provenance | | | main.rs:112:5:112:5 | a [tuple.0] | main.rs:113:10:113:10 | a [tuple.0] | provenance | | | main.rs:113:10:113:10 | a [tuple.0] | main.rs:113:10:113:12 | a.0 | provenance | | -| main.rs:118:13:118:27 | TupleExpr [tuple.1] | main.rs:119:14:119:14 | a [tuple.1] | provenance | | +| main.rs:118:9:118:9 | a [tuple.1] | main.rs:119:14:119:14 | a [tuple.1] | provenance | | +| main.rs:118:13:118:27 | TupleExpr [tuple.1] | main.rs:118:9:118:9 | a [tuple.1] | provenance | | | main.rs:118:17:118:26 | source(...) | main.rs:118:13:118:27 | TupleExpr [tuple.1] | provenance | | -| main.rs:119:13:119:18 | TupleExpr [tuple.0, tuple.1] | main.rs:121:10:121:10 | b [tuple.0, tuple.1] | provenance | | +| main.rs:119:9:119:9 | b [tuple.0, tuple.1] | main.rs:121:10:121:10 | b [tuple.0, tuple.1] | provenance | | +| main.rs:119:13:119:18 | TupleExpr [tuple.0, tuple.1] | main.rs:119:9:119:9 | b [tuple.0, tuple.1] | provenance | | | main.rs:119:14:119:14 | a [tuple.1] | main.rs:119:13:119:18 | TupleExpr [tuple.0, tuple.1] | provenance | | | main.rs:121:10:121:10 | b [tuple.0, tuple.1] | main.rs:121:10:121:12 | b.0 [tuple.1] | provenance | | | main.rs:121:10:121:12 | b.0 [tuple.1] | main.rs:121:10:121:15 | ... .1 | provenance | | -| main.rs:147:13:150:5 | Point {...} [Point.x] | main.rs:151:9:151:28 | Point {...} [Point.x] | provenance | | +| main.rs:147:9:147:9 | p [Point.x] | main.rs:151:9:151:28 | Point {...} [Point.x] | provenance | | +| main.rs:147:13:150:5 | Point {...} [Point.x] | main.rs:147:9:147:9 | p [Point.x] | provenance | | | 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:14:198:37 | ...::Some(...) [Some] | main.rs:201:9:201:23 | ...::Some(...) [Some] | 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:211:14:211:29 | Some(...) [Some] | main.rs:214:9:214:15 | Some(...) [Some] | 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:14:224:29 | Some(...) [Some] | main.rs:225:10:225:11 | s1 [Some] | provenance | | +| main.rs:224:9:224:10 | s1 [Some] | main.rs:225:10:225:11 | 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:14:229:29 | Some(...) [Some] | main.rs:230:10:230:11 | s1 [Some] | provenance | | +| 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:14:237:29 | Some(...) [Some] | main.rs:239:14:239:15 | s1 [Some] | provenance | | +| main.rs:237:9:237:10 | s1 [Some] | main.rs:239:14:239:15 | 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:240:10:240:11 | i1 | provenance | | -| main.rs:246:32:246:45 | Ok(...) [Ok] | main.rs:249:14:249:15 | s1 [Ok] | 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:251:10:251:11 | i1 | provenance | | -| main.rs:264:14:264:39 | ...::A(...) [A] | main.rs:267:9:267:25 | ...::A(...) [A] | provenance | | -| main.rs:264:14:264:39 | ...::A(...) [A] | main.rs:271:9:271:25 | ...::A(...) [A] | 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:14:282:26 | A(...) [A] | main.rs:285:9:285:12 | A(...) [A] | provenance | | -| main.rs:282:14:282:26 | A(...) [A] | main.rs:289:9:289:12 | A(...) [A] | 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:14:305:5 | ...::C {...} [C] | main.rs:308:9:308:38 | ...::C {...} [C] | provenance | | -| main.rs:303:14:305:5 | ...::C {...} [C] | main.rs:312:9:312:38 | ...::C {...} [C] | 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:14:325:5 | C {...} [C] | main.rs:328:9:328:24 | C {...} [C] | provenance | | -| main.rs:323:14:325:5 | C {...} [C] | main.rs:332:9:332:24 | C {...} [C] | 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:16:344:33 | [...] [array[]] | main.rs:345:14:345:17 | arr1 [array[]] | 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:346:10:346:11 | n1 | provenance | | -| main.rs:348:16:348:31 | [...; 10] [array[]] | main.rs:349:14:349:17 | arr2 [array[]] | 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:350:10:350:11 | n2 | provenance | | -| main.rs:358:16:358:33 | [...] [array[]] | main.rs:359:15:359:18 | arr1 [array[]] | 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:16:370:33 | [...] [array[]] | main.rs:372:9:372:17 | SlicePat [array[]] | 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 | | @@ -102,25 +143,35 @@ edges | 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:386:10:386:10 | d | 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 | | nodes | main.rs:15:10:15:18 | source(...) | semmle.label | source(...) | +| main.rs:19:9:19:9 | s | semmle.label | s | | main.rs:19:13:19:21 | source(...) | semmle.label | source(...) | | main.rs:20:10:20:10 | s | semmle.label | s | +| main.rs:24:9:24:9 | a | semmle.label | a | | main.rs:24:13:24:21 | source(...) | semmle.label | source(...) | +| main.rs:26:9:26:9 | c | semmle.label | c | | main.rs:27:10:27:10 | c | semmle.label | c | +| main.rs:31:9:31:9 | a | semmle.label | a | | main.rs:31:13:31:21 | source(...) | semmle.label | source(...) | +| main.rs:32:9:32:9 | b | semmle.label | b | | main.rs:36:10:36:10 | b | semmle.label | b | +| main.rs:44:9:44:9 | b | semmle.label | b | | main.rs:45:15:45:23 | source(...) | semmle.label | source(...) | | main.rs:47:10:47:10 | b | semmle.label | b | +| main.rs:53:5:53:5 | i | semmle.label | i | | main.rs:53:9:53:17 | source(...) | semmle.label | source(...) | | main.rs:54:10:54:10 | i | semmle.label | i | +| main.rs:94:9:94:9 | a [tuple.0] | semmle.label | a [tuple.0] | | main.rs:94:13:94:26 | TupleExpr [tuple.0] | semmle.label | TupleExpr [tuple.0] | | main.rs:94:14:94:22 | source(...) | semmle.label | source(...) | | main.rs:95:10:95:10 | a [tuple.0] | semmle.label | a [tuple.0] | | main.rs:95:10:95:12 | a.0 | semmle.label | a.0 | +| main.rs:108:9:108:13 | a [tuple.1] | semmle.label | a [tuple.1] | | main.rs:108:17:108:31 | TupleExpr [tuple.1] | semmle.label | TupleExpr [tuple.1] | | main.rs:108:21:108:30 | source(...) | semmle.label | source(...) | | main.rs:110:10:110:10 | a [tuple.1] | semmle.label | a [tuple.1] | @@ -130,97 +181,129 @@ nodes | main.rs:112:5:112:5 | a [tuple.0] | semmle.label | a [tuple.0] | | main.rs:113:10:113:10 | a [tuple.0] | semmle.label | a [tuple.0] | | main.rs:113:10:113:12 | a.0 | semmle.label | a.0 | +| main.rs:118:9:118:9 | a [tuple.1] | semmle.label | a [tuple.1] | | main.rs:118:13:118:27 | TupleExpr [tuple.1] | semmle.label | TupleExpr [tuple.1] | | main.rs:118:17:118:26 | source(...) | semmle.label | source(...) | +| main.rs:119:9:119:9 | b [tuple.0, tuple.1] | semmle.label | b [tuple.0, tuple.1] | | main.rs:119:13:119:18 | TupleExpr [tuple.0, tuple.1] | semmle.label | TupleExpr [tuple.0, tuple.1] | | main.rs:119:14:119:14 | a [tuple.1] | semmle.label | a [tuple.1] | | main.rs:121:10:121:10 | b [tuple.0, tuple.1] | semmle.label | b [tuple.0, tuple.1] | | main.rs:121:10:121:12 | b.0 [tuple.1] | semmle.label | b.0 [tuple.1] | | main.rs:121:10:121:15 | ... .1 | semmle.label | ... .1 | +| main.rs:147:9:147:9 | p [Point.x] | semmle.label | p [Point.x] | | main.rs:147:13:150:5 | Point {...} [Point.x] | semmle.label | Point {...} [Point.x] | | main.rs:148:12:148:21 | source(...) | semmle.label | source(...) | | 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: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: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: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: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 | @@ -230,6 +313,7 @@ nodes | 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 | diff --git a/rust/ql/test/library-tests/dataflow/models/models.expected b/rust/ql/test/library-tests/dataflow/models/models.expected index 8c5ce17f8c83..bda991fd7f5d 100644 --- a/rust/ql/test/library-tests/dataflow/models/models.expected +++ b/rust/ql/test/library-tests/dataflow/models/models.expected @@ -10,98 +10,146 @@ models | 9 | Summary: repo::test; crate::set_var_field; Argument[0]; ReturnValue.Variant[crate::MyFieldEnum::D::field_d]; value | | 10 | Summary: repo::test; crate::set_var_pos; Argument[0]; ReturnValue.Variant[crate::MyPosEnum::B(0)]; value | edges -| main.rs:15:13:15:21 | source(...) | main.rs:16:19:16:19 | s | provenance | | -| main.rs:15:13:15:21 | source(...) | main.rs:16:19:16:19 | s | provenance | | +| 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 | | +| main.rs:15:13:15:21 | source(...) | main.rs:15:9:15:9 | s | provenance | | +| main.rs:15:13:15:21 | source(...) | main.rs:15:9:15:9 | s | provenance | | | main.rs:16:19:16:19 | s | main.rs:16:10:16:20 | identity(...) | provenance | QL | | main.rs:16:19:16:19 | s | main.rs:16:10:16:20 | identity(...) | provenance | QL | -| main.rs:25:13:25:22 | source(...) | main.rs:26:17:26:17 | s | provenance | | +| 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:1 | -| main.rs:40:13:40:21 | source(...) | main.rs:41:27:41:27 | s | provenance | | -| main.rs:40:13:40:21 | source(...) | main.rs:41:27:41:27 | s | provenance | | -| main.rs:41:14:41:28 | ...::A(...) [A] | main.rs:42:22:42:23 | e1 [A] | provenance | | -| main.rs:41:14:41:28 | ...::A(...) [A] | main.rs:42:22:42:23 | e1 [A] | provenance | | +| 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 | | +| main.rs:40:13:40:21 | source(...) | main.rs:40:9:40:9 | s | provenance | | +| main.rs:41:9:41:10 | e1 [A] | main.rs:42:22:42:23 | e1 [A] | provenance | | +| main.rs:41:9:41:10 | e1 [A] | main.rs:42:22:42:23 | e1 [A] | provenance | | +| main.rs:41:14:41:28 | ...::A(...) [A] | main.rs:41:9:41:10 | e1 [A] | provenance | | +| 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:6 | | main.rs:42:22:42:23 | e1 [A] | main.rs:42:10:42:24 | get_var_pos(...) | provenance | MaD:6 | -| main.rs:53:13:53:21 | source(...) | main.rs:54:26:54:26 | s | provenance | | -| main.rs:53:13:53:21 | source(...) | main.rs:54:26:54:26 | s | provenance | | -| main.rs:54:14:54:27 | set_var_pos(...) [B] | main.rs:57:9:57:23 | ...::B(...) [B] | provenance | | -| main.rs:54:14:54:27 | set_var_pos(...) [B] | main.rs:57:9:57:23 | ...::B(...) [B] | provenance | | +| 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 | | +| main.rs:53:13:53:21 | source(...) | main.rs:53:9:53:9 | s | provenance | | +| main.rs:54:9:54:10 | e1 [B] | main.rs:55:11:55:12 | e1 [B] | provenance | | +| 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:10 | | main.rs:54:26:54:26 | s | main.rs:54:14:54:27 | set_var_pos(...) [B] | provenance | MaD:10 | +| 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 | | | main.rs:57:9:57:23 | ...::B(...) [B] | main.rs:57:22:57:22 | i | provenance | | | main.rs:57:22:57:22 | i | main.rs:57:33:57:33 | i | provenance | | | main.rs:57:22:57:22 | i | main.rs:57:33:57:33 | i | provenance | | -| main.rs:72:13:72:21 | source(...) | main.rs:73:40:73:40 | s | provenance | | -| main.rs:72:13:72:21 | source(...) | main.rs:73:40:73:40 | s | provenance | | -| main.rs:73:14:73:42 | ...::C {...} [C] | main.rs:74:24:74:25 | e1 [C] | provenance | | -| main.rs:73:14:73:42 | ...::C {...} [C] | main.rs:74:24:74:25 | e1 [C] | provenance | | +| main.rs:72:9:72:9 | s | main.rs:73:40:73:40 | s | provenance | | +| main.rs:72:9:72:9 | s | main.rs:73:40:73:40 | s | provenance | | +| main.rs:72:13:72:21 | source(...) | main.rs:72:9:72:9 | s | provenance | | +| main.rs:72:13:72:21 | source(...) | main.rs:72:9:72:9 | s | provenance | | +| main.rs:73:9:73:10 | e1 [C] | main.rs:74:24:74:25 | e1 [C] | provenance | | +| main.rs:73:9:73:10 | e1 [C] | main.rs:74:24:74:25 | e1 [C] | provenance | | +| main.rs:73:14:73:42 | ...::C {...} [C] | main.rs:73:9:73:10 | e1 [C] | provenance | | +| 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:5 | | main.rs:74:24:74:25 | e1 [C] | main.rs:74:10:74:26 | get_var_field(...) | provenance | MaD:5 | -| main.rs:85:13:85:21 | source(...) | main.rs:86:28:86:28 | s | provenance | | -| main.rs:85:13:85:21 | source(...) | main.rs:86:28:86:28 | s | provenance | | -| main.rs:86:14:86:29 | set_var_field(...) [D] | main.rs:89:9:89:37 | ...::D {...} [D] | provenance | | -| main.rs:86:14:86:29 | set_var_field(...) [D] | main.rs:89:9:89:37 | ...::D {...} [D] | provenance | | +| 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 | | +| main.rs:85:13:85:21 | source(...) | main.rs:85:9:85:9 | s | provenance | | +| main.rs:86:9:86:10 | e1 [D] | main.rs:87:11:87:12 | e1 [D] | provenance | | +| 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:9 | | main.rs:86:28:86:28 | s | main.rs:86:14:86:29 | set_var_field(...) [D] | provenance | MaD:9 | +| 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 | | | main.rs:89:9:89:37 | ...::D {...} [D] | main.rs:89:35:89:35 | i | provenance | | | main.rs:89:35:89:35 | i | main.rs:89:47:89:47 | i | provenance | | | main.rs:89:35:89:35 | i | main.rs:89:47:89:47 | i | provenance | | -| main.rs:104:13:104:21 | source(...) | main.rs:106:17:106:17 | s | provenance | | -| main.rs:104:13:104:21 | source(...) | main.rs:106:17:106:17 | s | provenance | | -| main.rs:105:21:108:5 | MyStruct {...} [MyStruct.field1] | main.rs:109:27:109:35 | my_struct [MyStruct.field1] | provenance | | -| main.rs:105:21:108:5 | MyStruct {...} [MyStruct.field1] | main.rs:109:27:109:35 | my_struct [MyStruct.field1] | provenance | | +| main.rs:104:9:104:9 | s | main.rs:106:17:106:17 | s | provenance | | +| main.rs:104:9:104:9 | s | main.rs:106:17:106:17 | s | provenance | | +| main.rs:104:13:104:21 | source(...) | main.rs:104:9:104:9 | s | provenance | | +| main.rs:104:13:104:21 | source(...) | main.rs:104:9:104:9 | s | provenance | | +| main.rs:105:9:105:17 | my_struct [MyStruct.field1] | main.rs:109:27:109:35 | my_struct [MyStruct.field1] | provenance | | +| main.rs:105:9:105:17 | my_struct [MyStruct.field1] | main.rs:109:27:109:35 | my_struct [MyStruct.field1] | provenance | | +| main.rs:105:21:108:5 | MyStruct {...} [MyStruct.field1] | main.rs:105:9:105:17 | my_struct [MyStruct.field1] | provenance | | +| 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:3 | | main.rs:109:27:109:35 | my_struct [MyStruct.field1] | main.rs:109:10:109:36 | get_struct_field(...) | provenance | MaD:3 | -| main.rs:138:13:138:21 | source(...) | main.rs:139:29:139:29 | s | provenance | | -| main.rs:138:13:138:21 | source(...) | 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: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:2 | | main.rs:139:28:139:30 | [...] [array[]] | main.rs:139:10:139:31 | get_array_element(...) | provenance | MaD:2 | | 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:148:13:148:21 | source(...) | main.rs:149:33:149:33 | s | provenance | | -| main.rs:148:13:148:21 | source(...) | main.rs:149:33:149:33 | s | provenance | | -| main.rs:149:15:149:34 | set_array_element(...) [array[]] | main.rs:150:10:150:12 | arr [array[]] | provenance | | -| main.rs:149:15:149:34 | set_array_element(...) [array[]] | main.rs:150:10:150:12 | arr [array[]] | 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:7 | | main.rs:149:33:149:33 | s | main.rs:149:15:149:34 | set_array_element(...) [array[]] | provenance | MaD:7 | | 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:159:13:159:22 | source(...) | main.rs:160:14:160:14 | s | provenance | | -| main.rs:159:13:159:22 | source(...) | main.rs:160:14:160:14 | s | provenance | | -| main.rs:160:13:160:18 | TupleExpr [tuple.0] | main.rs:161:28:161:28 | t [tuple.0] | provenance | | -| main.rs:160:13:160:18 | TupleExpr [tuple.0] | main.rs:161:28:161:28 | t [tuple.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 | | +| main.rs:159:13:159:22 | source(...) | main.rs:159:9:159:9 | s | provenance | | +| main.rs:160:9:160:9 | t [tuple.0] | main.rs:161:28:161:28 | t [tuple.0] | provenance | | +| main.rs:160:9:160:9 | t [tuple.0] | main.rs:161:28:161:28 | t [tuple.0] | provenance | | +| main.rs:160:13:160:18 | TupleExpr [tuple.0] | main.rs:160:9:160:9 | t [tuple.0] | provenance | | +| 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:4 | | main.rs:161:28:161:28 | t [tuple.0] | main.rs:161:10:161:29 | get_tuple_element(...) | provenance | MaD:4 | -| main.rs:172:13:172:22 | source(...) | main.rs:173:31:173:31 | s | provenance | | -| main.rs:172:13:172:22 | source(...) | main.rs:173:31:173:31 | s | provenance | | -| main.rs:173:13:173:32 | set_tuple_element(...) [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:175:10:175:10 | t [tuple.1] | provenance | | +| 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 | | +| main.rs:172:13:172:22 | source(...) | main.rs:172:9:172:9 | s | provenance | | +| main.rs:173:9:173:9 | t [tuple.1] | main.rs:175:10:175:10 | t [tuple.1] | provenance | | +| 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:8 | | main.rs:173:31:173:31 | s | main.rs:173:13:173:32 | set_tuple_element(...) [tuple.1] | provenance | MaD:8 | | 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 | | nodes +| main.rs:15:9:15:9 | s | semmle.label | s | +| main.rs:15:9:15:9 | s | semmle.label | s | | main.rs:15:13:15:21 | source(...) | semmle.label | source(...) | | main.rs:15:13:15:21 | source(...) | semmle.label | source(...) | | main.rs:16:10:16:20 | identity(...) | semmle.label | identity(...) | | main.rs:16:10:16:20 | identity(...) | semmle.label | identity(...) | | main.rs:16:19:16:19 | s | semmle.label | s | | main.rs:16:19:16:19 | s | semmle.label | s | +| main.rs:25:9:25:9 | s | semmle.label | s | | main.rs:25:13:25:22 | source(...) | semmle.label | source(...) | | main.rs:26:10:26:18 | coerce(...) | semmle.label | coerce(...) | | main.rs:26:17:26:17 | s | semmle.label | s | +| main.rs:40:9:40:9 | s | semmle.label | s | +| main.rs:40:9:40:9 | s | semmle.label | s | | main.rs:40:13:40:21 | source(...) | semmle.label | source(...) | | main.rs:40:13:40:21 | source(...) | semmle.label | source(...) | +| main.rs:41:9:41:10 | e1 [A] | semmle.label | e1 [A] | +| main.rs:41:9:41:10 | e1 [A] | semmle.label | e1 [A] | | main.rs:41:14:41:28 | ...::A(...) [A] | semmle.label | ...::A(...) [A] | | main.rs:41:14:41:28 | ...::A(...) [A] | semmle.label | ...::A(...) [A] | | main.rs:41:27:41:27 | s | semmle.label | s | @@ -110,20 +158,30 @@ nodes | main.rs:42:10:42:24 | get_var_pos(...) | semmle.label | get_var_pos(...) | | main.rs:42:22:42:23 | e1 [A] | semmle.label | e1 [A] | | main.rs:42:22:42:23 | e1 [A] | semmle.label | e1 [A] | +| main.rs:53:9:53:9 | s | semmle.label | s | +| main.rs:53:9:53:9 | s | semmle.label | s | | main.rs:53:13:53:21 | source(...) | semmle.label | source(...) | | main.rs:53:13:53:21 | source(...) | semmle.label | source(...) | +| main.rs:54:9:54:10 | e1 [B] | semmle.label | e1 [B] | +| main.rs:54:9:54:10 | e1 [B] | semmle.label | e1 [B] | | main.rs:54:14:54:27 | set_var_pos(...) [B] | semmle.label | set_var_pos(...) [B] | | main.rs:54:14:54:27 | set_var_pos(...) [B] | semmle.label | set_var_pos(...) [B] | | main.rs:54:26:54:26 | s | semmle.label | s | | main.rs:54:26:54:26 | s | semmle.label | s | +| main.rs:55:11:55:12 | e1 [B] | semmle.label | e1 [B] | +| main.rs:55:11:55:12 | e1 [B] | semmle.label | e1 [B] | | main.rs:57:9:57:23 | ...::B(...) [B] | semmle.label | ...::B(...) [B] | | main.rs:57:9:57:23 | ...::B(...) [B] | semmle.label | ...::B(...) [B] | | main.rs:57:22:57:22 | i | semmle.label | i | | main.rs:57:22:57:22 | i | semmle.label | i | | main.rs:57:33:57:33 | i | semmle.label | i | | main.rs:57:33:57:33 | i | semmle.label | i | +| main.rs:72:9:72:9 | s | semmle.label | s | +| main.rs:72:9:72:9 | s | semmle.label | s | | main.rs:72:13:72:21 | source(...) | semmle.label | source(...) | | main.rs:72:13:72:21 | source(...) | semmle.label | source(...) | +| main.rs:73:9:73:10 | e1 [C] | semmle.label | e1 [C] | +| main.rs:73:9:73:10 | e1 [C] | semmle.label | e1 [C] | | main.rs:73:14:73:42 | ...::C {...} [C] | semmle.label | ...::C {...} [C] | | main.rs:73:14:73:42 | ...::C {...} [C] | semmle.label | ...::C {...} [C] | | main.rs:73:40:73:40 | s | semmle.label | s | @@ -132,20 +190,30 @@ nodes | main.rs:74:10:74:26 | get_var_field(...) | semmle.label | get_var_field(...) | | main.rs:74:24:74:25 | e1 [C] | semmle.label | e1 [C] | | main.rs:74:24:74:25 | e1 [C] | semmle.label | e1 [C] | +| main.rs:85:9:85:9 | s | semmle.label | s | +| main.rs:85:9:85:9 | s | semmle.label | s | | main.rs:85:13:85:21 | source(...) | semmle.label | source(...) | | main.rs:85:13:85:21 | source(...) | semmle.label | source(...) | +| main.rs:86:9:86:10 | e1 [D] | semmle.label | e1 [D] | +| main.rs:86:9:86:10 | e1 [D] | semmle.label | e1 [D] | | main.rs:86:14:86:29 | set_var_field(...) [D] | semmle.label | set_var_field(...) [D] | | main.rs:86:14:86:29 | set_var_field(...) [D] | semmle.label | set_var_field(...) [D] | | main.rs:86:28:86:28 | s | semmle.label | s | | main.rs:86:28:86:28 | s | semmle.label | s | +| main.rs:87:11:87:12 | e1 [D] | semmle.label | e1 [D] | +| main.rs:87:11:87:12 | e1 [D] | semmle.label | e1 [D] | | main.rs:89:9:89:37 | ...::D {...} [D] | semmle.label | ...::D {...} [D] | | main.rs:89:9:89:37 | ...::D {...} [D] | semmle.label | ...::D {...} [D] | | main.rs:89:35:89:35 | i | semmle.label | i | | main.rs:89:35:89:35 | i | semmle.label | i | | main.rs:89:47:89:47 | i | semmle.label | i | | main.rs:89:47:89:47 | i | semmle.label | i | +| main.rs:104:9:104:9 | s | semmle.label | s | +| main.rs:104:9:104:9 | s | semmle.label | s | | main.rs:104:13:104:21 | source(...) | semmle.label | source(...) | | main.rs:104:13:104:21 | source(...) | semmle.label | source(...) | +| main.rs:105:9:105:17 | my_struct [MyStruct.field1] | semmle.label | my_struct [MyStruct.field1] | +| main.rs:105:9:105:17 | my_struct [MyStruct.field1] | semmle.label | my_struct [MyStruct.field1] | | main.rs:105:21:108:5 | MyStruct {...} [MyStruct.field1] | semmle.label | MyStruct {...} [MyStruct.field1] | | main.rs:105:21:108:5 | MyStruct {...} [MyStruct.field1] | semmle.label | MyStruct {...} [MyStruct.field1] | | main.rs:106:17:106:17 | s | semmle.label | s | @@ -154,6 +222,8 @@ nodes | main.rs:109:10:109:36 | get_struct_field(...) | semmle.label | get_struct_field(...) | | main.rs:109:27:109:35 | my_struct [MyStruct.field1] | semmle.label | my_struct [MyStruct.field1] | | main.rs:109:27:109:35 | my_struct [MyStruct.field1] | semmle.label | my_struct [MyStruct.field1] | +| main.rs:138:9:138:9 | s | semmle.label | s | +| main.rs:138:9:138:9 | s | semmle.label | s | | main.rs:138:13:138:21 | source(...) | semmle.label | source(...) | | main.rs:138:13:138:21 | source(...) | semmle.label | source(...) | | main.rs:139:10:139:31 | get_array_element(...) | semmle.label | get_array_element(...) | @@ -162,8 +232,12 @@ nodes | main.rs:139:28:139:30 | [...] [array[]] | semmle.label | [...] [array[]] | | 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:33:149:33 | s | semmle.label | s | @@ -172,8 +246,12 @@ nodes | main.rs:150:10:150:12 | arr [array[]] | semmle.label | arr [array[]] | | 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 | +| main.rs:159:9:159:9 | s | semmle.label | s | | main.rs:159:13:159:22 | source(...) | semmle.label | source(...) | | main.rs:159:13:159:22 | source(...) | semmle.label | source(...) | +| main.rs:160:9:160:9 | t [tuple.0] | semmle.label | t [tuple.0] | +| main.rs:160:9:160:9 | t [tuple.0] | semmle.label | t [tuple.0] | | main.rs:160:13:160:18 | TupleExpr [tuple.0] | semmle.label | TupleExpr [tuple.0] | | main.rs:160:13:160:18 | TupleExpr [tuple.0] | semmle.label | TupleExpr [tuple.0] | | main.rs:160:14:160:14 | s | semmle.label | s | @@ -182,8 +260,12 @@ nodes | main.rs:161:10:161:29 | get_tuple_element(...) | semmle.label | get_tuple_element(...) | | main.rs:161:28:161:28 | t [tuple.0] | semmle.label | t [tuple.0] | | main.rs:161:28:161:28 | t [tuple.0] | semmle.label | t [tuple.0] | +| main.rs:172:9:172:9 | s | semmle.label | s | +| main.rs:172:9:172:9 | s | semmle.label | s | | main.rs:172:13:172:22 | source(...) | semmle.label | source(...) | | main.rs:172:13:172:22 | source(...) | semmle.label | source(...) | +| main.rs:173:9:173:9 | t [tuple.1] | semmle.label | t [tuple.1] | +| main.rs:173:9:173:9 | t [tuple.1] | semmle.label | t [tuple.1] | | main.rs:173:13:173:32 | set_tuple_element(...) [tuple.1] | semmle.label | set_tuple_element(...) [tuple.1] | | main.rs:173:13:173:32 | set_tuple_element(...) [tuple.1] | semmle.label | set_tuple_element(...) [tuple.1] | | main.rs:173:31:173:31 | s | semmle.label | s | diff --git a/rust/ql/test/library-tests/dataflow/pointers/inline-flow.expected b/rust/ql/test/library-tests/dataflow/pointers/inline-flow.expected index ee54904481ae..9c4e671046b7 100644 --- a/rust/ql/test/library-tests/dataflow/pointers/inline-flow.expected +++ b/rust/ql/test/library-tests/dataflow/pointers/inline-flow.expected @@ -1,35 +1,6 @@ -models -edges -| main.rs:13:13:13:22 | source(...) | main.rs:14:14:14:14 | a | provenance | | -| main.rs:14:13:14:14 | &a [&ref] | main.rs:15:14:15:14 | b [&ref] | provenance | | -| main.rs:14:14:14:14 | a | main.rs:14:13:14:14 | &a [&ref] | provenance | | -| main.rs:15:13:15:14 | * ... | main.rs:16:10:16:10 | c | provenance | | -| main.rs:15:14:15:14 | b [&ref] | main.rs:15:13:15:14 | * ... | provenance | | -| main.rs:40:18:40:21 | SelfParam [MyNumber] | main.rs:42:13:42:38 | ...::MyNumber(...) [MyNumber] | provenance | | -| main.rs:42:13:42:38 | ...::MyNumber(...) [MyNumber] | main.rs:42:32:42:37 | number | provenance | | -| main.rs:42:32:42:37 | number | main.rs:40:31:46:5 | { ... } | provenance | | -| main.rs:58:21:58:50 | ...::MyNumber(...) [MyNumber] | main.rs:59:10:59:18 | my_number [MyNumber] | provenance | | -| main.rs:58:40:58:49 | source(...) | main.rs:58:21:58:50 | ...::MyNumber(...) [MyNumber] | provenance | | -| main.rs:59:10:59:18 | my_number [MyNumber] | main.rs:40:18:40:21 | SelfParam [MyNumber] | provenance | | -| main.rs:59:10:59:18 | my_number [MyNumber] | main.rs:59:10:59:30 | my_number.to_number(...) | provenance | | -nodes -| main.rs:13:13:13:22 | source(...) | semmle.label | source(...) | -| main.rs:14:13:14:14 | &a [&ref] | semmle.label | &a [&ref] | -| main.rs:14:14:14:14 | a | semmle.label | a | -| main.rs:15:13:15:14 | * ... | semmle.label | * ... | -| main.rs:15:14:15:14 | b [&ref] | semmle.label | b [&ref] | -| main.rs:16:10:16:10 | c | semmle.label | c | -| main.rs:40:18:40:21 | SelfParam [MyNumber] | semmle.label | SelfParam [MyNumber] | -| main.rs:40:31:46:5 | { ... } | semmle.label | { ... } | -| main.rs:42:13:42:38 | ...::MyNumber(...) [MyNumber] | semmle.label | ...::MyNumber(...) [MyNumber] | -| main.rs:42:32:42:37 | number | semmle.label | number | -| main.rs:58:21:58:50 | ...::MyNumber(...) [MyNumber] | semmle.label | ...::MyNumber(...) [MyNumber] | -| main.rs:58:40:58:49 | source(...) | semmle.label | source(...) | -| main.rs:59:10:59:18 | my_number [MyNumber] | semmle.label | my_number [MyNumber] | -| main.rs:59:10:59:30 | my_number.to_number(...) | semmle.label | my_number.to_number(...) | -subpaths -| main.rs:59:10:59:18 | my_number [MyNumber] | main.rs:40:18:40:21 | SelfParam [MyNumber] | main.rs:40:31:46:5 | { ... } | main.rs:59:10:59:30 | my_number.to_number(...) | -testFailures -#select -| main.rs:16:10:16:10 | c | main.rs:13:13:13:22 | source(...) | main.rs:16:10:16:10 | c | $@ | main.rs:13:13:13:22 | source(...) | source(...) | -| main.rs:59:10:59:30 | my_number.to_number(...) | main.rs:58:40:58:49 | source(...) | main.rs:59:10:59:30 | my_number.to_number(...) | $@ | main.rs:58:40:58:49 | source(...) | source(...) | +ERROR: could not resolve module DefaultFlowTest (inline-flow.ql:7,8-23) +ERROR: could not resolve module ValueFlow (inline-flow.ql:8,8-17) +ERROR: could not resolve module ValueFlow (inline-flow.ql:10,6-15) +ERROR: could not resolve module ValueFlow (inline-flow.ql:10,34-43) +ERROR: could not resolve module ValueFlow (inline-flow.ql:11,7-16) +ERROR: could not resolve module utils.InlineFlowTest (inline-flow.ql:6,8-28) diff --git a/rust/ql/test/library-tests/dataflow/strings/inline-taint-flow.expected b/rust/ql/test/library-tests/dataflow/strings/inline-taint-flow.expected index 52042c61e9ee..16bca2d4d864 100644 --- a/rust/ql/test/library-tests/dataflow/strings/inline-taint-flow.expected +++ b/rust/ql/test/library-tests/dataflow/strings/inline-taint-flow.expected @@ -1,30 +1,6 @@ -models -| 1 | Summary: lang:alloc; ::as_str; Argument[self]; ReturnValue; taint | -edges -| main.rs:20:13:20:22 | source(...) | main.rs:21:19:21:25 | s[...] | provenance | | -| main.rs:20:13:20:22 | source(...) | main.rs:22:16:22:21 | sliced | provenance | | -| main.rs:21:18:21:25 | &... [&ref] | main.rs:22:16:22:21 | sliced | provenance | | -| main.rs:21:19:21:25 | s[...] | main.rs:21:18:21:25 | &... [&ref] | provenance | | -| main.rs:26:14:26:23 | source(...) | main.rs:32:10:32:11 | s4 | provenance | | -| main.rs:37:14:37:23 | source(...) | main.rs:40:10:40:35 | ... + ... | provenance | | -| main.rs:57:13:57:22 | source(...) | main.rs:58:16:58:16 | s | provenance | | -| main.rs:58:16:58:16 | s | main.rs:58:16:58:25 | s.as_str(...) | provenance | MaD:1 | -nodes -| main.rs:20:13:20:22 | source(...) | semmle.label | source(...) | -| main.rs:21:18:21:25 | &... [&ref] | semmle.label | &... [&ref] | -| main.rs:21:19:21:25 | s[...] | semmle.label | s[...] | -| main.rs:22:16:22:21 | sliced | semmle.label | sliced | -| main.rs:26:14:26:23 | source(...) | semmle.label | source(...) | -| main.rs:32:10:32:11 | s4 | semmle.label | s4 | -| main.rs:37:14:37:23 | source(...) | semmle.label | source(...) | -| main.rs:40:10:40:35 | ... + ... | semmle.label | ... + ... | -| main.rs:57:13:57:22 | source(...) | semmle.label | source(...) | -| main.rs:58:16:58:16 | s | semmle.label | s | -| main.rs:58:16:58:25 | s.as_str(...) | semmle.label | s.as_str(...) | -subpaths -testFailures -#select -| main.rs:22:16:22:21 | sliced | main.rs:20:13:20:22 | source(...) | main.rs:22:16:22:21 | sliced | $@ | main.rs:20:13:20:22 | source(...) | source(...) | -| main.rs:32:10:32:11 | s4 | main.rs:26:14:26:23 | source(...) | main.rs:32:10:32:11 | s4 | $@ | main.rs:26:14:26:23 | source(...) | source(...) | -| main.rs:40:10:40:35 | ... + ... | main.rs:37:14:37:23 | source(...) | main.rs:40:10:40:35 | ... + ... | $@ | main.rs:37:14:37:23 | source(...) | source(...) | -| main.rs:58:16:58:25 | s.as_str(...) | main.rs:57:13:57:22 | source(...) | main.rs:58:16:58:25 | s.as_str(...) | $@ | main.rs:57:13:57:22 | source(...) | source(...) | +ERROR: could not resolve module DefaultFlowTest (inline-taint-flow.ql:7,8-23) +ERROR: could not resolve module TaintFlow (inline-taint-flow.ql:8,8-17) +ERROR: could not resolve module TaintFlow (inline-taint-flow.ql:10,6-15) +ERROR: could not resolve module TaintFlow (inline-taint-flow.ql:10,34-43) +ERROR: could not resolve module TaintFlow (inline-taint-flow.ql:11,7-16) +ERROR: could not resolve module utils.InlineFlowTest (inline-taint-flow.ql:6,8-28) diff --git a/rust/ql/test/library-tests/dataflow/taint/inline-taint-flow.expected b/rust/ql/test/library-tests/dataflow/taint/inline-taint-flow.expected index 4a54e9e258aa..4730611d8c72 100644 --- a/rust/ql/test/library-tests/dataflow/taint/inline-taint-flow.expected +++ b/rust/ql/test/library-tests/dataflow/taint/inline-taint-flow.expected @@ -1,26 +1,42 @@ models edges -| main.rs:12:13:12:22 | source(...) | main.rs:13:10:13:14 | ... + ... | provenance | | -| main.rs:17:13:17:22 | source(...) | main.rs:18:10:18:11 | - ... | provenance | | -| main.rs:22:13:22:22 | source(...) | main.rs:24:10:24:17 | b as i64 | provenance | | -| main.rs:37:17:37:26 | source(...) | main.rs:38:23:38:29 | s[...] | provenance | | -| main.rs:37:17:37:26 | source(...) | main.rs:39:14:39:19 | sliced | provenance | | -| main.rs:38:22:38:29 | &... [&ref] | main.rs:39:14:39:19 | sliced | provenance | | +| main.rs:12:9:12:9 | a | main.rs:13:10:13:14 | ... + ... | provenance | | +| main.rs:12:13:12:22 | source(...) | main.rs:12:9:12:9 | a | provenance | | +| main.rs:17:9:17:9 | a | main.rs:18:10:18:11 | - ... | provenance | | +| main.rs:17:13:17:22 | source(...) | main.rs:17:9:17:9 | a | provenance | | +| main.rs:22:9:22:9 | a | main.rs:23:9:23:9 | b | provenance | | +| main.rs:22:13:22:22 | source(...) | main.rs:22:9:22:9 | a | provenance | | +| main.rs:23:9:23:9 | b | main.rs:24:10:24:17 | b as i64 | provenance | | +| main.rs:37:13:37:13 | s | main.rs:38:13:38:18 | sliced | provenance | | +| main.rs:37:13:37:13 | s | main.rs:38:23:38:29 | s[...] | provenance | | +| main.rs:37:17:37:26 | source(...) | main.rs:37:13:37:13 | s | provenance | | +| main.rs:38:13:38:18 | sliced | main.rs:39:14:39:19 | sliced | provenance | | +| main.rs:38:13:38:18 | sliced [&ref] | main.rs:39:14:39:19 | sliced | provenance | | +| main.rs:38:22:38:29 | &... [&ref] | main.rs:38:13:38:18 | sliced [&ref] | provenance | | | main.rs:38:23:38:29 | s[...] | main.rs:38:22:38:29 | &... [&ref] | provenance | | -| main.rs:53:19:53:28 | source(...) | main.rs:54:14:54:19 | arr[1] | 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 | | nodes +| main.rs:12:9:12:9 | a | semmle.label | a | | main.rs:12:13:12:22 | source(...) | semmle.label | source(...) | | main.rs:13:10:13:14 | ... + ... | semmle.label | ... + ... | +| main.rs:17:9:17:9 | a | semmle.label | a | | main.rs:17:13:17:22 | source(...) | semmle.label | source(...) | | main.rs:18:10:18:11 | - ... | semmle.label | - ... | +| main.rs:22:9:22:9 | a | semmle.label | a | | main.rs:22:13:22:22 | source(...) | semmle.label | source(...) | +| main.rs:23:9:23:9 | b | semmle.label | b | | main.rs:24:10:24:17 | b as i64 | semmle.label | b as i64 | +| main.rs:37:13:37:13 | s | semmle.label | s | | main.rs:37:17:37:26 | source(...) | semmle.label | source(...) | +| main.rs:38:13:38:18 | sliced | semmle.label | sliced | +| main.rs:38:13:38:18 | sliced [&ref] | semmle.label | sliced [&ref] | | main.rs:38:22:38:29 | &... [&ref] | semmle.label | &... [&ref] | | main.rs:38:23:38:29 | s[...] | semmle.label | s[...] | | main.rs:39:14:39:19 | sliced | semmle.label | sliced | +| 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[]] |