diff --git a/rust/ql/lib/codeql/rust/dataflow/internal/DataFlowImpl.qll b/rust/ql/lib/codeql/rust/dataflow/internal/DataFlowImpl.qll index b6f8942320d0..39c0c2c4185e 100644 --- a/rust/ql/lib/codeql/rust/dataflow/internal/DataFlowImpl.qll +++ b/rust/ql/lib/codeql/rust/dataflow/internal/DataFlowImpl.qll @@ -712,6 +712,11 @@ private class CapturedVariableContent extends Content, TCapturedVariableContent override string toString() { result = "captured " + v } } +/** A value referred to by a reference. */ +final class ReferenceContent extends Content, TReferenceContent { + override string toString() { result = "&ref" } +} + /** * An element in an array. */ @@ -1051,6 +1056,13 @@ module RustDataFlow implements InputSig { ["crate::option::Option::Some", "crate::result::Result::Ok"] ) or + exists(PrefixExprCfgNode deref | + c instanceof ReferenceContent and + deref.getOperatorName() = "*" and + node1.asExpr() = deref.getExpr() and + node2.asExpr() = deref + ) + or VariableCapture::readStep(node1, c, node2) ) or @@ -1128,6 +1140,12 @@ module RustDataFlow implements InputSig { 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) } @@ -1395,7 +1413,8 @@ private module Cached { e = [ any(IndexExprCfgNode i).getBase(), any(FieldExprCfgNode access).getExpr(), - any(TryExprCfgNode try).getExpr() + any(TryExprCfgNode try).getExpr(), + any(PrefixExprCfgNode pe | pe.getOperatorName() = "*").getExpr() ] } or TSsaNode(SsaImpl::DataFlowIntegration::SsaNode node) or @@ -1495,7 +1514,8 @@ private module Cached { TStructFieldContent(StructCanonicalPath s, string field) { field = s.getStruct().getFieldList().(RecordFieldList).getAField().getName().getText() } or - TCapturedVariableContent(VariableCapture::CapturedVariable v) + TCapturedVariableContent(VariableCapture::CapturedVariable v) or + TReferenceContent() cached newtype TContentSet = TSingletonContentSet(Content c) diff --git a/rust/ql/lib/codeql/rust/dataflow/internal/SsaImpl.qll b/rust/ql/lib/codeql/rust/dataflow/internal/SsaImpl.qll index 75b52b16c707..f2078999e60d 100644 --- a/rust/ql/lib/codeql/rust/dataflow/internal/SsaImpl.qll +++ b/rust/ql/lib/codeql/rust/dataflow/internal/SsaImpl.qll @@ -88,22 +88,16 @@ module SsaInput implements SsaImplCommon::InputSig { | va instanceof VariableReadAccess or + // For immutable variables, we model a read when they are borrowed + // (although the actual read happens later, if at all). + va = any(RefExpr re).getExpr() + or // Although compound assignments, like `x += y`, may in fact not read `x`, // it makes sense to treat them as such va = any(CompoundAssignmentExpr cae).getLhs() ) and certain = true or - // For immutable variables, we model a read when they are borrowed (although the - // actual read happens later, if at all). This only affects the SSA liveness - // analysis. - exists(VariableAccess va | - va = any(RefExpr re).getExpr() and - va = bb.getNode(i).getAstNode() and - v = va.getVariable() and - certain = false - ) - or capturedCallRead(_, bb, i, v) and certain = false or capturedExitRead(bb, i, v) and certain = false @@ -146,7 +140,9 @@ private predicate adjacentDefReadExt( /** Holds if `v` is read at index `i` in basic block `bb`. */ private predicate variableReadActual(BasicBlock bb, int i, Variable v) { - exists(VariableReadAccess read | + exists(VariableAccess read | + read instanceof VariableReadAccess or read = any(RefExpr re).getExpr() + | read.getVariable() = v and read = bb.getNode(i).getAstNode() ) diff --git a/rust/ql/lib/codeql/rust/dataflow/internal/TaintTrackingImpl.qll b/rust/ql/lib/codeql/rust/dataflow/internal/TaintTrackingImpl.qll index 25cc7e22fafc..4d2cd8b43ee6 100644 --- a/rust/ql/lib/codeql/rust/dataflow/internal/TaintTrackingImpl.qll +++ b/rust/ql/lib/codeql/rust/dataflow/internal/TaintTrackingImpl.qll @@ -59,7 +59,10 @@ module RustTaintTracking implements InputSig { bindingset[node] predicate defaultImplicitTaintRead(Node::Node node, ContentSet cs) { exists(node) and - cs.(SingletonContentSet).getContent() instanceof ArrayElementContent + exists(Content c | c = cs.(SingletonContentSet).getContent() | + c instanceof ArrayElementContent or + c instanceof ReferenceContent + ) } /** diff --git a/rust/ql/lib/codeql/rust/frameworks/reqwest.model.yml b/rust/ql/lib/codeql/rust/frameworks/reqwest.model.yml new file mode 100644 index 000000000000..8b2b9afc79b4 --- /dev/null +++ b/rust/ql/lib/codeql/rust/frameworks/reqwest.model.yml @@ -0,0 +1,6 @@ +extensions: + - addsTo: + pack: codeql/rust-all + extensible: summaryModel + data: + - ["repo:https://github.com/seanmonstar/reqwest:reqwest", "::text", "Argument[self]", "ReturnValue.Variant[crate::result::Result::Ok(0)]", "taint", "manual"] diff --git a/rust/ql/lib/codeql/rust/frameworks/stdlib/lang-core.model.yml b/rust/ql/lib/codeql/rust/frameworks/stdlib/lang-core.model.yml index db61e6c70b5b..f9ded7bc690c 100644 --- a/rust/ql/lib/codeql/rust/frameworks/stdlib/lang-core.model.yml +++ b/rust/ql/lib/codeql/rust/frameworks/stdlib/lang-core.model.yml @@ -3,4 +3,13 @@ extensions: pack: codeql/rust-all extensible: summaryModel data: + # Option - ["lang:core", "::unwrap", "Argument[self].Variant[crate::option::Option::Some(0)]", "ReturnValue", "value", "manual"] + - ["lang:core", "::unwrap_or", "Argument[self].Variant[crate::option::Option::Some(0)]", "ReturnValue", "value", "manual"] + - ["lang:core", "::unwrap_or", "Argument[0]", "ReturnValue", "value", "manual"] + # Result + - ["lang:core", "::unwrap", "Argument[self].Variant[crate::result::Result::Ok(0)]", "ReturnValue", "value", "manual"] + - ["lang:core", "::unwrap_or", "Argument[self].Variant[crate::result::Result::Ok(0)]", "ReturnValue", "value", "manual"] + - ["lang:core", "::unwrap_or", "Argument[0]", "ReturnValue", "value", "manual"] + # String + - ["lang:alloc", "::as_str", "Argument[self]", "ReturnValue", "taint", "manual"] diff --git a/rust/ql/lib/utils/test/InlineFlowTest.qll b/rust/ql/lib/utils/test/InlineFlowTest.qll index cb5b9f72abb2..894468c5aa9e 100644 --- a/rust/ql/lib/utils/test/InlineFlowTest.qll +++ b/rust/ql/lib/utils/test/InlineFlowTest.qll @@ -12,9 +12,13 @@ private import codeql.rust.dataflow.internal.TaintTrackingImpl private import codeql.rust.dataflow.internal.ModelsAsData as MaD private import internal.InlineExpectationsTestImpl as InlineExpectationsTestImpl -// Holds if the target expression of `call` is a path and the string representation of the path is `name`. +/** + * Holds if the target expression of `call` is a path and the string + * representation of the path has `name` as a prefix. + */ +bindingset[name] private predicate callTargetName(CallExprCfgNode call, string name) { - call.getFunction().(PathExprCfgNode).toString() = name + call.getFunction().(PathExprCfgNode).toString().matches(name + "%") } private module FlowTestImpl implements InputSig { diff --git a/rust/ql/test/library-tests/dataflow/local/CONSISTENCY/DataFlowConsistency.expected b/rust/ql/test/library-tests/dataflow/local/CONSISTENCY/DataFlowConsistency.expected index 19ff1527e16e..97d13b1e5d04 100644 --- a/rust/ql/test/library-tests/dataflow/local/CONSISTENCY/DataFlowConsistency.expected +++ b/rust/ql/test/library-tests/dataflow/local/CONSISTENCY/DataFlowConsistency.expected @@ -1,2 +1,2 @@ identityLocalStep -| main.rs:404:7:404:18 | phi(default_name) | Node steps to itself | +| main.rs:394:7:394:18 | phi(default_name) | Node steps to itself | diff --git a/rust/ql/test/library-tests/dataflow/local/DataFlowStep.expected b/rust/ql/test/library-tests/dataflow/local/DataFlowStep.expected index 1ec24c96b486..e77026b7e5c1 100644 --- a/rust/ql/test/library-tests/dataflow/local/DataFlowStep.expected +++ b/rust/ql/test/library-tests/dataflow/local/DataFlowStep.expected @@ -204,265 +204,261 @@ localStep | main.rs:224:9:224:10 | [SSA] s1 | main.rs:225:10:225:11 | s1 | | main.rs:224:9:224:10 | s1 | main.rs:224:9:224:10 | [SSA] s1 | | main.rs:224:14:224:29 | Some(...) | main.rs:224:9:224:10 | s1 | -| main.rs:229:9:229:10 | [SSA] s1 | main.rs:231:14:231:15 | s1 | +| main.rs:229:9:229:10 | [SSA] s1 | main.rs:230:10:230:11 | s1 | | main.rs:229:9:229:10 | s1 | main.rs:229:9:229:10 | [SSA] s1 | | main.rs:229:14:229:29 | Some(...) | main.rs:229:9:229:10 | s1 | -| main.rs:230:9:230:10 | [SSA] s2 | main.rs:233:10:233:11 | s2 | -| main.rs:230:9:230:10 | s2 | main.rs:230:9:230:10 | [SSA] s2 | -| main.rs:230:14:230:20 | Some(...) | main.rs:230:9:230:10 | s2 | -| main.rs:231:9:231:10 | [SSA] i1 | main.rs:232:10:232:11 | i1 | -| main.rs:231:9:231:10 | i1 | main.rs:231:9:231:10 | [SSA] i1 | -| main.rs:231:14:231:16 | TryExpr | main.rs:231:9:231:10 | i1 | -| main.rs:234:5:234:11 | Some(...) | main.rs:228:41:235:1 | { ... } | -| main.rs:238:9:238:10 | [SSA] s1 | main.rs:241:14:241:15 | s1 | -| main.rs:238:9:238:10 | s1 | main.rs:238:9:238:10 | [SSA] s1 | -| main.rs:238:32:238:45 | Ok(...) | main.rs:238:9:238:10 | s1 | -| main.rs:239:9:239:10 | [SSA] s2 | main.rs:242:14:242:15 | s2 | -| main.rs:239:9:239:10 | s2 | main.rs:239:9:239:10 | [SSA] s2 | -| main.rs:239:32:239:36 | Ok(...) | main.rs:239:9:239:10 | s2 | -| main.rs:240:9:240:10 | [SSA] s3 | main.rs:245:14:245:15 | s3 | -| main.rs:240:9:240:10 | s3 | main.rs:240:9:240:10 | [SSA] s3 | -| main.rs:240:32:240:46 | Err(...) | main.rs:240:9:240:10 | s3 | -| main.rs:241:9:241:10 | [SSA] i1 | main.rs:243:10:243:11 | i1 | -| main.rs:241:9:241:10 | i1 | main.rs:241:9:241:10 | [SSA] i1 | -| main.rs:241:14:241:16 | TryExpr | main.rs:241:9:241:10 | i1 | -| main.rs:242:9:242:10 | [SSA] i2 | main.rs:244:10:244:11 | i2 | -| main.rs:242:9:242:10 | i2 | main.rs:242:9:242:10 | [SSA] i2 | -| main.rs:242:14:242:16 | TryExpr | main.rs:242:9:242:10 | i2 | -| main.rs:245:9:245:10 | [SSA] i3 | main.rs:246:10:246:11 | i3 | -| main.rs:245:9:245:10 | i3 | main.rs:245:9:245:10 | [SSA] i3 | -| main.rs:245:14:245:16 | TryExpr | main.rs:245:9:245:10 | i3 | -| main.rs:247:5:247:9 | Ok(...) | main.rs:237:46:248:1 | { ... } | -| main.rs:256:9:256:10 | [SSA] s1 | main.rs:258:11:258:12 | s1 | -| main.rs:256:9:256:10 | s1 | main.rs:256:9:256:10 | [SSA] s1 | -| main.rs:256:14:256:39 | ...::A(...) | main.rs:256:9:256:10 | s1 | -| main.rs:257:9:257:10 | [SSA] s2 | main.rs:265:11:265:12 | s2 | -| main.rs:257:9:257:10 | s2 | main.rs:257:9:257:10 | [SSA] s2 | -| main.rs:257:14:257:30 | ...::B(...) | main.rs:257:9:257:10 | s2 | -| main.rs:258:11:258:12 | s1 | main.rs:259:9:259:25 | ...::A(...) | -| main.rs:258:11:258:12 | s1 | main.rs:260:9:260:25 | ...::B(...) | -| main.rs:258:11:258:12 | s1 | main.rs:262:11:262:12 | s1 | -| main.rs:259:24:259:24 | [SSA] n | main.rs:259:35:259:35 | n | -| main.rs:259:24:259:24 | n | main.rs:259:24:259:24 | [SSA] n | -| main.rs:259:30:259:36 | sink(...) | main.rs:258:5:261:5 | match s1 { ... } | -| main.rs:260:24:260:24 | [SSA] n | main.rs:260:35:260:35 | n | -| main.rs:260:24:260:24 | n | main.rs:260:24:260:24 | [SSA] n | -| main.rs:260:30:260:36 | sink(...) | main.rs:258:5:261:5 | match s1 { ... } | -| main.rs:262:11:262:12 | s1 | main.rs:263:9:263:45 | ... \| ... | -| main.rs:263:9:263:45 | ... \| ... | main.rs:263:9:263:25 | ...::A(...) | -| main.rs:263:9:263:45 | ... \| ... | main.rs:263:29:263:45 | ...::B(...) | -| main.rs:263:9:263:45 | [SSA] [match(true)] phi | main.rs:263:55:263:55 | n | -| main.rs:263:24:263:24 | [SSA] [input] [match(true)] phi | main.rs:263:9:263:45 | [SSA] [match(true)] phi | -| main.rs:263:24:263:24 | [SSA] n | main.rs:263:24:263:24 | [SSA] [input] [match(true)] phi | -| main.rs:263:24:263:24 | n | main.rs:263:24:263:24 | [SSA] n | -| main.rs:263:44:263:44 | [SSA] [input] [match(true)] phi | main.rs:263:9:263:45 | [SSA] [match(true)] phi | -| main.rs:263:44:263:44 | [SSA] n | main.rs:263:44:263:44 | [SSA] [input] [match(true)] phi | -| main.rs:263:44:263:44 | n | main.rs:263:44:263:44 | [SSA] n | -| main.rs:263:50:263:56 | sink(...) | main.rs:262:5:264:5 | match s1 { ... } | -| main.rs:265:5:268:5 | match s2 { ... } | main.rs:255:48:269:1 | { ... } | -| main.rs:265:11:265:12 | s2 | main.rs:266:9:266:25 | ...::A(...) | -| main.rs:265:11:265:12 | s2 | main.rs:267:9:267:25 | ...::B(...) | -| main.rs:266:24:266:24 | [SSA] n | main.rs:266:35:266:35 | n | -| main.rs:266:24:266:24 | n | main.rs:266:24:266:24 | [SSA] n | -| main.rs:266:30:266:36 | sink(...) | main.rs:265:5:268:5 | match s2 { ... } | +| main.rs:230:23:230:23 | 0 | main.rs:230:10:230:24 | s1.unwrap_or(...) | +| main.rs:232:9:232:10 | [SSA] s2 | main.rs:233:10:233:11 | s2 | +| main.rs:232:9:232:10 | s2 | main.rs:232:9:232:10 | [SSA] s2 | +| main.rs:232:14:232:20 | Some(...) | main.rs:232:9:232:10 | s2 | +| main.rs:233:23:233:32 | source(...) | main.rs:233:10:233:33 | s2.unwrap_or(...) | +| main.rs:237:9:237:10 | [SSA] s1 | main.rs:239:14:239:15 | s1 | +| main.rs:237:9:237:10 | s1 | main.rs:237:9:237:10 | [SSA] s1 | +| main.rs:237:14:237:29 | Some(...) | main.rs:237:9:237:10 | s1 | +| main.rs:238:9:238:10 | [SSA] s2 | main.rs:241:10:241:11 | s2 | +| main.rs:238:9:238:10 | s2 | main.rs:238:9:238:10 | [SSA] s2 | +| main.rs:238:14:238:20 | Some(...) | main.rs:238:9:238:10 | s2 | +| main.rs:239:9:239:10 | [SSA] i1 | main.rs:240:10:240:11 | i1 | +| main.rs:239:9:239:10 | i1 | main.rs:239:9:239:10 | [SSA] i1 | +| main.rs:239:14:239:16 | TryExpr | main.rs:239:9:239:10 | i1 | +| main.rs:242:5:242:11 | Some(...) | main.rs:236:41:243:1 | { ... } | +| main.rs:246:9:246:10 | [SSA] s1 | main.rs:249:14:249:15 | s1 | +| main.rs:246:9:246:10 | s1 | main.rs:246:9:246:10 | [SSA] s1 | +| main.rs:246:32:246:45 | Ok(...) | main.rs:246:9:246:10 | s1 | +| main.rs:247:9:247:10 | [SSA] s2 | main.rs:250:14:250:15 | s2 | +| main.rs:247:9:247:10 | s2 | main.rs:247:9:247:10 | [SSA] s2 | +| main.rs:247:32:247:36 | Ok(...) | main.rs:247:9:247:10 | s2 | +| main.rs:248:9:248:10 | [SSA] s3 | main.rs:253:14:253:15 | s3 | +| main.rs:248:9:248:10 | s3 | main.rs:248:9:248:10 | [SSA] s3 | +| main.rs:248:32:248:46 | Err(...) | main.rs:248:9:248:10 | s3 | +| main.rs:249:9:249:10 | [SSA] i1 | main.rs:251:10:251:11 | i1 | +| main.rs:249:9:249:10 | i1 | main.rs:249:9:249:10 | [SSA] i1 | +| main.rs:249:14:249:16 | TryExpr | main.rs:249:9:249:10 | i1 | +| main.rs:250:9:250:10 | [SSA] i2 | main.rs:252:10:252:11 | i2 | +| main.rs:250:9:250:10 | i2 | main.rs:250:9:250:10 | [SSA] i2 | +| main.rs:250:14:250:16 | TryExpr | main.rs:250:9:250:10 | i2 | +| main.rs:253:9:253:10 | [SSA] i3 | main.rs:254:10:254:11 | i3 | +| main.rs:253:9:253:10 | i3 | main.rs:253:9:253:10 | [SSA] i3 | +| main.rs:253:14:253:16 | TryExpr | main.rs:253:9:253:10 | i3 | +| main.rs:255:5:255:9 | Ok(...) | main.rs:245:46:256:1 | { ... } | +| main.rs:264:9:264:10 | [SSA] s1 | main.rs:266:11:266:12 | s1 | +| main.rs:264:9:264:10 | s1 | main.rs:264:9:264:10 | [SSA] s1 | +| main.rs:264:14:264:39 | ...::A(...) | main.rs:264:9:264:10 | s1 | +| main.rs:265:9:265:10 | [SSA] s2 | main.rs:273:11:273:12 | s2 | +| main.rs:265:9:265:10 | s2 | main.rs:265:9:265:10 | [SSA] s2 | +| main.rs:265:14:265:30 | ...::B(...) | main.rs:265:9:265:10 | s2 | +| main.rs:266:11:266:12 | s1 | main.rs:267:9:267:25 | ...::A(...) | +| main.rs:266:11:266:12 | s1 | main.rs:268:9:268:25 | ...::B(...) | +| main.rs:266:11:266:12 | s1 | main.rs:270:11:270:12 | s1 | | main.rs:267:24:267:24 | [SSA] n | main.rs:267:35:267:35 | n | | main.rs:267:24:267:24 | n | main.rs:267:24:267:24 | [SSA] n | -| main.rs:267:30:267:36 | sink(...) | main.rs:265:5:268:5 | match s2 { ... } | -| main.rs:274:9:274:10 | [SSA] s1 | main.rs:276:11:276:12 | s1 | -| main.rs:274:9:274:10 | s1 | main.rs:274:9:274:10 | [SSA] s1 | -| main.rs:274:14:274:26 | A(...) | main.rs:274:9:274:10 | s1 | -| main.rs:275:9:275:10 | [SSA] s2 | main.rs:283:11:283:12 | s2 | -| main.rs:275:9:275:10 | s2 | main.rs:275:9:275:10 | [SSA] s2 | -| main.rs:275:14:275:17 | B(...) | main.rs:275:9:275:10 | s2 | -| main.rs:276:11:276:12 | s1 | main.rs:277:9:277:12 | A(...) | -| main.rs:276:11:276:12 | s1 | main.rs:278:9:278:12 | B(...) | -| main.rs:276:11:276:12 | s1 | main.rs:280:11:280:12 | s1 | -| main.rs:277:11:277:11 | [SSA] n | main.rs:277:22:277:22 | n | -| main.rs:277:11:277:11 | n | main.rs:277:11:277:11 | [SSA] n | -| main.rs:277:17:277:23 | sink(...) | main.rs:276:5:279:5 | match s1 { ... } | -| main.rs:278:11:278:11 | [SSA] n | main.rs:278:22:278:22 | n | -| main.rs:278:11:278:11 | n | main.rs:278:11:278:11 | [SSA] n | -| main.rs:278:17:278:23 | sink(...) | main.rs:276:5:279:5 | match s1 { ... } | -| main.rs:280:11:280:12 | s1 | main.rs:281:9:281:19 | ... \| ... | -| main.rs:281:9:281:19 | ... \| ... | main.rs:281:9:281:12 | A(...) | -| main.rs:281:9:281:19 | ... \| ... | main.rs:281:16:281:19 | B(...) | -| main.rs:281:9:281:19 | [SSA] [match(true)] phi | main.rs:281:29:281:29 | n | -| main.rs:281:11:281:11 | [SSA] [input] [match(true)] phi | main.rs:281:9:281:19 | [SSA] [match(true)] phi | -| main.rs:281:11:281:11 | [SSA] n | main.rs:281:11:281:11 | [SSA] [input] [match(true)] phi | -| main.rs:281:11:281:11 | n | main.rs:281:11:281:11 | [SSA] n | -| main.rs:281:18:281:18 | [SSA] [input] [match(true)] phi | main.rs:281:9:281:19 | [SSA] [match(true)] phi | -| main.rs:281:18:281:18 | [SSA] n | main.rs:281:18:281:18 | [SSA] [input] [match(true)] phi | -| main.rs:281:18:281:18 | n | main.rs:281:18:281:18 | [SSA] n | -| main.rs:281:24:281:30 | sink(...) | main.rs:280:5:282:5 | match s1 { ... } | -| main.rs:283:5:286:5 | match s2 { ... } | main.rs:273:50:287:1 | { ... } | -| main.rs:283:11:283:12 | s2 | main.rs:284:9:284:12 | A(...) | -| main.rs:283:11:283:12 | s2 | main.rs:285:9:285:12 | B(...) | -| main.rs:284:11:284:11 | [SSA] n | main.rs:284:22:284:22 | n | -| main.rs:284:11:284:11 | n | main.rs:284:11:284:11 | [SSA] n | -| main.rs:284:17:284:23 | sink(...) | main.rs:283:5:286:5 | match s2 { ... } | +| main.rs:267:30:267:36 | sink(...) | main.rs:266:5:269:5 | match s1 { ... } | +| main.rs:268:24:268:24 | [SSA] n | main.rs:268:35:268:35 | n | +| main.rs:268:24:268:24 | n | main.rs:268:24:268:24 | [SSA] n | +| main.rs:268:30:268:36 | sink(...) | main.rs:266:5:269:5 | match s1 { ... } | +| main.rs:270:11:270:12 | s1 | main.rs:271:9:271:45 | ... \| ... | +| main.rs:271:9:271:45 | ... \| ... | main.rs:271:9:271:25 | ...::A(...) | +| main.rs:271:9:271:45 | ... \| ... | main.rs:271:29:271:45 | ...::B(...) | +| main.rs:271:9:271:45 | [SSA] [match(true)] phi | main.rs:271:55:271:55 | n | +| main.rs:271:24:271:24 | [SSA] [input] [match(true)] phi | main.rs:271:9:271:45 | [SSA] [match(true)] phi | +| main.rs:271:24:271:24 | [SSA] n | main.rs:271:24:271:24 | [SSA] [input] [match(true)] phi | +| main.rs:271:24:271:24 | n | main.rs:271:24:271:24 | [SSA] n | +| main.rs:271:44:271:44 | [SSA] [input] [match(true)] phi | main.rs:271:9:271:45 | [SSA] [match(true)] phi | +| main.rs:271:44:271:44 | [SSA] n | main.rs:271:44:271:44 | [SSA] [input] [match(true)] phi | +| main.rs:271:44:271:44 | n | main.rs:271:44:271:44 | [SSA] n | +| main.rs:271:50:271:56 | sink(...) | main.rs:270:5:272:5 | match s1 { ... } | +| main.rs:273:5:276:5 | match s2 { ... } | main.rs:263:48:277:1 | { ... } | +| main.rs:273:11:273:12 | s2 | main.rs:274:9:274:25 | ...::A(...) | +| main.rs:273:11:273:12 | s2 | main.rs:275:9:275:25 | ...::B(...) | +| main.rs:274:24:274:24 | [SSA] n | main.rs:274:35:274:35 | n | +| main.rs:274:24:274:24 | n | main.rs:274:24:274:24 | [SSA] n | +| main.rs:274:30:274:36 | sink(...) | main.rs:273:5:276:5 | match s2 { ... } | +| main.rs:275:24:275:24 | [SSA] n | main.rs:275:35:275:35 | n | +| main.rs:275:24:275:24 | n | main.rs:275:24:275:24 | [SSA] n | +| main.rs:275:30:275:36 | sink(...) | main.rs:273:5:276:5 | match s2 { ... } | +| main.rs:282:9:282:10 | [SSA] s1 | main.rs:284:11:284:12 | s1 | +| main.rs:282:9:282:10 | s1 | main.rs:282:9:282:10 | [SSA] s1 | +| main.rs:282:14:282:26 | A(...) | main.rs:282:9:282:10 | s1 | +| main.rs:283:9:283:10 | [SSA] s2 | main.rs:291:11:291:12 | s2 | +| main.rs:283:9:283:10 | s2 | main.rs:283:9:283:10 | [SSA] s2 | +| main.rs:283:14:283:17 | B(...) | main.rs:283:9:283:10 | s2 | +| main.rs:284:11:284:12 | s1 | main.rs:285:9:285:12 | A(...) | +| main.rs:284:11:284:12 | s1 | main.rs:286:9:286:12 | B(...) | +| main.rs:284:11:284:12 | s1 | main.rs:288:11:288:12 | s1 | | main.rs:285:11:285:11 | [SSA] n | main.rs:285:22:285:22 | n | | main.rs:285:11:285:11 | n | main.rs:285:11:285:11 | [SSA] n | -| main.rs:285:17:285:23 | sink(...) | main.rs:283:5:286:5 | match s2 { ... } | -| main.rs:295:9:295:10 | [SSA] s1 | main.rs:299:11:299:12 | s1 | -| main.rs:295:9:295:10 | s1 | main.rs:295:9:295:10 | [SSA] s1 | -| main.rs:295:14:297:5 | ...::C {...} | main.rs:295:9:295:10 | s1 | -| main.rs:298:9:298:10 | [SSA] s2 | main.rs:306:11:306:12 | s2 | -| main.rs:298:9:298:10 | s2 | main.rs:298:9:298:10 | [SSA] s2 | -| main.rs:298:14:298:43 | ...::D {...} | main.rs:298:9:298:10 | s2 | -| main.rs:299:11:299:12 | s1 | main.rs:300:9:300:38 | ...::C {...} | -| main.rs:299:11:299:12 | s1 | main.rs:301:9:301:38 | ...::D {...} | -| main.rs:299:11:299:12 | s1 | main.rs:303:11:303:12 | s1 | -| main.rs:300:36:300:36 | [SSA] n | main.rs:300:48:300:48 | n | -| main.rs:300:36:300:36 | n | main.rs:300:36:300:36 | [SSA] n | -| main.rs:300:43:300:49 | sink(...) | main.rs:299:5:302:5 | match s1 { ... } | -| main.rs:301:36:301:36 | [SSA] n | main.rs:301:48:301:48 | n | -| main.rs:301:36:301:36 | n | main.rs:301:36:301:36 | [SSA] n | -| main.rs:301:43:301:49 | sink(...) | main.rs:299:5:302:5 | match s1 { ... } | -| main.rs:303:11:303:12 | s1 | main.rs:304:9:304:71 | ... \| ... | -| main.rs:304:9:304:71 | ... \| ... | main.rs:304:9:304:38 | ...::C {...} | -| main.rs:304:9:304:71 | ... \| ... | main.rs:304:42:304:71 | ...::D {...} | -| main.rs:304:9:304:71 | [SSA] [match(true)] phi | main.rs:304:81:304:81 | n | -| main.rs:304:36:304:36 | [SSA] [input] [match(true)] phi | main.rs:304:9:304:71 | [SSA] [match(true)] phi | -| main.rs:304:36:304:36 | [SSA] n | main.rs:304:36:304:36 | [SSA] [input] [match(true)] phi | -| main.rs:304:36:304:36 | n | main.rs:304:36:304:36 | [SSA] n | -| main.rs:304:69:304:69 | [SSA] [input] [match(true)] phi | main.rs:304:9:304:71 | [SSA] [match(true)] phi | -| main.rs:304:69:304:69 | [SSA] n | main.rs:304:69:304:69 | [SSA] [input] [match(true)] phi | -| main.rs:304:69:304:69 | n | main.rs:304:69:304:69 | [SSA] n | -| main.rs:304:76:304:82 | sink(...) | main.rs:303:5:305:5 | match s1 { ... } | -| main.rs:306:5:309:5 | match s2 { ... } | main.rs:294:49:310:1 | { ... } | -| main.rs:306:11:306:12 | s2 | main.rs:307:9:307:38 | ...::C {...} | -| main.rs:306:11:306:12 | s2 | main.rs:308:9:308:38 | ...::D {...} | -| main.rs:307:36:307:36 | [SSA] n | main.rs:307:48:307:48 | n | -| main.rs:307:36:307:36 | n | main.rs:307:36:307:36 | [SSA] n | -| main.rs:307:43:307:49 | sink(...) | main.rs:306:5:309:5 | match s2 { ... } | +| main.rs:285:17:285:23 | sink(...) | main.rs:284:5:287:5 | match s1 { ... } | +| main.rs:286:11:286:11 | [SSA] n | main.rs:286:22:286:22 | n | +| main.rs:286:11:286:11 | n | main.rs:286:11:286:11 | [SSA] n | +| main.rs:286:17:286:23 | sink(...) | main.rs:284:5:287:5 | match s1 { ... } | +| main.rs:288:11:288:12 | s1 | main.rs:289:9:289:19 | ... \| ... | +| main.rs:289:9:289:19 | ... \| ... | main.rs:289:9:289:12 | A(...) | +| main.rs:289:9:289:19 | ... \| ... | main.rs:289:16:289:19 | B(...) | +| main.rs:289:9:289:19 | [SSA] [match(true)] phi | main.rs:289:29:289:29 | n | +| main.rs:289:11:289:11 | [SSA] [input] [match(true)] phi | main.rs:289:9:289:19 | [SSA] [match(true)] phi | +| main.rs:289:11:289:11 | [SSA] n | main.rs:289:11:289:11 | [SSA] [input] [match(true)] phi | +| main.rs:289:11:289:11 | n | main.rs:289:11:289:11 | [SSA] n | +| main.rs:289:18:289:18 | [SSA] [input] [match(true)] phi | main.rs:289:9:289:19 | [SSA] [match(true)] phi | +| main.rs:289:18:289:18 | [SSA] n | main.rs:289:18:289:18 | [SSA] [input] [match(true)] phi | +| main.rs:289:18:289:18 | n | main.rs:289:18:289:18 | [SSA] n | +| main.rs:289:24:289:30 | sink(...) | main.rs:288:5:290:5 | match s1 { ... } | +| main.rs:291:5:294:5 | match s2 { ... } | main.rs:281:50:295:1 | { ... } | +| main.rs:291:11:291:12 | s2 | main.rs:292:9:292:12 | A(...) | +| main.rs:291:11:291:12 | s2 | main.rs:293:9:293:12 | B(...) | +| main.rs:292:11:292:11 | [SSA] n | main.rs:292:22:292:22 | n | +| main.rs:292:11:292:11 | n | main.rs:292:11:292:11 | [SSA] n | +| main.rs:292:17:292:23 | sink(...) | main.rs:291:5:294:5 | match s2 { ... } | +| main.rs:293:11:293:11 | [SSA] n | main.rs:293:22:293:22 | n | +| main.rs:293:11:293:11 | n | main.rs:293:11:293:11 | [SSA] n | +| main.rs:293:17:293:23 | sink(...) | main.rs:291:5:294:5 | match s2 { ... } | +| main.rs:303:9:303:10 | [SSA] s1 | main.rs:307:11:307:12 | s1 | +| main.rs:303:9:303:10 | s1 | main.rs:303:9:303:10 | [SSA] s1 | +| main.rs:303:14:305:5 | ...::C {...} | main.rs:303:9:303:10 | s1 | +| main.rs:306:9:306:10 | [SSA] s2 | main.rs:314:11:314:12 | s2 | +| main.rs:306:9:306:10 | s2 | main.rs:306:9:306:10 | [SSA] s2 | +| main.rs:306:14:306:43 | ...::D {...} | main.rs:306:9:306:10 | s2 | +| main.rs:307:11:307:12 | s1 | main.rs:308:9:308:38 | ...::C {...} | +| main.rs:307:11:307:12 | s1 | main.rs:309:9:309:38 | ...::D {...} | +| main.rs:307:11:307:12 | s1 | main.rs:311:11:311:12 | s1 | | main.rs:308:36:308:36 | [SSA] n | main.rs:308:48:308:48 | n | | main.rs:308:36:308:36 | n | main.rs:308:36:308:36 | [SSA] n | -| main.rs:308:43:308:49 | sink(...) | main.rs:306:5:309:5 | match s2 { ... } | -| main.rs:315:9:315:10 | [SSA] s1 | main.rs:319:11:319:12 | s1 | -| main.rs:315:9:315:10 | s1 | main.rs:315:9:315:10 | [SSA] s1 | -| main.rs:315:14:317:5 | C {...} | main.rs:315:9:315:10 | s1 | -| main.rs:318:9:318:10 | [SSA] s2 | main.rs:326:11:326:12 | s2 | -| main.rs:318:9:318:10 | s2 | main.rs:318:9:318:10 | [SSA] s2 | -| main.rs:318:14:318:29 | D {...} | main.rs:318:9:318:10 | s2 | -| main.rs:319:11:319:12 | s1 | main.rs:320:9:320:24 | C {...} | -| main.rs:319:11:319:12 | s1 | main.rs:321:9:321:24 | D {...} | -| main.rs:319:11:319:12 | s1 | main.rs:323:11:323:12 | s1 | -| main.rs:320:22:320:22 | [SSA] n | main.rs:320:34:320:34 | n | -| main.rs:320:22:320:22 | n | main.rs:320:22:320:22 | [SSA] n | -| main.rs:320:29:320:35 | sink(...) | main.rs:319:5:322:5 | match s1 { ... } | -| main.rs:321:22:321:22 | [SSA] n | main.rs:321:34:321:34 | n | -| main.rs:321:22:321:22 | n | main.rs:321:22:321:22 | [SSA] n | -| main.rs:321:29:321:35 | sink(...) | main.rs:319:5:322:5 | match s1 { ... } | -| main.rs:323:11:323:12 | s1 | main.rs:324:9:324:43 | ... \| ... | -| main.rs:324:9:324:43 | ... \| ... | main.rs:324:9:324:24 | C {...} | -| main.rs:324:9:324:43 | ... \| ... | main.rs:324:28:324:43 | D {...} | -| main.rs:324:9:324:43 | [SSA] [match(true)] phi | main.rs:324:53:324:53 | n | -| main.rs:324:22:324:22 | [SSA] [input] [match(true)] phi | main.rs:324:9:324:43 | [SSA] [match(true)] phi | -| main.rs:324:22:324:22 | [SSA] n | main.rs:324:22:324:22 | [SSA] [input] [match(true)] phi | -| main.rs:324:22:324:22 | n | main.rs:324:22:324:22 | [SSA] n | -| main.rs:324:41:324:41 | [SSA] [input] [match(true)] phi | main.rs:324:9:324:43 | [SSA] [match(true)] phi | -| main.rs:324:41:324:41 | [SSA] n | main.rs:324:41:324:41 | [SSA] [input] [match(true)] phi | -| main.rs:324:41:324:41 | n | main.rs:324:41:324:41 | [SSA] n | -| main.rs:324:48:324:54 | sink(...) | main.rs:323:5:325:5 | match s1 { ... } | -| main.rs:326:5:329:5 | match s2 { ... } | main.rs:314:51:330:1 | { ... } | -| main.rs:326:11:326:12 | s2 | main.rs:327:9:327:24 | C {...} | -| main.rs:326:11:326:12 | s2 | main.rs:328:9:328:24 | D {...} | -| main.rs:327:22:327:22 | [SSA] n | main.rs:327:34:327:34 | n | -| main.rs:327:22:327:22 | n | main.rs:327:22:327:22 | [SSA] n | -| main.rs:327:29:327:35 | sink(...) | main.rs:326:5:329:5 | match s2 { ... } | +| main.rs:308:43:308:49 | sink(...) | main.rs:307:5:310:5 | match s1 { ... } | +| main.rs:309:36:309:36 | [SSA] n | main.rs:309:48:309:48 | n | +| main.rs:309:36:309:36 | n | main.rs:309:36:309:36 | [SSA] n | +| main.rs:309:43:309:49 | sink(...) | main.rs:307:5:310:5 | match s1 { ... } | +| main.rs:311:11:311:12 | s1 | main.rs:312:9:312:71 | ... \| ... | +| main.rs:312:9:312:71 | ... \| ... | main.rs:312:9:312:38 | ...::C {...} | +| main.rs:312:9:312:71 | ... \| ... | main.rs:312:42:312:71 | ...::D {...} | +| main.rs:312:9:312:71 | [SSA] [match(true)] phi | main.rs:312:81:312:81 | n | +| main.rs:312:36:312:36 | [SSA] [input] [match(true)] phi | main.rs:312:9:312:71 | [SSA] [match(true)] phi | +| main.rs:312:36:312:36 | [SSA] n | main.rs:312:36:312:36 | [SSA] [input] [match(true)] phi | +| main.rs:312:36:312:36 | n | main.rs:312:36:312:36 | [SSA] n | +| main.rs:312:69:312:69 | [SSA] [input] [match(true)] phi | main.rs:312:9:312:71 | [SSA] [match(true)] phi | +| main.rs:312:69:312:69 | [SSA] n | main.rs:312:69:312:69 | [SSA] [input] [match(true)] phi | +| main.rs:312:69:312:69 | n | main.rs:312:69:312:69 | [SSA] n | +| main.rs:312:76:312:82 | sink(...) | main.rs:311:5:313:5 | match s1 { ... } | +| main.rs:314:5:317:5 | match s2 { ... } | main.rs:302:49:318:1 | { ... } | +| main.rs:314:11:314:12 | s2 | main.rs:315:9:315:38 | ...::C {...} | +| main.rs:314:11:314:12 | s2 | main.rs:316:9:316:38 | ...::D {...} | +| main.rs:315:36:315:36 | [SSA] n | main.rs:315:48:315:48 | n | +| main.rs:315:36:315:36 | n | main.rs:315:36:315:36 | [SSA] n | +| main.rs:315:43:315:49 | sink(...) | main.rs:314:5:317:5 | match s2 { ... } | +| main.rs:316:36:316:36 | [SSA] n | main.rs:316:48:316:48 | n | +| main.rs:316:36:316:36 | n | main.rs:316:36:316:36 | [SSA] n | +| main.rs:316:43:316:49 | sink(...) | main.rs:314:5:317:5 | match s2 { ... } | +| main.rs:323:9:323:10 | [SSA] s1 | main.rs:327:11:327:12 | s1 | +| main.rs:323:9:323:10 | s1 | main.rs:323:9:323:10 | [SSA] s1 | +| main.rs:323:14:325:5 | C {...} | main.rs:323:9:323:10 | s1 | +| main.rs:326:9:326:10 | [SSA] s2 | main.rs:334:11:334:12 | s2 | +| main.rs:326:9:326:10 | s2 | main.rs:326:9:326:10 | [SSA] s2 | +| main.rs:326:14:326:29 | D {...} | main.rs:326:9:326:10 | s2 | +| main.rs:327:11:327:12 | s1 | main.rs:328:9:328:24 | C {...} | +| main.rs:327:11:327:12 | s1 | main.rs:329:9:329:24 | D {...} | +| main.rs:327:11:327:12 | s1 | main.rs:331:11:331:12 | s1 | | main.rs:328:22:328:22 | [SSA] n | main.rs:328:34:328:34 | n | | main.rs:328:22:328:22 | n | main.rs:328:22:328:22 | [SSA] n | -| main.rs:328:29:328:35 | sink(...) | main.rs:326:5:329:5 | match s2 { ... } | -| main.rs:336:9:336:12 | [SSA] arr1 | main.rs:337:14:337:17 | arr1 | -| main.rs:336:9:336:12 | arr1 | main.rs:336:9:336:12 | [SSA] arr1 | -| main.rs:336:16:336:33 | [...] | main.rs:336:9:336:12 | arr1 | -| main.rs:337:9:337:10 | [SSA] n1 | main.rs:338:10:338:11 | n1 | -| main.rs:337:9:337:10 | n1 | main.rs:337:9:337:10 | [SSA] n1 | -| main.rs:337:14:337:20 | arr1[2] | main.rs:337:9:337:10 | n1 | -| main.rs:340:9:340:12 | [SSA] arr2 | main.rs:341:14:341:17 | arr2 | -| main.rs:340:9:340:12 | arr2 | main.rs:340:9:340:12 | [SSA] arr2 | -| main.rs:340:16:340:31 | [...; 10] | main.rs:340:9:340:12 | arr2 | -| main.rs:341:9:341:10 | [SSA] n2 | main.rs:342:10:342:11 | n2 | -| main.rs:341:9:341:10 | n2 | main.rs:341:9:341:10 | [SSA] n2 | -| main.rs:341:14:341:20 | arr2[4] | main.rs:341:9:341:10 | n2 | -| main.rs:344:9:344:12 | [SSA] arr3 | main.rs:345:14:345:17 | arr3 | -| main.rs:344:9:344:12 | arr3 | main.rs:344:9:344:12 | [SSA] arr3 | -| main.rs:344:16:344:24 | [...] | main.rs:344:9:344:12 | arr3 | -| main.rs:345:9:345:10 | [SSA] n3 | main.rs:346:10:346:11 | n3 | -| main.rs:345:9:345:10 | n3 | main.rs:345:9:345:10 | [SSA] n3 | -| main.rs:345:14:345:20 | arr3[2] | main.rs:345:9:345:10 | n3 | -| main.rs:350:9:350:12 | [SSA] arr1 | main.rs:351:15:351:18 | arr1 | -| main.rs:350:9:350:12 | arr1 | main.rs:350:9:350:12 | [SSA] arr1 | -| main.rs:350:16:350:33 | [...] | main.rs:350:9:350:12 | arr1 | -| main.rs:351:9:351:10 | [SSA] n1 | main.rs:352:14:352:15 | n1 | -| main.rs:351:9:351:10 | n1 | main.rs:351:9:351:10 | [SSA] n1 | -| main.rs:355:9:355:12 | [SSA] arr2 | main.rs:356:15:356:18 | arr2 | -| main.rs:355:9:355:12 | arr2 | main.rs:355:9:355:12 | [SSA] arr2 | -| main.rs:355:16:355:24 | [...] | main.rs:355:9:355:12 | arr2 | -| main.rs:356:5:358:5 | for ... in ... { ... } | main.rs:349:21:359:1 | { ... } | -| main.rs:356:9:356:10 | [SSA] n2 | main.rs:357:14:357:15 | n2 | -| main.rs:356:9:356:10 | n2 | main.rs:356:9:356:10 | [SSA] n2 | -| main.rs:362:9:362:12 | [SSA] arr1 | main.rs:363:11:363:14 | arr1 | -| main.rs:362:9:362:12 | arr1 | main.rs:362:9:362:12 | [SSA] arr1 | -| main.rs:362:16:362:33 | [...] | main.rs:362:9:362:12 | arr1 | -| main.rs:363:5:369:5 | match arr1 { ... } | main.rs:361:26:370:1 | { ... } | -| main.rs:363:11:363:14 | arr1 | main.rs:364:9:364:17 | SlicePat | -| main.rs:364:10:364:10 | [SSA] a | main.rs:365:18:365:18 | a | -| main.rs:364:10:364:10 | a | main.rs:364:10:364:10 | [SSA] a | -| main.rs:364:13:364:13 | [SSA] b | main.rs:366:18:366:18 | b | -| main.rs:364:13:364:13 | b | main.rs:364:13:364:13 | [SSA] b | -| main.rs:364:16:364:16 | [SSA] c | main.rs:367:18:367:18 | c | -| main.rs:364:16:364:16 | c | main.rs:364:16:364:16 | [SSA] c | -| main.rs:364:22:368:9 | { ... } | main.rs:363:5:369:5 | match arr1 { ... } | -| main.rs:373:9:373:19 | [SSA] mut_arr | main.rs:374:10:374:16 | mut_arr | -| main.rs:373:9:373:19 | mut_arr | main.rs:373:9:373:19 | [SSA] mut_arr | -| main.rs:373:23:373:31 | [...] | main.rs:373:9:373:19 | mut_arr | -| main.rs:374:10:374:16 | [post] mut_arr | main.rs:376:5:376:11 | mut_arr | -| main.rs:374:10:374:16 | mut_arr | main.rs:376:5:376:11 | mut_arr | -| main.rs:376:5:376:11 | [post] mut_arr | main.rs:377:13:377:19 | mut_arr | -| main.rs:376:5:376:11 | mut_arr | main.rs:377:13:377:19 | mut_arr | -| main.rs:376:18:376:27 | source(...) | main.rs:376:5:376:14 | mut_arr[1] | -| main.rs:377:9:377:9 | [SSA] d | main.rs:378:10:378:10 | d | -| main.rs:377:9:377:9 | d | main.rs:377:9:377:9 | [SSA] d | -| main.rs:377:13:377:19 | [post] mut_arr | main.rs:379:10:379:16 | mut_arr | -| main.rs:377:13:377:19 | mut_arr | main.rs:379:10:379:16 | mut_arr | -| main.rs:377:13:377:22 | mut_arr[1] | main.rs:377:9:377:9 | d | -| main.rs:386:9:386:9 | a | main.rs:386:9:386:9 | [SSA] a | -| main.rs:386:13:386:22 | source(...) | main.rs:386:9:386:9 | a | -| main.rs:387:9:387:9 | [SSA] b | main.rs:388:14:388:14 | b | -| main.rs:387:9:387:9 | b | main.rs:387:9:387:9 | [SSA] b | -| main.rs:387:13:387:14 | &a | main.rs:387:9:387:9 | b | -| main.rs:388:9:388:9 | [SSA] c | main.rs:389:10:389:10 | c | -| main.rs:388:9:388:9 | c | main.rs:388:9:388:9 | [SSA] c | -| main.rs:388:13:388:14 | * ... | main.rs:388:9:388:9 | c | -| main.rs:393:17:393:17 | 1 | main.rs:393:9:393:13 | a | -| main.rs:395:9:395:9 | [SSA] b | main.rs:396:6:396:6 | b | -| main.rs:395:9:395:9 | b | main.rs:395:9:395:9 | [SSA] b | -| main.rs:395:13:395:18 | &mut a | main.rs:395:9:395:9 | b | -| main.rs:396:10:396:19 | source(...) | main.rs:396:5:396:6 | * ... | -| main.rs:402:39:402:43 | [SSA] names | main.rs:404:23:404:27 | names | -| main.rs:402:39:402:43 | names | main.rs:402:39:402:43 | [SSA] names | -| main.rs:402:39:402:72 | ...: Vec::<...> | main.rs:402:39:402:43 | names | -| main.rs:403:7:403:18 | [SSA] default_name | main.rs:404:23:404:27 | [SSA] [input] SSA phi read(default_name) | -| main.rs:403:7:403:18 | default_name | main.rs:403:7:403:18 | [SSA] default_name | -| main.rs:403:22:403:43 | ... .to_string(...) | main.rs:403:7:403:18 | default_name | -| main.rs:404:3:410:3 | for ... in ... { ... } | main.rs:402:75:411:1 | { ... } | -| main.rs:404:7:404:18 | [SSA] SSA phi read(default_name) | main.rs:404:29:410:3 | [SSA] [input] SSA phi read(default_name) | -| main.rs:404:7:404:18 | [SSA] SSA phi read(default_name) | main.rs:408:7:408:14 | [SSA] [input] SSA phi read(default_name) | -| main.rs:404:8:404:11 | [SSA] cond | main.rs:405:8:405:11 | cond | -| main.rs:404:8:404:11 | cond | main.rs:404:8:404:11 | [SSA] cond | -| main.rs:404:14:404:17 | [SSA] name | main.rs:406:15:406:18 | name | -| main.rs:404:14:404:17 | name | main.rs:404:14:404:17 | [SSA] name | -| main.rs:404:23:404:27 | [SSA] [input] SSA phi read(default_name) | main.rs:404:7:404:18 | [SSA] SSA phi read(default_name) | -| main.rs:404:29:410:3 | [SSA] [input] SSA phi read(default_name) | main.rs:404:7:404:18 | [SSA] SSA phi read(default_name) | -| main.rs:405:5:409:5 | if cond {...} | main.rs:404:29:410:3 | { ... } | -| main.rs:406:11:406:11 | [SSA] n | main.rs:407:12:407:12 | n | -| main.rs:406:11:406:11 | n | main.rs:406:11:406:11 | [SSA] n | -| main.rs:406:15:406:62 | name.unwrap_or_else(...) | main.rs:406:11:406:11 | n | -| main.rs:406:35:406:61 | [SSA] default_name | main.rs:406:38:406:49 | default_name | -| main.rs:408:7:408:14 | [SSA] [input] SSA phi read(default_name) | main.rs:404:7:404:18 | [SSA] SSA phi read(default_name) | -| main.rs:434:13:434:33 | result_questionmark(...) | main.rs:434:9:434:9 | _ | +| main.rs:328:29:328:35 | sink(...) | main.rs:327:5:330:5 | match s1 { ... } | +| main.rs:329:22:329:22 | [SSA] n | main.rs:329:34:329:34 | n | +| main.rs:329:22:329:22 | n | main.rs:329:22:329:22 | [SSA] n | +| main.rs:329:29:329:35 | sink(...) | main.rs:327:5:330:5 | match s1 { ... } | +| main.rs:331:11:331:12 | s1 | main.rs:332:9:332:43 | ... \| ... | +| main.rs:332:9:332:43 | ... \| ... | main.rs:332:9:332:24 | C {...} | +| main.rs:332:9:332:43 | ... \| ... | main.rs:332:28:332:43 | D {...} | +| main.rs:332:9:332:43 | [SSA] [match(true)] phi | main.rs:332:53:332:53 | n | +| main.rs:332:22:332:22 | [SSA] [input] [match(true)] phi | main.rs:332:9:332:43 | [SSA] [match(true)] phi | +| main.rs:332:22:332:22 | [SSA] n | main.rs:332:22:332:22 | [SSA] [input] [match(true)] phi | +| main.rs:332:22:332:22 | n | main.rs:332:22:332:22 | [SSA] n | +| main.rs:332:41:332:41 | [SSA] [input] [match(true)] phi | main.rs:332:9:332:43 | [SSA] [match(true)] phi | +| main.rs:332:41:332:41 | [SSA] n | main.rs:332:41:332:41 | [SSA] [input] [match(true)] phi | +| main.rs:332:41:332:41 | n | main.rs:332:41:332:41 | [SSA] n | +| main.rs:332:48:332:54 | sink(...) | main.rs:331:5:333:5 | match s1 { ... } | +| main.rs:334:5:337:5 | match s2 { ... } | main.rs:322:51:338:1 | { ... } | +| main.rs:334:11:334:12 | s2 | main.rs:335:9:335:24 | C {...} | +| main.rs:334:11:334:12 | s2 | main.rs:336:9:336:24 | D {...} | +| main.rs:335:22:335:22 | [SSA] n | main.rs:335:34:335:34 | n | +| main.rs:335:22:335:22 | n | main.rs:335:22:335:22 | [SSA] n | +| main.rs:335:29:335:35 | sink(...) | main.rs:334:5:337:5 | match s2 { ... } | +| main.rs:336:22:336:22 | [SSA] n | main.rs:336:34:336:34 | n | +| main.rs:336:22:336:22 | n | main.rs:336:22:336:22 | [SSA] n | +| main.rs:336:29:336:35 | sink(...) | main.rs:334:5:337:5 | match s2 { ... } | +| main.rs:344:9:344:12 | [SSA] arr1 | main.rs:345:14:345:17 | arr1 | +| main.rs:344:9:344:12 | arr1 | main.rs:344:9:344:12 | [SSA] arr1 | +| main.rs:344:16:344:33 | [...] | main.rs:344:9:344:12 | arr1 | +| main.rs:345:9:345:10 | [SSA] n1 | main.rs:346:10:346:11 | n1 | +| main.rs:345:9:345:10 | n1 | main.rs:345:9:345:10 | [SSA] n1 | +| main.rs:345:14:345:20 | arr1[2] | main.rs:345:9:345:10 | n1 | +| main.rs:348:9:348:12 | [SSA] arr2 | main.rs:349:14:349:17 | arr2 | +| main.rs:348:9:348:12 | arr2 | main.rs:348:9:348:12 | [SSA] arr2 | +| main.rs:348:16:348:31 | [...; 10] | main.rs:348:9:348:12 | arr2 | +| main.rs:349:9:349:10 | [SSA] n2 | main.rs:350:10:350:11 | n2 | +| main.rs:349:9:349:10 | n2 | main.rs:349:9:349:10 | [SSA] n2 | +| main.rs:349:14:349:20 | arr2[4] | main.rs:349:9:349:10 | n2 | +| main.rs:352:9:352:12 | [SSA] arr3 | main.rs:353:14:353:17 | arr3 | +| main.rs:352:9:352:12 | arr3 | main.rs:352:9:352:12 | [SSA] arr3 | +| main.rs:352:16:352:24 | [...] | main.rs:352:9:352:12 | arr3 | +| main.rs:353:9:353:10 | [SSA] n3 | main.rs:354:10:354:11 | n3 | +| main.rs:353:9:353:10 | n3 | main.rs:353:9:353:10 | [SSA] n3 | +| main.rs:353:14:353:20 | arr3[2] | main.rs:353:9:353:10 | n3 | +| main.rs:358:9:358:12 | [SSA] arr1 | main.rs:359:15:359:18 | arr1 | +| main.rs:358:9:358:12 | arr1 | main.rs:358:9:358:12 | [SSA] arr1 | +| main.rs:358:16:358:33 | [...] | main.rs:358:9:358:12 | arr1 | +| main.rs:359:9:359:10 | [SSA] n1 | main.rs:360:14:360:15 | n1 | +| main.rs:359:9:359:10 | n1 | main.rs:359:9:359:10 | [SSA] n1 | +| main.rs:363:9:363:12 | [SSA] arr2 | main.rs:364:15:364:18 | arr2 | +| main.rs:363:9:363:12 | arr2 | main.rs:363:9:363:12 | [SSA] arr2 | +| main.rs:363:16:363:24 | [...] | main.rs:363:9:363:12 | arr2 | +| main.rs:364:5:366:5 | for ... in ... { ... } | main.rs:357:21:367:1 | { ... } | +| main.rs:364:9:364:10 | [SSA] n2 | main.rs:365:14:365:15 | n2 | +| main.rs:364:9:364:10 | n2 | main.rs:364:9:364:10 | [SSA] n2 | +| main.rs:370:9:370:12 | [SSA] arr1 | main.rs:371:11:371:14 | arr1 | +| main.rs:370:9:370:12 | arr1 | main.rs:370:9:370:12 | [SSA] arr1 | +| main.rs:370:16:370:33 | [...] | main.rs:370:9:370:12 | arr1 | +| main.rs:371:5:377:5 | match arr1 { ... } | main.rs:369:26:378:1 | { ... } | +| main.rs:371:11:371:14 | arr1 | main.rs:372:9:372:17 | SlicePat | +| main.rs:372:10:372:10 | [SSA] a | main.rs:373:18:373:18 | a | +| main.rs:372:10:372:10 | a | main.rs:372:10:372:10 | [SSA] a | +| main.rs:372:13:372:13 | [SSA] b | main.rs:374:18:374:18 | b | +| main.rs:372:13:372:13 | b | main.rs:372:13:372:13 | [SSA] b | +| main.rs:372:16:372:16 | [SSA] c | main.rs:375:18:375:18 | c | +| main.rs:372:16:372:16 | c | main.rs:372:16:372:16 | [SSA] c | +| main.rs:372:22:376:9 | { ... } | main.rs:371:5:377:5 | match arr1 { ... } | +| main.rs:381:9:381:19 | [SSA] mut_arr | main.rs:382:10:382:16 | mut_arr | +| main.rs:381:9:381:19 | mut_arr | main.rs:381:9:381:19 | [SSA] mut_arr | +| main.rs:381:23:381:31 | [...] | main.rs:381:9:381:19 | mut_arr | +| main.rs:382:10:382:16 | [post] mut_arr | main.rs:384:5:384:11 | mut_arr | +| main.rs:382:10:382:16 | mut_arr | main.rs:384:5:384:11 | mut_arr | +| main.rs:384:5:384:11 | [post] mut_arr | main.rs:385:13:385:19 | mut_arr | +| main.rs:384:5:384:11 | mut_arr | main.rs:385:13:385:19 | mut_arr | +| main.rs:384:18:384:27 | source(...) | main.rs:384:5:384:14 | mut_arr[1] | +| main.rs:385:9:385:9 | [SSA] d | main.rs:386:10:386:10 | d | +| main.rs:385:9:385:9 | d | main.rs:385:9:385:9 | [SSA] d | +| main.rs:385:13:385:19 | [post] mut_arr | main.rs:387:10:387:16 | mut_arr | +| main.rs:385:13:385:19 | mut_arr | main.rs:387:10:387:16 | mut_arr | +| main.rs:385:13:385:22 | mut_arr[1] | main.rs:385:9:385:9 | d | +| main.rs:392:39:392:43 | [SSA] names | main.rs:394:23:394:27 | names | +| main.rs:392:39:392:43 | names | main.rs:392:39:392:43 | [SSA] names | +| main.rs:392:39:392:72 | ...: Vec::<...> | main.rs:392:39:392:43 | names | +| main.rs:393:7:393:18 | [SSA] default_name | main.rs:394:23:394:27 | [SSA] [input] SSA phi read(default_name) | +| main.rs:393:7:393:18 | default_name | main.rs:393:7:393:18 | [SSA] default_name | +| main.rs:393:22:393:43 | ... .to_string(...) | main.rs:393:7:393:18 | default_name | +| main.rs:394:3:400:3 | for ... in ... { ... } | main.rs:392:75:401:1 | { ... } | +| main.rs:394:7:394:18 | [SSA] SSA phi read(default_name) | main.rs:394:29:400:3 | [SSA] [input] SSA phi read(default_name) | +| main.rs:394:7:394:18 | [SSA] SSA phi read(default_name) | main.rs:398:7:398:14 | [SSA] [input] SSA phi read(default_name) | +| main.rs:394:8:394:11 | [SSA] cond | main.rs:395:8:395:11 | cond | +| main.rs:394:8:394:11 | cond | main.rs:394:8:394:11 | [SSA] cond | +| main.rs:394:14:394:17 | [SSA] name | main.rs:396:15:396:18 | name | +| main.rs:394:14:394:17 | name | main.rs:394:14:394:17 | [SSA] name | +| main.rs:394:23:394:27 | [SSA] [input] SSA phi read(default_name) | main.rs:394:7:394:18 | [SSA] SSA phi read(default_name) | +| main.rs:394:29:400:3 | [SSA] [input] SSA phi read(default_name) | main.rs:394:7:394:18 | [SSA] SSA phi read(default_name) | +| main.rs:395:5:399:5 | if cond {...} | main.rs:394:29:400:3 | { ... } | +| main.rs:396:11:396:11 | [SSA] n | main.rs:397:12:397:12 | n | +| main.rs:396:11:396:11 | n | main.rs:396:11:396:11 | [SSA] n | +| main.rs:396:15:396:62 | name.unwrap_or_else(...) | main.rs:396:11:396:11 | n | +| main.rs:396:35:396:61 | [SSA] default_name | main.rs:396:38:396:49 | default_name | +| main.rs:398:7:398:14 | [SSA] [input] SSA phi read(default_name) | main.rs:394:7:394:18 | [SSA] SSA phi read(default_name) | +| main.rs:425:13:425:33 | result_questionmark(...) | main.rs:425:9:425:9 | _ | storeStep +| file://:0:0:0:0 | [summary] to write: ReturnValue.Variant[crate::result::Result::Ok(0)] in repo:https://github.com/seanmonstar/reqwest:reqwest::_::::text | Ok | file://:0:0:0:0 | [summary] to write: ReturnValue in repo:https://github.com/seanmonstar/reqwest:reqwest::_::::text | | main.rs:94:14:94:22 | source(...) | tuple.0 | main.rs:94:13:94:26 | TupleExpr | | main.rs:94:25:94:25 | 2 | tuple.1 | main.rs:94:13:94:26 | TupleExpr | | main.rs:100:14:100:14 | 2 | tuple.0 | main.rs:100:13:100:30 | TupleExpr | @@ -496,45 +492,51 @@ storeStep | main.rs:212:19:212:19 | 2 | Some | main.rs:212:14:212:20 | Some(...) | | main.rs:224:19:224:28 | source(...) | Some | main.rs:224:14:224:29 | Some(...) | | main.rs:229:19:229:28 | source(...) | Some | main.rs:229:14:229:29 | Some(...) | -| main.rs:230:19:230:19 | 2 | Some | main.rs:230:14:230:20 | Some(...) | -| main.rs:234:10:234:10 | 0 | Some | main.rs:234:5:234:11 | Some(...) | -| main.rs:238:35:238:44 | source(...) | Ok | main.rs:238:32:238:45 | Ok(...) | -| main.rs:239:35:239:35 | 2 | Ok | main.rs:239:32:239:36 | Ok(...) | -| main.rs:240:36:240:45 | source(...) | Err | main.rs:240:32:240:46 | Err(...) | -| main.rs:247:8:247:8 | 0 | Ok | main.rs:247:5:247:9 | Ok(...) | -| main.rs:256:29:256:38 | source(...) | A | main.rs:256:14:256:39 | ...::A(...) | -| main.rs:257:29:257:29 | 2 | B | main.rs:257:14:257:30 | ...::B(...) | -| main.rs:274:16:274:25 | source(...) | A | main.rs:274:14:274:26 | A(...) | -| main.rs:275:16:275:16 | 2 | B | main.rs:275:14:275:17 | B(...) | -| main.rs:296:18:296:27 | source(...) | C | main.rs:295:14:297:5 | ...::C {...} | -| main.rs:298:41:298:41 | 2 | D | main.rs:298:14:298:43 | ...::D {...} | -| main.rs:316:18:316:27 | source(...) | C | main.rs:315:14:317:5 | C {...} | -| main.rs:318:27:318:27 | 2 | D | main.rs:318:14:318:29 | D {...} | -| main.rs:336:17:336:17 | 1 | array[] | main.rs:336:16:336:33 | [...] | -| main.rs:336:20:336:20 | 2 | array[] | main.rs:336:16:336:33 | [...] | -| main.rs:336:23:336:32 | source(...) | array[] | main.rs:336:16:336:33 | [...] | -| main.rs:340:17:340:26 | source(...) | array[] | main.rs:340:16:340:31 | [...; 10] | -| main.rs:344:17:344:17 | 1 | array[] | main.rs:344:16:344:24 | [...] | -| main.rs:344:20:344:20 | 2 | array[] | main.rs:344:16:344:24 | [...] | -| main.rs:344:23:344:23 | 3 | array[] | main.rs:344:16:344:24 | [...] | -| main.rs:350:17:350:17 | 1 | array[] | main.rs:350:16:350:33 | [...] | -| main.rs:350:20:350:20 | 2 | array[] | main.rs:350:16:350:33 | [...] | -| main.rs:350:23:350:32 | source(...) | array[] | main.rs:350:16:350:33 | [...] | -| main.rs:355:17:355:17 | 1 | array[] | main.rs:355:16:355:24 | [...] | -| main.rs:355:20:355:20 | 2 | array[] | main.rs:355:16:355:24 | [...] | -| main.rs:355:23:355:23 | 3 | array[] | main.rs:355:16:355:24 | [...] | -| main.rs:362:17:362:17 | 1 | array[] | main.rs:362:16:362:33 | [...] | -| main.rs:362:20:362:20 | 2 | array[] | main.rs:362:16:362:33 | [...] | -| main.rs:362:23:362:32 | source(...) | array[] | main.rs:362:16:362:33 | [...] | -| main.rs:373:24:373:24 | 1 | array[] | main.rs:373:23:373:31 | [...] | -| main.rs:373:27:373:27 | 2 | array[] | main.rs:373:23:373:31 | [...] | -| main.rs:373:30:373:30 | 3 | array[] | main.rs:373:23:373:31 | [...] | -| main.rs:376:18:376:27 | source(...) | array[] | main.rs:376:5:376:11 | [post] mut_arr | -| main.rs:406:35:406:61 | default_name | captured default_name | main.rs:406:35:406:61 | \|...\| ... | -| main.rs:417:27:417:27 | 0 | Some | main.rs:417:22:417:28 | Some(...) | +| main.rs:232:19:232:19 | 0 | Some | main.rs:232:14:232:20 | Some(...) | +| main.rs:237:19:237:28 | source(...) | Some | main.rs:237:14:237:29 | Some(...) | +| main.rs:238:19:238:19 | 2 | Some | main.rs:238:14:238:20 | Some(...) | +| main.rs:242:10:242:10 | 0 | Some | main.rs:242:5:242:11 | Some(...) | +| main.rs:246:35:246:44 | source(...) | Ok | main.rs:246:32:246:45 | Ok(...) | +| main.rs:247:35:247:35 | 2 | Ok | main.rs:247:32:247:36 | Ok(...) | +| main.rs:248:36:248:45 | source(...) | Err | main.rs:248:32:248:46 | Err(...) | +| main.rs:255:8:255:8 | 0 | Ok | main.rs:255:5:255:9 | Ok(...) | +| main.rs:264:29:264:38 | source(...) | A | main.rs:264:14:264:39 | ...::A(...) | +| main.rs:265:29:265:29 | 2 | B | main.rs:265:14:265:30 | ...::B(...) | +| main.rs:282:16:282:25 | source(...) | A | main.rs:282:14:282:26 | A(...) | +| main.rs:283:16:283:16 | 2 | B | main.rs:283:14:283:17 | B(...) | +| main.rs:304:18:304:27 | source(...) | C | main.rs:303:14:305:5 | ...::C {...} | +| main.rs:306:41:306:41 | 2 | D | main.rs:306:14:306:43 | ...::D {...} | +| main.rs:324:18:324:27 | source(...) | C | main.rs:323:14:325:5 | C {...} | +| main.rs:326:27:326:27 | 2 | D | main.rs:326:14:326:29 | D {...} | +| main.rs:344:17:344:17 | 1 | array[] | main.rs:344:16:344:33 | [...] | +| main.rs:344:20:344:20 | 2 | array[] | main.rs:344:16:344:33 | [...] | +| main.rs:344:23:344:32 | source(...) | array[] | main.rs:344:16:344:33 | [...] | +| main.rs:348:17:348:26 | source(...) | array[] | main.rs:348:16:348:31 | [...; 10] | +| main.rs:352:17:352:17 | 1 | array[] | main.rs:352:16:352:24 | [...] | +| main.rs:352:20:352:20 | 2 | array[] | main.rs:352:16:352:24 | [...] | +| main.rs:352:23:352:23 | 3 | array[] | main.rs:352:16:352:24 | [...] | +| main.rs:358:17:358:17 | 1 | array[] | main.rs:358:16:358:33 | [...] | +| main.rs:358:20:358:20 | 2 | array[] | main.rs:358:16:358:33 | [...] | +| main.rs:358:23:358:32 | source(...) | array[] | main.rs:358:16:358:33 | [...] | +| main.rs:363:17:363:17 | 1 | array[] | main.rs:363:16:363:24 | [...] | +| main.rs:363:20:363:20 | 2 | array[] | main.rs:363:16:363:24 | [...] | +| main.rs:363:23:363:23 | 3 | array[] | main.rs:363:16:363:24 | [...] | +| main.rs:370:17:370:17 | 1 | array[] | main.rs:370:16:370:33 | [...] | +| main.rs:370:20:370:20 | 2 | array[] | main.rs:370:16:370:33 | [...] | +| main.rs:370:23:370:32 | source(...) | array[] | main.rs:370:16:370:33 | [...] | +| main.rs:381:24:381:24 | 1 | array[] | main.rs:381:23:381:31 | [...] | +| main.rs:381:27:381:27 | 2 | array[] | main.rs:381:23:381:31 | [...] | +| main.rs:381:30:381:30 | 3 | array[] | main.rs:381:23:381:31 | [...] | +| main.rs:384:18:384:27 | source(...) | array[] | main.rs:384:5:384:11 | [post] mut_arr | +| main.rs:396:35:396:61 | default_name | captured default_name | main.rs:396:35:396:61 | \|...\| ... | +| main.rs:407:27:407:27 | 0 | Some | main.rs:407:22:407:28 | Some(...) | readStep | file://:0:0:0:0 | [summary param] self in lang:core::_::::unwrap | Some | file://:0:0:0:0 | [summary] read: Argument[self].Variant[crate::option::Option::Some(0)] in lang:core::_::::unwrap | +| file://:0:0:0:0 | [summary param] self in lang:core::_::::unwrap_or | Some | file://:0:0:0:0 | [summary] read: Argument[self].Variant[crate::option::Option::Some(0)] in lang:core::_::::unwrap_or | +| file://:0:0:0:0 | [summary param] self in lang:core::_::::unwrap | Ok | file://:0:0:0:0 | [summary] read: Argument[self].Variant[crate::result::Result::Ok(0)] in lang:core::_::::unwrap | +| file://:0:0:0:0 | [summary param] self in lang:core::_::::unwrap_or | Ok | file://:0:0:0:0 | [summary] read: Argument[self].Variant[crate::result::Result::Ok(0)] in lang:core::_::::unwrap_or | | main.rs:33:9:33:15 | Some(...) | Some | main.rs:33:14:33:14 | _ | +| main.rs:87:11:87:11 | i | &ref | main.rs:87:10:87:11 | * ... | | main.rs:95:10:95:10 | a | tuple.0 | main.rs:95:10:95:12 | a.0 | | main.rs:96:10:96:10 | a | tuple.1 | main.rs:96:10:96:12 | a.1 | | main.rs:109:10:109:10 | a | tuple.0 | main.rs:109:10:109:12 | a.0 | @@ -555,52 +557,52 @@ readStep | main.rs:205:9:205:23 | ...::Some(...) | Some | main.rs:205:22:205:22 | n | | main.rs:214:9:214:15 | Some(...) | Some | main.rs:214:14:214:14 | n | | main.rs:218:9:218:15 | Some(...) | Some | main.rs:218:14:218:14 | n | -| main.rs:231:14:231:15 | s1 | Ok | main.rs:231:14:231:16 | TryExpr | -| main.rs:231:14:231:15 | s1 | Some | main.rs:231:14:231:16 | TryExpr | -| main.rs:233:10:233:11 | s2 | Ok | main.rs:233:10:233:12 | TryExpr | -| main.rs:233:10:233:11 | s2 | Some | main.rs:233:10:233:12 | TryExpr | -| main.rs:241:14:241:15 | s1 | Ok | main.rs:241:14:241:16 | TryExpr | -| main.rs:241:14:241:15 | s1 | Some | main.rs:241:14:241:16 | TryExpr | -| main.rs:242:14:242:15 | s2 | Ok | main.rs:242:14:242:16 | TryExpr | -| main.rs:242:14:242:15 | s2 | Some | main.rs:242:14:242:16 | TryExpr | -| main.rs:245:14:245:15 | s3 | Ok | main.rs:245:14:245:16 | TryExpr | -| main.rs:245:14:245:15 | s3 | Some | main.rs:245:14:245:16 | TryExpr | -| main.rs:259:9:259:25 | ...::A(...) | A | main.rs:259:24:259:24 | n | -| main.rs:260:9:260:25 | ...::B(...) | B | main.rs:260:24:260:24 | n | -| main.rs:263:9:263:25 | ...::A(...) | A | main.rs:263:24:263:24 | n | -| main.rs:263:29:263:45 | ...::B(...) | B | main.rs:263:44:263:44 | n | -| main.rs:266:9:266:25 | ...::A(...) | A | main.rs:266:24:266:24 | n | -| main.rs:267:9:267:25 | ...::B(...) | B | main.rs:267:24:267:24 | n | -| main.rs:277:9:277:12 | A(...) | A | main.rs:277:11:277:11 | n | -| main.rs:278:9:278:12 | B(...) | B | main.rs:278:11:278:11 | n | -| main.rs:281:9:281:12 | A(...) | A | main.rs:281:11:281:11 | n | -| main.rs:281:16:281:19 | B(...) | B | main.rs:281:18:281:18 | n | -| main.rs:284:9:284:12 | A(...) | A | main.rs:284:11:284:11 | n | -| main.rs:285:9:285:12 | B(...) | B | main.rs:285:11:285:11 | n | -| main.rs:300:9:300:38 | ...::C {...} | C | main.rs:300:36:300:36 | n | -| main.rs:301:9:301:38 | ...::D {...} | D | main.rs:301:36:301:36 | n | -| main.rs:304:9:304:38 | ...::C {...} | C | main.rs:304:36:304:36 | n | -| main.rs:304:42:304:71 | ...::D {...} | D | main.rs:304:69:304:69 | n | -| main.rs:307:9:307:38 | ...::C {...} | C | main.rs:307:36:307:36 | n | -| main.rs:308:9:308:38 | ...::D {...} | D | main.rs:308:36:308:36 | n | -| main.rs:320:9:320:24 | C {...} | C | main.rs:320:22:320:22 | n | -| main.rs:321:9:321:24 | D {...} | D | main.rs:321:22:321:22 | n | -| main.rs:324:9:324:24 | C {...} | C | main.rs:324:22:324:22 | n | -| main.rs:324:28:324:43 | D {...} | D | main.rs:324:41:324:41 | n | -| main.rs:327:9:327:24 | C {...} | C | main.rs:327:22:327:22 | n | -| main.rs:328:9:328:24 | D {...} | D | main.rs:328:22:328:22 | n | -| main.rs:337:14:337:17 | arr1 | array[] | main.rs:337:14:337:20 | arr1[2] | -| main.rs:341:14:341:17 | arr2 | array[] | main.rs:341:14:341:20 | arr2[4] | -| main.rs:345:14:345:17 | arr3 | array[] | main.rs:345:14:345:20 | arr3[2] | -| main.rs:351:15:351:18 | arr1 | array[] | main.rs:351:9:351:10 | n1 | -| main.rs:356:15:356:18 | arr2 | array[] | main.rs:356:9:356:10 | n2 | -| main.rs:364:9:364:17 | SlicePat | array[] | main.rs:364:10:364:10 | a | -| main.rs:364:9:364:17 | SlicePat | array[] | main.rs:364:13:364:13 | b | -| main.rs:364:9:364:17 | SlicePat | array[] | main.rs:364:16:364:16 | c | -| main.rs:374:10:374:16 | mut_arr | array[] | main.rs:374:10:374:19 | mut_arr[1] | -| main.rs:376:5:376:11 | mut_arr | array[] | main.rs:376:5:376:14 | mut_arr[1] | -| main.rs:377:13:377:19 | mut_arr | array[] | main.rs:377:13:377:22 | mut_arr[1] | -| main.rs:379:10:379:16 | mut_arr | array[] | main.rs:379:10:379:19 | mut_arr[0] | -| main.rs:404:23:404:27 | names | array[] | main.rs:404:7:404:18 | TuplePat | -| main.rs:406:35:406:61 | [post] \|...\| ... | captured default_name | main.rs:406:35:406:61 | [post] default_name | -| main.rs:406:38:406:49 | this | captured default_name | main.rs:406:38:406:49 | default_name | +| main.rs:239:14:239:15 | s1 | Ok | main.rs:239:14:239:16 | TryExpr | +| main.rs:239:14:239:15 | s1 | Some | main.rs:239:14:239:16 | TryExpr | +| main.rs:241:10:241:11 | s2 | Ok | main.rs:241:10:241:12 | TryExpr | +| main.rs:241:10:241:11 | s2 | Some | main.rs:241:10:241:12 | TryExpr | +| main.rs:249:14:249:15 | s1 | Ok | main.rs:249:14:249:16 | TryExpr | +| main.rs:249:14:249:15 | s1 | Some | main.rs:249:14:249:16 | TryExpr | +| main.rs:250:14:250:15 | s2 | Ok | main.rs:250:14:250:16 | TryExpr | +| main.rs:250:14:250:15 | s2 | Some | main.rs:250:14:250:16 | TryExpr | +| main.rs:253:14:253:15 | s3 | Ok | main.rs:253:14:253:16 | TryExpr | +| main.rs:253:14:253:15 | s3 | Some | main.rs:253:14:253:16 | TryExpr | +| main.rs:267:9:267:25 | ...::A(...) | A | main.rs:267:24:267:24 | n | +| main.rs:268:9:268:25 | ...::B(...) | B | main.rs:268:24:268:24 | n | +| main.rs:271:9:271:25 | ...::A(...) | A | main.rs:271:24:271:24 | n | +| main.rs:271:29:271:45 | ...::B(...) | B | main.rs:271:44:271:44 | n | +| main.rs:274:9:274:25 | ...::A(...) | A | main.rs:274:24:274:24 | n | +| main.rs:275:9:275:25 | ...::B(...) | B | main.rs:275:24:275:24 | n | +| main.rs:285:9:285:12 | A(...) | A | main.rs:285:11:285:11 | n | +| main.rs:286:9:286:12 | B(...) | B | main.rs:286:11:286:11 | n | +| main.rs:289:9:289:12 | A(...) | A | main.rs:289:11:289:11 | n | +| main.rs:289:16:289:19 | B(...) | B | main.rs:289:18:289:18 | n | +| main.rs:292:9:292:12 | A(...) | A | main.rs:292:11:292:11 | n | +| main.rs:293:9:293:12 | B(...) | B | main.rs:293:11:293:11 | n | +| main.rs:308:9:308:38 | ...::C {...} | C | main.rs:308:36:308:36 | n | +| main.rs:309:9:309:38 | ...::D {...} | D | main.rs:309:36:309:36 | n | +| main.rs:312:9:312:38 | ...::C {...} | C | main.rs:312:36:312:36 | n | +| main.rs:312:42:312:71 | ...::D {...} | D | main.rs:312:69:312:69 | n | +| main.rs:315:9:315:38 | ...::C {...} | C | main.rs:315:36:315:36 | n | +| main.rs:316:9:316:38 | ...::D {...} | D | main.rs:316:36:316:36 | n | +| main.rs:328:9:328:24 | C {...} | C | main.rs:328:22:328:22 | n | +| main.rs:329:9:329:24 | D {...} | D | main.rs:329:22:329:22 | n | +| main.rs:332:9:332:24 | C {...} | C | main.rs:332:22:332:22 | n | +| main.rs:332:28:332:43 | D {...} | D | main.rs:332:41:332:41 | n | +| main.rs:335:9:335:24 | C {...} | C | main.rs:335:22:335:22 | n | +| main.rs:336:9:336:24 | D {...} | D | main.rs:336:22:336:22 | n | +| main.rs:345:14:345:17 | arr1 | array[] | main.rs:345:14:345:20 | arr1[2] | +| main.rs:349:14:349:17 | arr2 | array[] | main.rs:349:14:349:20 | arr2[4] | +| main.rs:353:14:353:17 | arr3 | array[] | main.rs:353:14:353:20 | arr3[2] | +| main.rs:359:15:359:18 | arr1 | array[] | main.rs:359:9:359:10 | n1 | +| main.rs:364:15:364:18 | arr2 | array[] | main.rs:364:9:364:10 | n2 | +| main.rs:372:9:372:17 | SlicePat | array[] | main.rs:372:10:372:10 | a | +| main.rs:372:9:372:17 | SlicePat | array[] | main.rs:372:13:372:13 | b | +| main.rs:372:9:372:17 | SlicePat | array[] | main.rs:372:16:372:16 | c | +| main.rs:382:10:382:16 | mut_arr | array[] | main.rs:382:10:382:19 | mut_arr[1] | +| main.rs:384:5:384:11 | mut_arr | array[] | main.rs:384:5:384:14 | mut_arr[1] | +| main.rs:385:13:385:19 | mut_arr | array[] | main.rs:385:13:385:22 | mut_arr[1] | +| main.rs:387:10:387:16 | mut_arr | array[] | main.rs:387:10:387:19 | mut_arr[0] | +| main.rs:394:23:394:27 | names | array[] | main.rs:394:7:394:18 | TuplePat | +| main.rs:396:35:396:61 | [post] \|...\| ... | captured default_name | main.rs:396:35:396:61 | [post] default_name | +| main.rs:396:38:396:49 | this | captured default_name | main.rs:396:38:396:49 | default_name | 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 a7ca9828e733..1495cfe4748e 100644 --- a/rust/ql/test/library-tests/dataflow/local/inline-flow.expected +++ b/rust/ql/test/library-tests/dataflow/local/inline-flow.expected @@ -1,5 +1,7 @@ models | 1 | Summary: lang:core; ::unwrap; Argument[self].Variant[crate::option::Option::Some(0)]; ReturnValue; value | +| 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: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 | | @@ -54,92 +56,97 @@ edges | 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:231:14:231:15 | 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:231:9:231:10 | i1 | main.rs:232:10:232:11 | i1 | provenance | | -| main.rs:231:14:231:15 | s1 [Some] | main.rs:231:14:231:16 | TryExpr | provenance | | -| main.rs:231:14:231:16 | TryExpr | main.rs:231:9:231:10 | i1 | provenance | | -| main.rs:238:9:238:10 | s1 [Ok] | main.rs:241:14:241:15 | s1 [Ok] | provenance | | -| main.rs:238:32:238:45 | Ok(...) [Ok] | main.rs:238:9:238:10 | s1 [Ok] | provenance | | -| main.rs:238:35:238:44 | source(...) | main.rs:238:32:238:45 | Ok(...) [Ok] | provenance | | -| main.rs:241:9:241:10 | i1 | main.rs:243:10:243:11 | i1 | provenance | | -| main.rs:241:14:241:15 | s1 [Ok] | main.rs:241:14:241:16 | TryExpr | provenance | | -| main.rs:241:14:241:16 | TryExpr | main.rs:241:9:241:10 | i1 | provenance | | -| main.rs:256:9:256:10 | s1 [A] | main.rs:258:11:258:12 | s1 [A] | provenance | | -| main.rs:256:14:256:39 | ...::A(...) [A] | main.rs:256:9:256:10 | s1 [A] | provenance | | -| main.rs:256:29:256:38 | source(...) | main.rs:256:14:256:39 | ...::A(...) [A] | provenance | | -| main.rs:258:11:258:12 | s1 [A] | main.rs:259:9:259:25 | ...::A(...) [A] | provenance | | -| main.rs:258:11:258:12 | s1 [A] | main.rs:262:11:262:12 | s1 [A] | provenance | | -| main.rs:259:9:259:25 | ...::A(...) [A] | main.rs:259:24:259:24 | n | provenance | | -| main.rs:259:24:259:24 | n | main.rs:259:35:259:35 | n | provenance | | -| main.rs:262:11:262:12 | s1 [A] | main.rs:263:9:263:25 | ...::A(...) [A] | provenance | | -| main.rs:263:9:263:25 | ...::A(...) [A] | main.rs:263:24:263:24 | n | provenance | | -| main.rs:263:24:263:24 | n | main.rs:263:55:263:55 | n | provenance | | -| main.rs:274:9:274:10 | s1 [A] | main.rs:276:11:276:12 | s1 [A] | provenance | | -| main.rs:274:14:274:26 | A(...) [A] | main.rs:274:9:274:10 | s1 [A] | provenance | | -| main.rs:274:16:274:25 | source(...) | main.rs:274:14:274:26 | A(...) [A] | provenance | | -| main.rs:276:11:276:12 | s1 [A] | main.rs:277:9:277:12 | A(...) [A] | provenance | | -| main.rs:276:11:276:12 | s1 [A] | main.rs:280:11:280:12 | s1 [A] | provenance | | -| main.rs:277:9:277:12 | A(...) [A] | main.rs:277:11:277:11 | n | provenance | | -| main.rs:277:11:277:11 | n | main.rs:277:22:277:22 | n | provenance | | -| main.rs:280:11:280:12 | s1 [A] | main.rs:281:9:281:12 | A(...) [A] | provenance | | -| main.rs:281:9:281:12 | A(...) [A] | main.rs:281:11:281:11 | n | provenance | | -| main.rs:281:11:281:11 | n | main.rs:281:29:281:29 | n | provenance | | -| main.rs:295:9:295:10 | s1 [C] | main.rs:299:11:299:12 | s1 [C] | provenance | | -| main.rs:295:14:297:5 | ...::C {...} [C] | main.rs:295:9:295:10 | s1 [C] | provenance | | -| main.rs:296:18:296:27 | source(...) | main.rs:295:14:297:5 | ...::C {...} [C] | provenance | | -| main.rs:299:11:299:12 | s1 [C] | main.rs:300:9:300:38 | ...::C {...} [C] | provenance | | -| main.rs:299:11:299:12 | s1 [C] | main.rs:303:11:303:12 | s1 [C] | provenance | | -| main.rs:300:9:300:38 | ...::C {...} [C] | main.rs:300:36:300:36 | n | provenance | | -| main.rs:300:36:300:36 | n | main.rs:300:48:300:48 | n | provenance | | -| main.rs:303:11:303:12 | s1 [C] | main.rs:304:9:304:38 | ...::C {...} [C] | provenance | | -| main.rs:304:9:304:38 | ...::C {...} [C] | main.rs:304:36:304:36 | n | provenance | | -| main.rs:304:36:304:36 | n | main.rs:304:81:304:81 | n | provenance | | -| main.rs:315:9:315:10 | s1 [C] | main.rs:319:11:319:12 | s1 [C] | provenance | | -| main.rs:315:14:317:5 | C {...} [C] | main.rs:315:9:315:10 | s1 [C] | provenance | | -| main.rs:316:18:316:27 | source(...) | main.rs:315:14:317:5 | C {...} [C] | provenance | | -| main.rs:319:11:319:12 | s1 [C] | main.rs:320:9:320:24 | C {...} [C] | provenance | | -| main.rs:319:11:319:12 | s1 [C] | main.rs:323:11:323:12 | s1 [C] | provenance | | -| main.rs:320:9:320:24 | C {...} [C] | main.rs:320:22:320:22 | n | provenance | | -| main.rs:320:22:320:22 | n | main.rs:320:34:320:34 | n | provenance | | -| main.rs:323:11:323:12 | s1 [C] | main.rs:324:9:324:24 | C {...} [C] | provenance | | -| main.rs:324:9:324:24 | C {...} [C] | main.rs:324:22:324:22 | n | provenance | | -| main.rs:324:22:324:22 | n | main.rs:324:53:324:53 | n | provenance | | -| main.rs:336:9:336:12 | arr1 [array[]] | main.rs:337:14:337:17 | arr1 [array[]] | provenance | | -| main.rs:336:16:336:33 | [...] [array[]] | main.rs:336:9:336:12 | arr1 [array[]] | provenance | | -| main.rs:336:23:336:32 | source(...) | main.rs:336:16:336:33 | [...] [array[]] | provenance | | -| main.rs:337:9:337:10 | n1 | main.rs:338:10:338:11 | n1 | provenance | | -| main.rs:337:14:337:17 | arr1 [array[]] | main.rs:337:14:337:20 | arr1[2] | provenance | | -| main.rs:337:14:337:20 | arr1[2] | main.rs:337:9:337:10 | n1 | provenance | | -| main.rs:340:9:340:12 | arr2 [array[]] | main.rs:341:14:341:17 | arr2 [array[]] | provenance | | -| main.rs:340:16:340:31 | [...; 10] [array[]] | main.rs:340:9:340:12 | arr2 [array[]] | provenance | | -| main.rs:340:17:340:26 | source(...) | main.rs:340:16:340:31 | [...; 10] [array[]] | provenance | | -| main.rs:341:9:341:10 | n2 | main.rs:342:10:342:11 | n2 | provenance | | -| main.rs:341:14:341:17 | arr2 [array[]] | main.rs:341:14:341:20 | arr2[4] | provenance | | -| main.rs:341:14:341:20 | arr2[4] | main.rs:341:9:341:10 | n2 | provenance | | -| main.rs:350:9:350:12 | arr1 [array[]] | main.rs:351:15:351:18 | arr1 [array[]] | provenance | | -| main.rs:350:16:350:33 | [...] [array[]] | main.rs:350:9:350:12 | arr1 [array[]] | provenance | | -| main.rs:350:23:350:32 | source(...) | main.rs:350:16:350:33 | [...] [array[]] | provenance | | -| main.rs:351:9:351:10 | n1 | main.rs:352:14:352:15 | n1 | provenance | | -| main.rs:351:15:351:18 | arr1 [array[]] | main.rs:351:9:351:10 | n1 | provenance | | -| main.rs:362:9:362:12 | arr1 [array[]] | main.rs:363:11:363:14 | arr1 [array[]] | provenance | | -| main.rs:362:16:362:33 | [...] [array[]] | main.rs:362:9:362:12 | arr1 [array[]] | provenance | | -| main.rs:362:23:362:32 | source(...) | main.rs:362:16:362:33 | [...] [array[]] | provenance | | -| main.rs:363:11:363:14 | arr1 [array[]] | main.rs:364:9:364:17 | SlicePat [array[]] | provenance | | -| main.rs:364:9:364:17 | SlicePat [array[]] | main.rs:364:10:364:10 | a | provenance | | -| main.rs:364:9:364:17 | SlicePat [array[]] | main.rs:364:13:364:13 | b | provenance | | -| main.rs:364:9:364:17 | SlicePat [array[]] | main.rs:364:16:364:16 | c | provenance | | -| main.rs:364:10:364:10 | a | main.rs:365:18:365:18 | a | provenance | | -| main.rs:364:13:364:13 | b | main.rs:366:18:366:18 | b | provenance | | -| main.rs:364:16:364:16 | c | main.rs:367:18:367:18 | c | provenance | | -| main.rs:376:5:376:11 | [post] mut_arr [array[]] | main.rs:377:13:377:19 | mut_arr [array[]] | provenance | | -| main.rs:376:5:376:11 | [post] mut_arr [array[]] | main.rs:379:10:379:16 | mut_arr [array[]] | provenance | | -| main.rs:376:18:376:27 | source(...) | main.rs:376:5:376:11 | [post] mut_arr [array[]] | provenance | | -| main.rs:377:9:377:9 | d | main.rs:378:10:378:10 | d | provenance | | -| main.rs:377:13:377:19 | mut_arr [array[]] | main.rs:377:13:377:22 | mut_arr[1] | provenance | | -| main.rs:377:13:377:22 | mut_arr[1] | main.rs:377:9:377:9 | d | provenance | | -| main.rs:379:10:379:16 | mut_arr [array[]] | main.rs:379:10:379:19 | mut_arr[0] | 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: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 | | nodes | main.rs:15:10:15:18 | source(...) | semmle.label | source(...) | | main.rs:19:9:19:9 | s | semmle.label | s | @@ -211,100 +218,107 @@ nodes | 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:231:9:231:10 | i1 | semmle.label | i1 | -| main.rs:231:14:231:15 | s1 [Some] | semmle.label | s1 [Some] | -| main.rs:231:14:231:16 | TryExpr | semmle.label | TryExpr | -| main.rs:232:10:232:11 | i1 | semmle.label | i1 | -| main.rs:238:9:238:10 | s1 [Ok] | semmle.label | s1 [Ok] | -| main.rs:238:32:238:45 | Ok(...) [Ok] | semmle.label | Ok(...) [Ok] | -| main.rs:238:35:238:44 | source(...) | semmle.label | source(...) | -| main.rs:241:9:241:10 | i1 | semmle.label | i1 | -| main.rs:241:14:241:15 | s1 [Ok] | semmle.label | s1 [Ok] | -| main.rs:241:14:241:16 | TryExpr | semmle.label | TryExpr | -| main.rs:243:10:243:11 | i1 | semmle.label | i1 | -| main.rs:256:9:256:10 | s1 [A] | semmle.label | s1 [A] | -| main.rs:256:14:256:39 | ...::A(...) [A] | semmle.label | ...::A(...) [A] | -| main.rs:256:29:256:38 | source(...) | semmle.label | source(...) | -| main.rs:258:11:258:12 | s1 [A] | semmle.label | s1 [A] | -| main.rs:259:9:259:25 | ...::A(...) [A] | semmle.label | ...::A(...) [A] | -| main.rs:259:24:259:24 | n | semmle.label | n | -| main.rs:259:35:259:35 | n | semmle.label | n | -| main.rs:262:11:262:12 | s1 [A] | semmle.label | s1 [A] | -| main.rs:263:9:263:25 | ...::A(...) [A] | semmle.label | ...::A(...) [A] | -| main.rs:263:24:263:24 | n | semmle.label | n | -| main.rs:263:55:263:55 | n | semmle.label | n | -| main.rs:274:9:274:10 | s1 [A] | semmle.label | s1 [A] | -| main.rs:274:14:274:26 | A(...) [A] | semmle.label | A(...) [A] | -| main.rs:274:16:274:25 | source(...) | semmle.label | source(...) | -| main.rs:276:11:276:12 | s1 [A] | semmle.label | s1 [A] | -| main.rs:277:9:277:12 | A(...) [A] | semmle.label | A(...) [A] | -| main.rs:277:11:277:11 | n | semmle.label | n | -| main.rs:277:22:277:22 | n | semmle.label | n | -| main.rs:280:11:280:12 | s1 [A] | semmle.label | s1 [A] | -| main.rs:281:9:281:12 | A(...) [A] | semmle.label | A(...) [A] | -| main.rs:281:11:281:11 | n | semmle.label | n | -| main.rs:281:29:281:29 | n | semmle.label | n | -| main.rs:295:9:295:10 | s1 [C] | semmle.label | s1 [C] | -| main.rs:295:14:297:5 | ...::C {...} [C] | semmle.label | ...::C {...} [C] | -| main.rs:296:18:296:27 | source(...) | semmle.label | source(...) | -| main.rs:299:11:299:12 | s1 [C] | semmle.label | s1 [C] | -| main.rs:300:9:300:38 | ...::C {...} [C] | semmle.label | ...::C {...} [C] | -| main.rs:300:36:300:36 | n | semmle.label | n | -| main.rs:300:48:300:48 | n | semmle.label | n | -| main.rs:303:11:303:12 | s1 [C] | semmle.label | s1 [C] | -| main.rs:304:9:304:38 | ...::C {...} [C] | semmle.label | ...::C {...} [C] | -| main.rs:304:36:304:36 | n | semmle.label | n | -| main.rs:304:81:304:81 | n | semmle.label | n | -| main.rs:315:9:315:10 | s1 [C] | semmle.label | s1 [C] | -| main.rs:315:14:317:5 | C {...} [C] | semmle.label | C {...} [C] | -| main.rs:316:18:316:27 | source(...) | semmle.label | source(...) | -| main.rs:319:11:319:12 | s1 [C] | semmle.label | s1 [C] | -| main.rs:320:9:320:24 | C {...} [C] | semmle.label | C {...} [C] | -| main.rs:320:22:320:22 | n | semmle.label | n | -| main.rs:320:34:320:34 | n | semmle.label | n | -| main.rs:323:11:323:12 | s1 [C] | semmle.label | s1 [C] | -| main.rs:324:9:324:24 | C {...} [C] | semmle.label | C {...} [C] | -| main.rs:324:22:324:22 | n | semmle.label | n | -| main.rs:324:53:324:53 | n | semmle.label | n | -| main.rs:336:9:336:12 | arr1 [array[]] | semmle.label | arr1 [array[]] | -| main.rs:336:16:336:33 | [...] [array[]] | semmle.label | [...] [array[]] | -| main.rs:336:23:336:32 | source(...) | semmle.label | source(...) | -| main.rs:337:9:337:10 | n1 | semmle.label | n1 | -| main.rs:337:14:337:17 | arr1 [array[]] | semmle.label | arr1 [array[]] | -| main.rs:337:14:337:20 | arr1[2] | semmle.label | arr1[2] | -| main.rs:338:10:338:11 | n1 | semmle.label | n1 | -| main.rs:340:9:340:12 | arr2 [array[]] | semmle.label | arr2 [array[]] | -| main.rs:340:16:340:31 | [...; 10] [array[]] | semmle.label | [...; 10] [array[]] | -| main.rs:340:17:340:26 | source(...) | semmle.label | source(...) | -| main.rs:341:9:341:10 | n2 | semmle.label | n2 | -| main.rs:341:14:341:17 | arr2 [array[]] | semmle.label | arr2 [array[]] | -| main.rs:341:14:341:20 | arr2[4] | semmle.label | arr2[4] | -| main.rs:342:10:342:11 | n2 | semmle.label | n2 | -| main.rs:350:9:350:12 | arr1 [array[]] | semmle.label | arr1 [array[]] | -| main.rs:350:16:350:33 | [...] [array[]] | semmle.label | [...] [array[]] | -| main.rs:350:23:350:32 | source(...) | semmle.label | source(...) | -| main.rs:351:9:351:10 | n1 | semmle.label | n1 | -| main.rs:351:15:351:18 | arr1 [array[]] | semmle.label | arr1 [array[]] | -| main.rs:352:14:352:15 | n1 | semmle.label | n1 | -| main.rs:362:9:362:12 | arr1 [array[]] | semmle.label | arr1 [array[]] | -| main.rs:362:16:362:33 | [...] [array[]] | semmle.label | [...] [array[]] | -| main.rs:362:23:362:32 | source(...) | semmle.label | source(...) | -| main.rs:363:11:363:14 | arr1 [array[]] | semmle.label | arr1 [array[]] | -| main.rs:364:9:364:17 | SlicePat [array[]] | semmle.label | SlicePat [array[]] | -| main.rs:364:10:364:10 | a | semmle.label | a | -| main.rs:364:13:364:13 | b | semmle.label | b | -| main.rs:364:16:364:16 | c | semmle.label | c | -| main.rs:365:18:365:18 | a | semmle.label | a | -| main.rs:366:18:366:18 | b | semmle.label | b | -| main.rs:367:18:367:18 | c | semmle.label | c | -| main.rs:376:5:376:11 | [post] mut_arr [array[]] | semmle.label | [post] mut_arr [array[]] | -| main.rs:376:18:376:27 | source(...) | semmle.label | source(...) | -| main.rs:377:9:377:9 | d | semmle.label | d | -| main.rs:377:13:377:19 | mut_arr [array[]] | semmle.label | mut_arr [array[]] | -| main.rs:377:13:377:22 | mut_arr[1] | semmle.label | mut_arr[1] | -| main.rs:378:10:378:10 | d | semmle.label | d | -| main.rs:379:10:379:16 | mut_arr [array[]] | semmle.label | mut_arr [array[]] | -| main.rs:379:10:379:19 | mut_arr[0] | semmle.label | mut_arr[0] | +| 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 | +| 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] | subpaths testFailures #select @@ -322,21 +336,23 @@ testFailures | 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:232:10:232:11 | i1 | main.rs:229:19:229:28 | source(...) | main.rs:232:10:232:11 | i1 | $@ | main.rs:229:19:229:28 | source(...) | source(...) | -| main.rs:243:10:243:11 | i1 | main.rs:238:35:238:44 | source(...) | main.rs:243:10:243:11 | i1 | $@ | main.rs:238:35:238:44 | source(...) | source(...) | -| main.rs:259:35:259:35 | n | main.rs:256:29:256:38 | source(...) | main.rs:259:35:259:35 | n | $@ | main.rs:256:29:256:38 | source(...) | source(...) | -| main.rs:263:55:263:55 | n | main.rs:256:29:256:38 | source(...) | main.rs:263:55:263:55 | n | $@ | main.rs:256:29:256:38 | source(...) | source(...) | -| main.rs:277:22:277:22 | n | main.rs:274:16:274:25 | source(...) | main.rs:277:22:277:22 | n | $@ | main.rs:274:16:274:25 | source(...) | source(...) | -| main.rs:281:29:281:29 | n | main.rs:274:16:274:25 | source(...) | main.rs:281:29:281:29 | n | $@ | main.rs:274:16:274:25 | source(...) | source(...) | -| main.rs:300:48:300:48 | n | main.rs:296:18:296:27 | source(...) | main.rs:300:48:300:48 | n | $@ | main.rs:296:18:296:27 | source(...) | source(...) | -| main.rs:304:81:304:81 | n | main.rs:296:18:296:27 | source(...) | main.rs:304:81:304:81 | n | $@ | main.rs:296:18:296:27 | source(...) | source(...) | -| main.rs:320:34:320:34 | n | main.rs:316:18:316:27 | source(...) | main.rs:320:34:320:34 | n | $@ | main.rs:316:18:316:27 | source(...) | source(...) | -| main.rs:324:53:324:53 | n | main.rs:316:18:316:27 | source(...) | main.rs:324:53:324:53 | n | $@ | main.rs:316:18:316:27 | source(...) | source(...) | -| main.rs:338:10:338:11 | n1 | main.rs:336:23:336:32 | source(...) | main.rs:338:10:338:11 | n1 | $@ | main.rs:336:23:336:32 | source(...) | source(...) | -| main.rs:342:10:342:11 | n2 | main.rs:340:17:340:26 | source(...) | main.rs:342:10:342:11 | n2 | $@ | main.rs:340:17:340:26 | source(...) | source(...) | -| main.rs:352:14:352:15 | n1 | main.rs:350:23:350:32 | source(...) | main.rs:352:14:352:15 | n1 | $@ | main.rs:350:23:350:32 | source(...) | source(...) | -| main.rs:365:18:365:18 | a | main.rs:362:23:362:32 | source(...) | main.rs:365:18:365:18 | a | $@ | main.rs:362:23:362:32 | source(...) | source(...) | -| main.rs:366:18:366:18 | b | main.rs:362:23:362:32 | source(...) | main.rs:366:18:366:18 | b | $@ | main.rs:362:23:362:32 | source(...) | source(...) | -| main.rs:367:18:367:18 | c | main.rs:362:23:362:32 | source(...) | main.rs:367:18:367:18 | c | $@ | main.rs:362:23:362:32 | source(...) | source(...) | -| main.rs:378:10:378:10 | d | main.rs:376:18:376:27 | source(...) | main.rs:378:10:378:10 | d | $@ | main.rs:376:18:376:27 | source(...) | source(...) | -| main.rs:379:10:379:19 | mut_arr[0] | main.rs:376:18:376:27 | source(...) | main.rs:379:10:379:19 | mut_arr[0] | $@ | main.rs:376:18:376:27 | 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(...) | diff --git a/rust/ql/test/library-tests/dataflow/local/main.rs b/rust/ql/test/library-tests/dataflow/local/main.rs index 57757324542d..e8d01b46ed70 100644 --- a/rust/ql/test/library-tests/dataflow/local/main.rs +++ b/rust/ql/test/library-tests/dataflow/local/main.rs @@ -225,6 +225,14 @@ fn option_unwrap() { sink(s1.unwrap()); // $ hasValueFlow=19 } +fn option_unwrap_or() { + let s1 = Some(source(46)); + sink(s1.unwrap_or(0)); // $ hasValueFlow=46 + + let s2 = Some(0); + sink(s2.unwrap_or(source(47))); // $ hasValueFlow=47 +} + fn option_questionmark() -> Option { let s1 = Some(source(20)); let s2 = Some(2); @@ -379,24 +387,6 @@ fn array_assignment() { sink(mut_arr[0]); // $ SPURIOUS: hasValueFlow=55 } -// ----------------------------------------------------------------------------- -// Data flow through mutable borrows - -fn read_through_borrow() { - let a = source(21); - let b = &a; - let c = *b; - sink(c); // $ MISSING: hasValueFlow=21 -} - -fn write_through_borrow() { - let mut a = 1; - sink(a); - let b = &mut a; - *b = source(39); - sink(a); // $ MISSING: hasValueFlow=39 -} - // Test data flow inconsistency occuring with captured variables and `continue` // in a loop. pub fn captured_variable_and_continue(names: Vec<(bool, Option)>) { @@ -430,6 +420,7 @@ fn main() { option_pattern_match_qualified(); option_pattern_match_unqualified(); option_unwrap(); + option_unwrap_or(); option_questionmark(); let _ = result_questionmark(); custom_tuple_enum_pattern_match_qualified(); @@ -443,7 +434,5 @@ fn main() { array_for_loop(); array_slice_pattern(); array_assignment(); - read_through_borrow(); - write_through_borrow(); captured_variable_and_continue(vec![]); } diff --git a/rust/ql/test/library-tests/dataflow/pointers/inline-flow.expected b/rust/ql/test/library-tests/dataflow/pointers/inline-flow.expected new file mode 100644 index 000000000000..4c3442683e76 --- /dev/null +++ b/rust/ql/test/library-tests/dataflow/pointers/inline-flow.expected @@ -0,0 +1,45 @@ +models +edges +| main.rs:13:9:13:9 | a | main.rs:14:14:14:14 | a | provenance | | +| main.rs:13:13:13:22 | source(...) | main.rs:13:9:13:9 | a | provenance | | +| main.rs:14:9:14:9 | b [&ref] | main.rs:15:14:15:14 | b [&ref] | provenance | | +| main.rs:14:13:14:14 | &a [&ref] | main.rs:14:9:14:9 | b [&ref] | provenance | | +| main.rs:14:14:14:14 | a | main.rs:14:13:14:14 | &a [&ref] | provenance | | +| main.rs:15:9:15:9 | c | main.rs:16:10:16:10 | c | provenance | | +| main.rs:15:13:15:14 | * ... | main.rs:15:9:15:9 | 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:41:15:41:18 | self [MyNumber] | provenance | | +| main.rs:41:15:41:18 | self [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:9:58:17 | my_number [MyNumber] | main.rs:59:10:59:18 | my_number [MyNumber] | provenance | | +| main.rs:58:21:58:50 | ...::MyNumber(...) [MyNumber] | main.rs:58:9:58:17 | 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:9:13:9 | a | semmle.label | a | +| main.rs:13:13:13:22 | source(...) | semmle.label | source(...) | +| main.rs:14:9:14:9 | b [&ref] | semmle.label | b [&ref] | +| 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:9:15:9 | c | semmle.label | c | +| 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:41:15:41:18 | self [MyNumber] | semmle.label | self [MyNumber] | +| 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:9:58:17 | my_number [MyNumber] | semmle.label | my_number [MyNumber] | +| 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(...) | diff --git a/rust/ql/test/library-tests/dataflow/pointers/inline-flow.ql b/rust/ql/test/library-tests/dataflow/pointers/inline-flow.ql new file mode 100644 index 000000000000..e399ea0e5d71 --- /dev/null +++ b/rust/ql/test/library-tests/dataflow/pointers/inline-flow.ql @@ -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() diff --git a/rust/ql/test/library-tests/dataflow/pointers/main.rs b/rust/ql/test/library-tests/dataflow/pointers/main.rs new file mode 100644 index 000000000000..2644616d1e43 --- /dev/null +++ b/rust/ql/test/library-tests/dataflow/pointers/main.rs @@ -0,0 +1,79 @@ +// ----------------------------------------------------------------------------- +// Data flow through pointers. + +fn source(i: i64) -> i64 { + 1000 + i +} + +fn sink(s: i64) { + println!("{}", s); +} + +fn read_through_borrow() { + let a = source(21); + let b = &a; + let c = *b; + sink(c); // $ hasValueFlow=21 +} + +fn write_through_borrow() { + let mut a = 1; + sink(a); + let b = &mut a; + *b = source(39); + sink(a); // $ MISSING: hasValueFlow=39 +} + +fn write_and_read_through_borrow() { + let mut a = 12; + let b = &mut a; + sink(*b); + *b = source(37); + sink(*b); // $ MISSING: hasValueFlow=37 +} + +enum MyNumber { + MyNumber(i64) +} + +impl MyNumber { + fn to_number(self) -> i64 { + match self { + MyNumber::MyNumber(number) => { + number + } + } + } + + fn get_number(&self) -> i64 { + match self { + MyNumber::MyNumber(number) => { + *number + } + } + } +} + +fn through_self_in_method_no_borrow() { + let my_number = MyNumber::MyNumber(source(33)); + sink(my_number.to_number()); // $ hasValueFlow=33 +} + +fn through_self_in_method_implicit_borrow() { + let my_number = MyNumber::MyNumber(source(85)); + sink(my_number.get_number()); // $ MISSING: hasValueFlow=85 +} + +fn through_self_in_method_explicit_borrow() { + let my_number = &MyNumber::MyNumber(source(40)); + sink(my_number.get_number()); // $ MISSING: hasValueFlow=40 +} + +fn main() { + read_through_borrow(); + write_through_borrow(); + write_and_read_through_borrow(); + through_self_in_method_no_borrow(); + through_self_in_method_implicit_borrow(); + through_self_in_method_explicit_borrow(); +} 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 new file mode 100644 index 000000000000..ed7262638a49 --- /dev/null +++ b/rust/ql/test/library-tests/dataflow/strings/inline-taint-flow.expected @@ -0,0 +1,35 @@ +models +| 1 | Summary: lang:alloc; ::as_str; Argument[self]; ReturnValue; taint | +edges +| main.rs:20:9:20:9 | s | main.rs:21:19:21:25 | s[...] | provenance | | +| main.rs:20:13:20:22 | source(...) | main.rs:20:9:20:9 | s | provenance | | +| main.rs:21:9:21:14 | sliced [&ref] | main.rs:22:16:22:21 | sliced | provenance | | +| main.rs:21:18:21:25 | &... [&ref] | main.rs:21:9:21:14 | sliced [&ref] | provenance | | +| main.rs:21:19:21:25 | s[...] | main.rs:21:18:21:25 | &... [&ref] | provenance | | +| main.rs:26:9:26:10 | s1 | main.rs:29:9:29:10 | s4 | provenance | | +| main.rs:26:14:26:23 | source(...) | main.rs:26:9:26:10 | s1 | provenance | | +| main.rs:29:9:29:10 | s4 | main.rs:32:10:32:11 | s4 | provenance | | +| main.rs:57:9:57:9 | s | main.rs:58:16:58:16 | s | provenance | | +| main.rs:57:13:57:22 | source(...) | main.rs:57:9:57:9 | 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:9:20:9 | s | semmle.label | s | +| main.rs:20:13:20:22 | source(...) | semmle.label | source(...) | +| main.rs:21:9:21:14 | sliced [&ref] | semmle.label | sliced [&ref] | +| 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:9:26:10 | s1 | semmle.label | s1 | +| main.rs:26:14:26:23 | source(...) | semmle.label | source(...) | +| main.rs:29:9:29:10 | s4 | semmle.label | s4 | +| main.rs:32:10:32:11 | s4 | semmle.label | s4 | +| main.rs:57:9:57:9 | s | semmle.label | s | +| 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: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(...) | diff --git a/rust/ql/test/library-tests/dataflow/strings/inline-taint-flow.ql b/rust/ql/test/library-tests/dataflow/strings/inline-taint-flow.ql new file mode 100644 index 000000000000..5dcb7ee70a9d --- /dev/null +++ b/rust/ql/test/library-tests/dataflow/strings/inline-taint-flow.ql @@ -0,0 +1,12 @@ +/** + * @kind path-problem + */ + +import rust +import utils.test.InlineFlowTest +import DefaultFlowTest +import TaintFlow::PathGraph + +from TaintFlow::PathNode source, TaintFlow::PathNode sink +where TaintFlow::flowPath(source, sink) +select sink, source, sink, "$@", source, source.toString() diff --git a/rust/ql/test/library-tests/dataflow/strings/main.rs b/rust/ql/test/library-tests/dataflow/strings/main.rs new file mode 100644 index 000000000000..7cc273132e78 --- /dev/null +++ b/rust/ql/test/library-tests/dataflow/strings/main.rs @@ -0,0 +1,81 @@ +// Taint tests for strings + +fn source(i: i64) -> String { + format!("{}", i) +} + +fn source_slice(_i: i64) -> &'static str { + "source" +} + +fn sink_slice(s: &str) { + println!("{}", s); +} + +fn sink(s: String) { + println!("{}", s); +} + +fn string_slice() { + let s = source(35); + let sliced = &s[1..3]; + sink_slice(sliced); // $ hasTaintFlow=35 +} + +fn string_add() { + let s1 = source(83); + let s2 = "2".to_owned(); + let s3 = "3"; + let s4 = s1 + s3; + let s5 = s2 + s3; + + sink(s4); // $ hasTaintFlow=83 + sink(s5); +} + +fn string_add_reference() { + let s1 = source(37); + let s2 = "1".to_string(); + + sink("Hello ".to_string() + &s1); // $ MISSING: hasTaintFlow=37 + sink("Hello ".to_string() + &s2); +} + +fn string_from() { + let s1 = source_slice(36); + let s2 = String::from(s1); + sink(s2); // $ MISSING: hasTaintFlow=36 +} + +fn string_to_string() { + let s1 = source_slice(22); + let s2 = s1.to_string(); + sink(s2); // $ MISSING: hasTaintFlow=22 +} + +fn as_str() { + let s = source(67); + sink_slice(s.as_str()); // $ hasTaintFlow=67 +} + +fn string_format() { + let s1 = source(34); + let s2 = "2"; + let s3 = "3"; + + let s4 = format!("{s1} and {s3}"); + let s5 = format!("{s2} and {s3}"); + + sink_slice(&s4); // $ MISSING: hasTaintFlow=34 + sink_slice(&s5); +} + +fn main() { + string_slice(); + string_add(); + string_add_reference(); + string_from(); + as_str(); + string_to_string(); + string_format(); +} diff --git a/rust/ql/test/library-tests/dataflow/taint/TaintFlowStep.expected b/rust/ql/test/library-tests/dataflow/taint/TaintFlowStep.expected index 3b727d29b677..016fa4e74cd2 100644 --- a/rust/ql/test/library-tests/dataflow/taint/TaintFlowStep.expected +++ b/rust/ql/test/library-tests/dataflow/taint/TaintFlowStep.expected @@ -1,3 +1,5 @@ +| file://:0:0:0:0 | [summary param] self in lang:alloc::_::::as_str | file://:0:0:0:0 | [summary] to write: ReturnValue in lang:alloc::_::::as_str | MaD:7 | +| file://:0:0:0:0 | [summary param] self in repo:https://github.com/seanmonstar/reqwest:reqwest::_::::text | file://:0:0:0:0 | [summary] to write: ReturnValue.Variant[crate::result::Result::Ok(0)] in repo:https://github.com/seanmonstar/reqwest:reqwest::_::::text | MaD:0 | | 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:13:10:13:10 | a | main.rs:13:10:13:14 | ... + ... | | 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 082057e30177..2de69da5312d 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 @@ -7,6 +7,11 @@ edges | 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: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 [&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: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 | | @@ -22,6 +27,12 @@ nodes | 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 [&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] | @@ -34,5 +45,6 @@ testFailures | main.rs:13:10:13:14 | ... + ... | main.rs:12:13:12:22 | source(...) | main.rs:13:10:13:14 | ... + ... | $@ | main.rs:12:13:12:22 | source(...) | source(...) | | main.rs:18:10:18:11 | - ... | main.rs:17:13:17:22 | source(...) | main.rs:18:10:18:11 | - ... | $@ | main.rs:17:13:17:22 | source(...) | source(...) | | main.rs:24:10:24:17 | b as i64 | main.rs:22:13:22:22 | source(...) | main.rs:24:10:24:17 | b as i64 | $@ | main.rs:22:13:22:22 | source(...) | source(...) | +| main.rs:39:14:39:19 | sliced | main.rs:37:17:37:26 | source(...) | main.rs:39:14:39:19 | sliced | $@ | main.rs:37:17:37:26 | source(...) | source(...) | | main.rs:54:14:54:19 | arr[1] | main.rs:53:19:53:28 | source(...) | main.rs:54:14:54:19 | arr[1] | $@ | main.rs:53:19:53:28 | source(...) | source(...) | | main.rs:70:14:70:17 | arr2 | main.rs:69:19:69:28 | source(...) | main.rs:70:14:70:17 | arr2 | $@ | main.rs:69:19:69:28 | source(...) | source(...) | diff --git a/rust/ql/test/library-tests/dataflow/taint/main.rs b/rust/ql/test/library-tests/dataflow/taint/main.rs index 71bababfba64..90af2ec8a060 100644 --- a/rust/ql/test/library-tests/dataflow/taint/main.rs +++ b/rust/ql/test/library-tests/dataflow/taint/main.rs @@ -36,7 +36,7 @@ mod string { pub fn string_slice() { let s = source(35); let sliced = &s[1..3]; - sink(sliced); // $ MISSING: hasTaintFlow=35 + sink(sliced); // $ hasTaintFlow=35 } } diff --git a/rust/ql/test/library-tests/variables/Ssa.expected b/rust/ql/test/library-tests/variables/Ssa.expected index 13e7f1e4ce38..6736f87d709f 100644 --- a/rust/ql/test/library-tests/variables/Ssa.expected +++ b/rust/ql/test/library-tests/variables/Ssa.expected @@ -152,6 +152,8 @@ read | variables.rs:16:9:16:10 | x1 | variables.rs:16:9:16:10 | x1 | variables.rs:17:15:17:16 | x1 | | variables.rs:21:9:21:14 | x2 | variables.rs:21:13:21:14 | x2 | variables.rs:22:15:22:16 | x2 | | variables.rs:23:5:23:6 | x2 | variables.rs:21:13:21:14 | x2 | variables.rs:24:15:24:16 | x2 | +| variables.rs:28:9:28:13 | x | variables.rs:28:13:28:13 | x | variables.rs:29:20:29:20 | x | +| variables.rs:30:5:30:5 | x | variables.rs:28:13:28:13 | x | variables.rs:31:20:31:20 | x | | variables.rs:35:9:35:10 | x3 | variables.rs:35:9:35:10 | x3 | variables.rs:36:15:36:16 | x3 | | variables.rs:35:9:35:10 | x3 | variables.rs:35:9:35:10 | x3 | variables.rs:38:9:38:10 | x3 | | variables.rs:37:9:37:10 | x3 | variables.rs:37:9:37:10 | x3 | variables.rs:39:15:39:16 | x3 | @@ -276,7 +278,9 @@ read | variables.rs:510:9:510:13 | a | variables.rs:510:13:510:13 | a | variables.rs:512:5:512:5 | a | | variables.rs:510:9:510:13 | a | variables.rs:510:13:510:13 | a | variables.rs:513:15:513:15 | a | | variables.rs:514:5:514:5 | a | variables.rs:510:13:510:13 | a | variables.rs:515:15:515:15 | a | +| variables.rs:519:9:519:9 | x | variables.rs:519:9:519:9 | x | variables.rs:520:20:520:20 | x | | variables.rs:519:9:519:9 | x | variables.rs:519:9:519:9 | x | variables.rs:521:15:521:15 | x | +| variables.rs:523:9:523:9 | z | variables.rs:523:9:523:9 | z | variables.rs:524:20:524:20 | z | | variables.rs:532:10:532:18 | SelfParam | variables.rs:532:15:532:18 | self | variables.rs:533:6:533:9 | self | firstRead | variables.rs:3:14:3:14 | s | variables.rs:3:14:3:14 | s | variables.rs:4:20:4:20 | s | @@ -285,6 +289,8 @@ firstRead | variables.rs:16:9:16:10 | x1 | variables.rs:16:9:16:10 | x1 | variables.rs:17:15:17:16 | x1 | | variables.rs:21:9:21:14 | x2 | variables.rs:21:13:21:14 | x2 | variables.rs:22:15:22:16 | x2 | | variables.rs:23:5:23:6 | x2 | variables.rs:21:13:21:14 | x2 | variables.rs:24:15:24:16 | x2 | +| variables.rs:28:9:28:13 | x | variables.rs:28:13:28:13 | x | variables.rs:29:20:29:20 | x | +| variables.rs:30:5:30:5 | x | variables.rs:28:13:28:13 | x | variables.rs:31:20:31:20 | x | | variables.rs:35:9:35:10 | x3 | variables.rs:35:9:35:10 | x3 | variables.rs:36:15:36:16 | x3 | | variables.rs:37:9:37:10 | x3 | variables.rs:37:9:37:10 | x3 | variables.rs:39:15:39:16 | x3 | | variables.rs:43:9:43:10 | x4 | variables.rs:43:9:43:10 | x4 | variables.rs:44:15:44:16 | x4 | @@ -383,7 +389,8 @@ firstRead | variables.rs:491:22:491:22 | n | variables.rs:491:22:491:22 | n | variables.rs:493:25:493:25 | n | | variables.rs:510:9:510:13 | a | variables.rs:510:13:510:13 | a | variables.rs:511:15:511:15 | a | | variables.rs:514:5:514:5 | a | variables.rs:510:13:510:13 | a | variables.rs:515:15:515:15 | a | -| variables.rs:519:9:519:9 | x | variables.rs:519:9:519:9 | x | variables.rs:521:15:521:15 | x | +| variables.rs:519:9:519:9 | x | variables.rs:519:9:519:9 | x | variables.rs:520:20:520:20 | x | +| variables.rs:523:9:523:9 | z | variables.rs:523:9:523:9 | z | variables.rs:524:20:524:20 | z | | variables.rs:532:10:532:18 | SelfParam | variables.rs:532:15:532:18 | self | variables.rs:533:6:533:9 | self | lastRead | variables.rs:3:14:3:14 | s | variables.rs:3:14:3:14 | s | variables.rs:4:20:4:20 | s | @@ -392,6 +399,8 @@ lastRead | variables.rs:16:9:16:10 | x1 | variables.rs:16:9:16:10 | x1 | variables.rs:17:15:17:16 | x1 | | variables.rs:21:9:21:14 | x2 | variables.rs:21:13:21:14 | x2 | variables.rs:22:15:22:16 | x2 | | variables.rs:23:5:23:6 | x2 | variables.rs:21:13:21:14 | x2 | variables.rs:24:15:24:16 | x2 | +| variables.rs:28:9:28:13 | x | variables.rs:28:13:28:13 | x | variables.rs:29:20:29:20 | x | +| variables.rs:30:5:30:5 | x | variables.rs:28:13:28:13 | x | variables.rs:31:20:31:20 | x | | variables.rs:35:9:35:10 | x3 | variables.rs:35:9:35:10 | x3 | variables.rs:38:9:38:10 | x3 | | variables.rs:37:9:37:10 | x3 | variables.rs:37:9:37:10 | x3 | variables.rs:39:15:39:16 | x3 | | variables.rs:43:9:43:10 | x4 | variables.rs:43:9:43:10 | x4 | variables.rs:49:15:49:16 | x4 | @@ -492,6 +501,7 @@ lastRead | variables.rs:510:9:510:13 | a | variables.rs:510:13:510:13 | a | variables.rs:513:15:513:15 | a | | variables.rs:514:5:514:5 | a | variables.rs:510:13:510:13 | a | variables.rs:515:15:515:15 | a | | variables.rs:519:9:519:9 | x | variables.rs:519:9:519:9 | x | variables.rs:521:15:521:15 | x | +| variables.rs:523:9:523:9 | z | variables.rs:523:9:523:9 | z | variables.rs:524:20:524:20 | z | | variables.rs:532:10:532:18 | SelfParam | variables.rs:532:15:532:18 | self | variables.rs:533:6:533:9 | self | adjacentReads | variables.rs:35:9:35:10 | x3 | variables.rs:35:9:35:10 | x3 | variables.rs:36:15:36:16 | x3 | variables.rs:38:9:38:10 | x3 | @@ -523,6 +533,7 @@ adjacentReads | variables.rs:491:13:491:17 | f | variables.rs:491:17:491:17 | f | variables.rs:495:9:495:9 | f | variables.rs:496:9:496:9 | f | | variables.rs:510:9:510:13 | a | variables.rs:510:13:510:13 | a | variables.rs:511:15:511:15 | a | variables.rs:512:5:512:5 | a | | variables.rs:510:9:510:13 | a | variables.rs:510:13:510:13 | a | variables.rs:512:5:512:5 | a | variables.rs:513:15:513:15 | a | +| variables.rs:519:9:519:9 | x | variables.rs:519:9:519:9 | x | variables.rs:520:20:520:20 | x | variables.rs:521:15:521:15 | x | phi | variables.rs:191:9:191:44 | [match(true)] phi | variables.rs:191:9:191:44 | a3 | variables.rs:191:22:191:23 | a3 | | variables.rs:191:9:191:44 | [match(true)] phi | variables.rs:191:9:191:44 | a3 | variables.rs:191:42:191:43 | a3 | diff --git a/rust/ql/test/query-tests/security/CWE-089/sqlx.rs b/rust/ql/test/query-tests/security/CWE-089/sqlx.rs index 173f6c730b29..257e1b6004d4 100644 --- a/rust/ql/test/query-tests/security/CWE-089/sqlx.rs +++ b/rust/ql/test/query-tests/security/CWE-089/sqlx.rs @@ -38,14 +38,14 @@ use sqlx::Executor; */ async fn test_sqlx_mysql(url: &str, enable_remote: bool) -> Result<(), sqlx::Error> { - // connect through a MySql connection pool + // connect through a MySQL connection pool let pool = sqlx::mysql::MySqlPool::connect(url).await?; let mut conn = pool.acquire().await?; // construct queries (with extra variants) let const_string = String::from("Alice"); let arg_string = std::env::args().nth(1).unwrap_or(String::from("Alice")); // $ MISSING: Source=args1 - let remote_string = reqwest::blocking::get("http://example.com/").unwrap().text().unwrap_or(String::from("Alice")); // $ MISSING: Source=remote1 + let remote_string = reqwest::blocking::get("http://example.com/").unwrap().text().unwrap_or(String::from("Alice")); // $ Source=remote1 let remote_number = remote_string.parse::().unwrap_or(0); let safe_query_1 = String::from("SELECT * FROM people WHERE firstname='Alice'"); let safe_query_2 = String::from("SELECT * FROM people WHERE firstname='") + &const_string + "'"; @@ -60,22 +60,22 @@ async fn test_sqlx_mysql(url: &str, enable_remote: bool) -> Result<(), sqlx::Err let _ = conn.execute(safe_query_1.as_str()).await?; // $ sql-sink let _ = conn.execute(safe_query_2.as_str()).await?; // $ sql-sink let _ = conn.execute(safe_query_3.as_str()).await?; // $ sql-sink - let _ = conn.execute(unsafe_query_1.as_str()).await?; // $ sql-sink MISSING: Alert[sql-injection]=args1 + let _ = conn.execute(unsafe_query_1.as_str()).await?; // $ sql-sink MISSING: Alert[rust/sql-injection]=args1 if enable_remote { - let _ = conn.execute(unsafe_query_2.as_str()).await?; // $ sql-sink MISSING: Alert[sql-injection]=remote1 - let _ = conn.execute(unsafe_query_3.as_str()).await?; // $ sql-sink MISSING: Alert[sql-injection]=remote1 - let _ = conn.execute(unsafe_query_4.as_str()).await?; // $ sql-sink MISSING: Alert[sql-injection]=remote1 + 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 } // prepared queries let _ = sqlx::query(safe_query_1.as_str()).execute(&pool).await?; // $ sql-sink let _ = sqlx::query(safe_query_2.as_str()).execute(&pool).await?; // $ sql-sink let _ = sqlx::query(safe_query_3.as_str()).execute(&pool).await?; // $ sql-sink - let _ = sqlx::query(unsafe_query_1.as_str()).execute(&pool).await?; // $ sql-sink MISSING: Alert[sql-injection]=args1 + let _ = sqlx::query(unsafe_query_1.as_str()).execute(&pool).await?; // $ sql-sink MISSING: Alert[rust/sql-injection][rust/sql-injection]=args1 if enable_remote { - let _ = sqlx::query(unsafe_query_2.as_str()).execute(&pool).await?; // $ sql-sink MISSING: Alert[sql-injection]=remote1 - let _ = sqlx::query(unsafe_query_3.as_str()).execute(&pool).await?; // $ sql-sink MISSING: Alert[sql-injection]=remote1 - let _ = sqlx::query(unsafe_query_4.as_str()).execute(&pool).await?; // $ sql-sink MISSING: Alert[sql-injection]=remote1 + 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(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 @@ -88,12 +88,12 @@ async fn test_sqlx_mysql(url: &str, enable_remote: bool) -> Result<(), sqlx::Err } async fn test_sqlx_sqlite(url: &str, enable_remote: bool) -> Result<(), sqlx::Error> { - // connect through Sqlite, no connection pool + // connect through SQLite, no connection pool let mut conn = sqlx::sqlite::SqliteConnection::connect(url).await?; // construct queries let const_string = String::from("Alice"); - let remote_string = reqwest::blocking::get("http://example.com/").unwrap().text().unwrap_or(String::from("Alice")); // $ MISSING: Source=remote2 + let remote_string = reqwest::blocking::get("http://example.com/").unwrap().text().unwrap_or(String::from("Alice")); // $ 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) @@ -101,26 +101,26 @@ async fn test_sqlx_sqlite(url: &str, enable_remote: bool) -> Result<(), sqlx::Er // direct execution (with extra variants) let _ = conn.execute(safe_query_1.as_str()).await?; // $ sql-sink if enable_remote { - let _ = conn.execute(unsafe_query_1.as_str()).await?; // $ sql-sink MISSING: Alert[sql-injection]=remote2 + let _ = conn.execute(unsafe_query_1.as_str()).await?; // $ sql-sink MISSING: Alert[rust/sql-injection]=remote2 } // ... let _ = sqlx::raw_sql(safe_query_1.as_str()).execute(&mut conn).await?; // $ sql-sink if enable_remote { - let _ = sqlx::raw_sql(unsafe_query_1.as_str()).execute(&mut conn).await?; // $ sql-sink MISSING: Alert[sql-injection]=remote2 + let _ = sqlx::raw_sql(unsafe_query_1.as_str()).execute(&mut conn).await?; // $ sql-sink MISSING: Alert[rust/sql-injection]=remote2 } // prepared queries (with extra variants) let _ = sqlx::query(safe_query_1.as_str()).execute(&mut conn).await?; // $ sql-sink let _ = sqlx::query(prepared_query_1.as_str()).bind(&const_string).execute(&mut conn).await?; // $ sql-sink if enable_remote { - let _ = sqlx::query(unsafe_query_1.as_str()).execute(&mut conn).await?; // $ sql-sink MISSING: Alert[sql-injection]=remote2 + let _ = sqlx::query(unsafe_query_1.as_str()).execute(&mut conn).await?; // $ sql-sink MISSING: Alert[rust/sql-injection]=remote2 let _ = sqlx::query(prepared_query_1.as_str()).bind(&remote_string).execute(&mut conn).await?; // $ sql-sink } // ... let _ = sqlx::query(safe_query_1.as_str()).fetch(&mut conn); // $ sql-sink let _ = sqlx::query(prepared_query_1.as_str()).bind(&const_string).fetch(&mut conn); // $ sql-sink if enable_remote { - let _ = sqlx::query(unsafe_query_1.as_str()).fetch(&mut conn); // $ sql-sink MISSING: Alert[sql-injection]=remote2 + let _ = sqlx::query(unsafe_query_1.as_str()).fetch(&mut conn); // $ sql-sink MISSING: Alert[rust/sql-injection]=remote2 let _ = sqlx::query(prepared_query_1.as_str()).bind(&remote_string).fetch(&mut conn); // $ sql-sink } // ... @@ -129,7 +129,7 @@ async fn test_sqlx_sqlite(url: &str, enable_remote: bool) -> Result<(), sqlx::Er let row2: (i64, String, String) = sqlx::query_as(prepared_query_1.as_str()).bind(&const_string).fetch_one(&mut conn).await?; // $ sql-sink println!(" row2 = {:?}", row2); if enable_remote { - let _: (i64, String, String) = sqlx::query_as(unsafe_query_1.as_str()).fetch_one(&mut conn).await?; // $ sql-sink MISSING: Alert[sql-injection]=remote2 + let _: (i64, String, String) = sqlx::query_as(unsafe_query_1.as_str()).fetch_one(&mut conn).await?; // $ sql-sink MISSING: Alert[rust/sql-injection]=remote2 let _: (i64, String, String) = sqlx::query_as(prepared_query_1.as_str()).bind(&remote_string).fetch_one(&mut conn).await?; // $ sql-sink } // ... @@ -138,7 +138,7 @@ async fn test_sqlx_sqlite(url: &str, enable_remote: bool) -> Result<(), sqlx::Er let row4: (i64, String, String) = sqlx::query_as(prepared_query_1.as_str()).bind(&const_string).fetch_optional(&mut conn).await?.expect("no data"); // $ sql-sink println!(" row4 = {:?}", row4); if enable_remote { - let _: (i64, String, String) = sqlx::query_as(unsafe_query_1.as_str()).fetch_optional(&mut conn).await?.expect("no data"); // $ sql-sink $ MISSING: Alert[sql-injection]=remote2 + let _: (i64, String, String) = sqlx::query_as(unsafe_query_1.as_str()).fetch_optional(&mut conn).await?.expect("no data"); // $ sql-sink $ MISSING: Alert[rust/sql-injection]=remote2 let _: (i64, String, String) = sqlx::query_as(prepared_query_1.as_str()).bind(&remote_string).fetch_optional(&mut conn).await?.expect("no data"); // $ sql-sink } // ... @@ -146,7 +146,7 @@ async fn test_sqlx_sqlite(url: &str, enable_remote: bool) -> Result<(), sqlx::Er let _ = sqlx::query(prepared_query_1.as_str()).bind(&const_string).fetch_all(&mut conn).await?; // $ sql-sink let _ = sqlx::query("SELECT * FROM people WHERE firstname=?").bind(&const_string).fetch_all(&mut conn).await?; // $ sql-sink if enable_remote { - let _ = sqlx::query(unsafe_query_1.as_str()).fetch_all(&mut conn).await?; // $ sql-sink MISSING: Alert[sql-injection]=remote2 + let _ = sqlx::query(unsafe_query_1.as_str()).fetch_all(&mut conn).await?; // $ sql-sink MISSING: Alert[rust/sql-injection]=remote2 let _ = sqlx::query(prepared_query_1.as_str()).bind(&remote_string).fetch_all(&mut conn).await?; // $ sql-sink let _ = sqlx::query("SELECT * FROM people WHERE firstname=?").bind(&remote_string).fetch_all(&mut conn).await?; // $ sql-sink } @@ -160,13 +160,13 @@ async fn test_sqlx_sqlite(url: &str, enable_remote: bool) -> Result<(), sqlx::Er } async fn test_sqlx_postgres(url: &str, enable_remote: bool) -> Result<(), sqlx::Error> { - // connect through a PostGres connection pool + // connect through a PostgreSQL connection pool let pool = sqlx::postgres::PgPool::connect(url).await?; let mut conn = pool.acquire().await?; // construct queries let const_string = String::from("Alice"); - let remote_string = reqwest::blocking::get("http://example.com/").unwrap().text().unwrap_or(String::from("Alice")); // $ MISSING: Source=remote3 + let remote_string = reqwest::blocking::get("http://example.com/").unwrap().text().unwrap_or(String::from("Alice")); // $ 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) @@ -174,14 +174,14 @@ async fn test_sqlx_postgres(url: &str, enable_remote: bool) -> Result<(), sqlx:: // direct execution let _ = conn.execute(safe_query_1.as_str()).await?; // $ sql-sink if enable_remote { - let _ = conn.execute(unsafe_query_1.as_str()).await?; // $ sql-sink MISSING: Alert[sql-injection]=remote3 + let _ = conn.execute(unsafe_query_1.as_str()).await?; // $ sql-sink MISSING: Alert[rust/sql-injection]=remote3 } // prepared queries let _ = sqlx::query(safe_query_1.as_str()).execute(&pool).await?; // $ sql-sink let _ = sqlx::query(prepared_query_1.as_str()).bind(&const_string).execute(&pool).await?; // $ sql-sink if enable_remote { - let _ = sqlx::query(unsafe_query_1.as_str()).execute(&pool).await?; // $ sql-sink MISSING: Alert[sql-injection]=remote3 + let _ = sqlx::query(unsafe_query_1.as_str()).execute(&pool).await?; // $ sql-sink MISSING: Alert[rust/sql-injection]=remote3 let _ = sqlx::query(prepared_query_1.as_str()).bind(&remote_string).execute(&pool).await?; // $ sql-sink }