Skip to content

Commit acc72b2

Browse files
committed
Rust: Improve handling of deref expressions in data flow
1 parent 0dd99f6 commit acc72b2

File tree

16 files changed

+249
-198
lines changed

16 files changed

+249
-198
lines changed

rust/ql/lib/codeql/rust/dataflow/internal/DataFlowImpl.qll

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -365,6 +365,7 @@ module RustDataFlow implements InputSig<Location> {
365365
node instanceof CaptureNode or
366366
node instanceof ClosureParameterNode or
367367
node instanceof DerefBorrowNode or
368+
node instanceof DerefOutNode or
368369
node.asExpr() instanceof ParenExpr or
369370
nodeIsHidden(node.(PostUpdateNode).getPreUpdateNode())
370371
}
@@ -586,10 +587,9 @@ module RustDataFlow implements InputSig<Location> {
586587
.isVariantField([any(OptionEnum o).getSome(), any(ResultEnum r).getOk()], 0)
587588
)
588589
or
589-
exists(PrefixExpr deref |
590+
exists(DerefExpr deref |
590591
c instanceof ReferenceContent and
591-
deref.getOperatorName() = "*" and
592-
node1.asExpr() = deref.getExpr() and
592+
node1.(DerefOutNode).getDerefExpr() = deref and
593593
node2.asExpr() = deref
594594
)
595595
or
@@ -721,10 +721,6 @@ module RustDataFlow implements InputSig<Location> {
721721
VariableCapture::storeStep(node1, c, node2)
722722
or
723723
implicitBorrow(node1, node2, c)
724-
or
725-
// A store step dual to the read step for implicit dereferences.
726-
implicitDeref(node2.(PostUpdateNode).getPreUpdateNode(),
727-
node1.(PostUpdateNode).getPreUpdateNode(), c)
728724
}
729725

730726
/**

rust/ql/lib/codeql/rust/dataflow/internal/Node.qll

Lines changed: 46 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -348,15 +348,46 @@ abstract class OutNode extends Node {
348348
}
349349

350350
final private class ExprOutNode extends ExprNode, OutNode {
351-
ExprOutNode() { this.asExpr() instanceof Call }
351+
ExprOutNode() {
352+
exists(Call call |
353+
call = this.asExpr() and
354+
not call instanceof DerefExpr // Handled by `DerefOutNode`
355+
)
356+
}
352357

353-
/** Gets the underlying call CFG node that includes this out node. */
358+
/** Gets the underlying call node that includes this out node. */
354359
override DataFlowCall getCall(ReturnKind kind) {
355360
result.asCall() = n and
356361
kind = TNormalReturnKind()
357362
}
358363
}
359364

365+
/**
366+
* A node that represents the value of a `*` expression _before_ implicit
367+
* dereferencing:
368+
*
369+
* `*v` equivalent to `*Deref::deref(&v)`, and this node represents the
370+
* `Deref::deref(&v)` part.
371+
*/
372+
class DerefOutNode extends OutNode, TDerefOutNode {
373+
DerefExpr de;
374+
375+
DerefOutNode() { this = TDerefOutNode(de, false) }
376+
377+
DerefExpr getDerefExpr() { result = de }
378+
379+
override CfgScope getCfgScope() { result = de.getEnclosingCfgScope() }
380+
381+
override DataFlowCall getCall(ReturnKind kind) {
382+
result.asCall() = de and
383+
kind = TNormalReturnKind()
384+
}
385+
386+
override Location getLocation() { result = de.getLocation() }
387+
388+
override string toString() { result = de.toString() + " [pre-dereferenced]" }
389+
}
390+
360391
final class SummaryOutNode extends FlowSummaryNode, OutNode {
361392
private DataFlowCall call;
362393
private ReturnKind kind_;
@@ -434,6 +465,18 @@ final class DerefBorrowPostUpdateNode extends PostUpdateNode, TDerefBorrowNode {
434465
override Location getLocation() { result = arg.getLocation() }
435466
}
436467

468+
class DerefOutPostUpdateNode extends PostUpdateNode, TDerefOutNode {
469+
DerefExpr de;
470+
471+
DerefOutPostUpdateNode() { this = TDerefOutNode(de, true) }
472+
473+
override DerefOutNode getPreUpdateNode() { result = TDerefOutNode(de, false) }
474+
475+
override CfgScope getCfgScope() { result = de.getEnclosingCfgScope() }
476+
477+
override Location getLocation() { result = de.getLocation() }
478+
}
479+
437480
final class SummaryPostUpdateNode extends FlowSummaryNode, PostUpdateNode {
438481
private FlowSummaryNode pre;
439482

@@ -499,6 +542,7 @@ newtype TNode =
499542
TypeInference::implicitBorrow(n) and
500543
borrow = true
501544
} or
545+
TDerefOutNode(DerefExpr de, Boolean isPost) or
502546
TSsaNode(SsaImpl::DataFlowIntegration::SsaNode node) or
503547
TFlowSummaryNode(FlowSummaryImpl::Private::SummaryNode sn) {
504548
forall(AstNode n | n = sn.getSinkElement() or n = sn.getSourceElement() |

rust/ql/lib/codeql/rust/frameworks/stdlib/Builtins.qll

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,19 @@ private class BuiltinsTypesFile extends File {
2727
class BuiltinType extends Struct {
2828
BuiltinType() { this.getFile() instanceof BuiltinsTypesFile }
2929

30-
/** Gets the name of this type. */
30+
/**
31+
* Gets the name of this type.
32+
*
33+
* This is the name used internally to represent the type, for example `Ref`.
34+
*/
3135
string getName() { result = super.getName().getText() }
36+
37+
/**
38+
* Gets a display name for this type.
39+
*
40+
* This is the name used in code, for example `&`.
41+
*/
42+
string getDisplayName() { result = this.getName() }
3243
}
3344

3445
/**
@@ -147,9 +158,18 @@ class ArrayType extends BuiltinType {
147158
ArrayType() { this.getName() = "Array" }
148159
}
149160

150-
/** The builtin reference type `&T` or `&mut T`. */
161+
/** The builtin reference type `&T`. */
151162
class RefType extends BuiltinType {
152163
RefType() { this.getName() = "Ref" }
164+
165+
override string getDisplayName() { result = "&" }
166+
}
167+
168+
/** The builtin reference type `&mut T`. */
169+
class RefMutType extends BuiltinType {
170+
RefMutType() { this.getName() = "RefMut" }
171+
172+
override string getDisplayName() { result = "&mut" }
153173
}
154174

155175
/** The builtin pointer type `*const T` or `*mut T`. */

rust/ql/lib/codeql/rust/frameworks/stdlib/alloc.model.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,10 @@ extensions:
2424
extensible: summaryModel
2525
data:
2626
# Box
27-
- ["<alloc::boxed::Box>::pin", "Argument[0]", "ReturnValue.Reference", "value", "manual"]
28-
- ["<alloc::boxed::Box>::new", "Argument[0]", "ReturnValue.Reference", "value", "manual"]
29-
- ["<alloc::boxed::Box>::into_pin", "Argument[0]", "ReturnValue", "value", "manual"]
27+
- ["<alloc::boxed::Box as core::ops::deref::Deref>::deref", "Argument[self].Reference.Field[alloc::boxed::Box(0)]", "ReturnValue.Reference", "value", "manual"]
28+
- ["<alloc::boxed::Box>::pin", "Argument[0]", "ReturnValue.Field[core::pin::Pin::pointer].Field[alloc::boxed::Box(0)]", "value", "manual"]
29+
- ["<alloc::boxed::Box>::new", "Argument[0]", "ReturnValue.Field[alloc::boxed::Box(0)]", "value", "manual"]
30+
- ["<alloc::boxed::Box>::into_pin", "Argument[0]", "ReturnValue.Field[core::pin::Pin::pointer]", "value", "manual"]
3031
# Fmt
3132
- ["alloc::fmt::format", "Argument[0]", "ReturnValue", "taint", "manual"]
3233
# Layout

rust/ql/lib/codeql/rust/frameworks/stdlib/core.model.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ extensions:
33
pack: codeql/rust-all
44
extensible: summaryModel
55
data:
6+
# Builtin deref
7+
- ["<& as core::ops::deref::Deref>::deref", "Argument[self].Reference", "ReturnValue", "value", "manual"]
8+
- ["<&mut as core::ops::deref::Deref>::deref", "Argument[self].Reference", "ReturnValue", "value", "manual"]
69
# Arithmetic
710
- ["<_ as core::ops::arith::Add>::add", "Argument[self]", "ReturnValue", "taint", "manual"]
811
- ["<_ as core::ops::arith::Add>::add", "Argument[0]", "ReturnValue", "taint", "manual"]
@@ -41,8 +44,9 @@ extensions:
4144
- ["core::ptr::write", "Argument[1]", "Argument[0].Reference", "value", "manual"]
4245
- ["core::ptr::write_unaligned", "Argument[1]", "Argument[0].Reference", "value", "manual"]
4346
- ["core::ptr::write_volatile", "Argument[1]", "Argument[0].Reference", "value", "manual"]
44-
# https://doc.rust-lang.org/std/pin/struct.Pin.html#impl-Deref-for-Pin%3CPtr%3E, but limited to `Ptr = &`
47+
# https://doc.rust-lang.org/std/pin/struct.Pin.html#impl-Deref-for-Pin%3CPtr%3E, but limited to `Ptr = &` and `Ptr = Box`
4548
- ["<core::pin::Pin as core::ops::deref::Deref>::deref", "Argument[self].Reference.Field[core::pin::Pin::pointer].Reference", "ReturnValue.Reference", "value", "manual"]
49+
- ["<core::pin::Pin as core::ops::deref::Deref>::deref", "Argument[self].Reference.Field[core::pin::Pin::pointer].Field[alloc::boxed::Box(0)]", "ReturnValue.Reference", "value", "manual"]
4650
# Str
4751
- ["<core::str>::as_str", "Argument[self]", "ReturnValue", "value", "manual"]
4852
- ["<core::str>::as_bytes", "Argument[self]", "ReturnValue", "value", "manual"]

rust/ql/lib/codeql/rust/internal/PathResolution.qll

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -958,7 +958,16 @@ private class StructItemNode extends TypeItemNode, ParameterizableItemNode insta
958958
language[monotonicAggregates]
959959
override string getCanonicalPath(Crate c) {
960960
this.hasCanonicalPath(c) and
961-
result = strictconcat(int i | i in [0 .. 2] | this.getCanonicalPathPart(c, i) order by i)
961+
(
962+
this =
963+
any(Builtins::BuiltinType t |
964+
not t.hasVisibility() and
965+
result = t.getDisplayName()
966+
)
967+
or
968+
not this = any(Builtins::BuiltinType t | not t.hasVisibility()) and
969+
result = strictconcat(int i | i in [0 .. 2] | this.getCanonicalPathPart(c, i) order by i)
970+
)
962971
}
963972
}
964973

rust/ql/test/library-tests/dataflow/global/inline-flow.expected

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
models
2-
| 1 | Summary: futures_executor::local_pool::block_on; Argument[0]; ReturnValue; value |
2+
| 1 | Summary: <& as core::ops::deref::Deref>::deref; Argument[self].Reference; ReturnValue; value |
3+
| 2 | Summary: futures_executor::local_pool::block_on; Argument[0]; ReturnValue; value |
34
edges
45
| main.rs:12:28:14:1 | { ... } | main.rs:17:13:17:23 | get_data(...) | provenance | |
56
| main.rs:13:5:13:13 | source(...) | main.rs:12:28:14:1 | { ... } | provenance | |
@@ -118,7 +119,7 @@ edges
118119
| main.rs:236:9:236:22 | &... [&ref] | main.rs:235:38:237:5 | { ... } [&ref] | provenance | |
119120
| main.rs:236:10:236:22 | ... .value | main.rs:236:9:236:22 | &... [&ref] | provenance | |
120121
| main.rs:236:11:236:15 | * ... [MyInt] | main.rs:236:10:236:22 | ... .value | provenance | |
121-
| main.rs:236:12:236:15 | self [&ref, MyInt] | main.rs:236:11:236:15 | * ... [MyInt] | provenance | |
122+
| main.rs:236:12:236:15 | self [&ref, MyInt] | main.rs:236:11:236:15 | * ... [MyInt] | provenance | MaD:1 |
122123
| main.rs:242:9:242:9 | a [MyInt] | main.rs:244:13:244:13 | a [MyInt] | provenance | |
123124
| main.rs:242:13:242:38 | MyInt {...} [MyInt] | main.rs:242:9:242:9 | a [MyInt] | provenance | |
124125
| main.rs:242:28:242:36 | source(...) | main.rs:242:13:242:38 | MyInt {...} [MyInt] | provenance | |
@@ -148,17 +149,17 @@ edges
148149
| main.rs:270:28:270:37 | source(...) | main.rs:270:13:270:39 | MyInt {...} [MyInt] | provenance | |
149150
| main.rs:272:9:272:9 | c | main.rs:273:10:273:10 | c | provenance | |
150151
| main.rs:272:13:272:29 | * ... | main.rs:272:9:272:9 | c | provenance | |
151-
| main.rs:272:14:272:29 | ...::deref(...) [&ref] | main.rs:272:13:272:29 | * ... | provenance | |
152+
| main.rs:272:14:272:29 | ...::deref(...) [&ref] | main.rs:272:13:272:29 | * ... | provenance | MaD:1 |
152153
| main.rs:272:27:272:28 | &a [&ref, MyInt] | main.rs:235:14:235:18 | SelfParam [&ref, MyInt] | provenance | |
153-
| main.rs:272:27:272:28 | &a [&ref, MyInt] | main.rs:272:14:272:29 | ...::deref(...) [&ref] | provenance | |
154+
| main.rs:272:27:272:28 | &a [&ref, MyInt] | main.rs:272:14:272:29 | ...::deref(...) [&ref] | provenance | MaD:1 |
154155
| main.rs:272:28:272:28 | a [MyInt] | main.rs:272:27:272:28 | &a [&ref, MyInt] | provenance | |
155156
| main.rs:275:9:275:9 | a [MyInt] | main.rs:276:14:276:14 | a [MyInt] | provenance | |
156157
| main.rs:275:13:275:39 | MyInt {...} [MyInt] | main.rs:275:9:275:9 | a [MyInt] | provenance | |
157158
| main.rs:275:28:275:37 | source(...) | main.rs:275:13:275:39 | MyInt {...} [MyInt] | provenance | |
158-
| main.rs:276:9:276:9 | c [&ref] | main.rs:277:10:277:10 | c | provenance | |
159-
| main.rs:276:13:276:14 | * ... [&ref] | main.rs:276:9:276:9 | c [&ref] | provenance | |
159+
| main.rs:276:9:276:9 | c | main.rs:277:10:277:10 | c | provenance | |
160+
| main.rs:276:13:276:14 | * ... | main.rs:276:9:276:9 | c | provenance | |
160161
| main.rs:276:14:276:14 | a [MyInt] | main.rs:235:14:235:18 | SelfParam [&ref, MyInt] | provenance | |
161-
| main.rs:276:14:276:14 | a [MyInt] | main.rs:276:13:276:14 | * ... [&ref] | provenance | |
162+
| main.rs:276:14:276:14 | a [MyInt] | main.rs:276:13:276:14 | * ... | provenance | MaD:1 |
162163
| main.rs:289:18:289:21 | SelfParam [MyInt] | main.rs:289:48:291:5 | { ... } [MyInt] | provenance | |
163164
| main.rs:293:26:293:37 | ...: MyInt [MyInt] | main.rs:293:49:295:5 | { ... } [MyInt] | provenance | |
164165
| main.rs:299:9:299:9 | a [MyInt] | main.rs:301:50:301:50 | a [MyInt] | provenance | |
@@ -185,7 +186,7 @@ edges
185186
| main.rs:326:17:326:25 | source(...) | main.rs:326:13:326:13 | c | provenance | |
186187
| main.rs:334:9:334:9 | a | main.rs:335:10:335:10 | a | provenance | |
187188
| main.rs:334:13:334:55 | ...::block_on(...) | main.rs:334:9:334:9 | a | provenance | |
188-
| main.rs:334:41:334:54 | async_source(...) | main.rs:334:13:334:55 | ...::block_on(...) | provenance | MaD:1 |
189+
| main.rs:334:41:334:54 | async_source(...) | main.rs:334:13:334:55 | ...::block_on(...) | provenance | MaD:2 |
189190
nodes
190191
| main.rs:12:28:14:1 | { ... } | semmle.label | { ... } |
191192
| main.rs:13:5:13:13 | source(...) | semmle.label | source(...) |
@@ -355,8 +356,8 @@ nodes
355356
| main.rs:275:9:275:9 | a [MyInt] | semmle.label | a [MyInt] |
356357
| main.rs:275:13:275:39 | MyInt {...} [MyInt] | semmle.label | MyInt {...} [MyInt] |
357358
| main.rs:275:28:275:37 | source(...) | semmle.label | source(...) |
358-
| main.rs:276:9:276:9 | c [&ref] | semmle.label | c [&ref] |
359-
| main.rs:276:13:276:14 | * ... [&ref] | semmle.label | * ... [&ref] |
359+
| main.rs:276:9:276:9 | c | semmle.label | c |
360+
| main.rs:276:13:276:14 | * ... | semmle.label | * ... |
360361
| main.rs:276:14:276:14 | a [MyInt] | semmle.label | a [MyInt] |
361362
| main.rs:277:10:277:10 | c | semmle.label | c |
362363
| main.rs:289:18:289:21 | SelfParam [MyInt] | semmle.label | SelfParam [MyInt] |
@@ -407,7 +408,7 @@ subpaths
407408
| main.rs:254:13:254:13 | a [MyInt] | main.rs:220:12:220:15 | SelfParam [MyInt] | main.rs:220:42:223:5 | { ... } [MyInt] | main.rs:254:13:254:20 | a.add(...) [MyInt] |
408409
| main.rs:261:35:261:35 | b [MyInt] | main.rs:227:30:227:39 | ...: MyInt [MyInt] | main.rs:227:19:227:27 | SelfParam [Return] [&ref, MyInt] | main.rs:261:27:261:32 | [post] &mut a [&ref, MyInt] |
409410
| main.rs:272:27:272:28 | &a [&ref, MyInt] | main.rs:235:14:235:18 | SelfParam [&ref, MyInt] | main.rs:235:38:237:5 | { ... } [&ref] | main.rs:272:14:272:29 | ...::deref(...) [&ref] |
410-
| main.rs:276:14:276:14 | a [MyInt] | main.rs:235:14:235:18 | SelfParam [&ref, MyInt] | main.rs:235:38:237:5 | { ... } [&ref] | main.rs:276:13:276:14 | * ... [&ref] |
411+
| main.rs:276:14:276:14 | a [MyInt] | main.rs:235:14:235:18 | SelfParam [&ref, MyInt] | main.rs:235:38:237:5 | { ... } [&ref] | main.rs:276:13:276:14 | * ... |
411412
| main.rs:301:50:301:50 | a [MyInt] | main.rs:289:18:289:21 | SelfParam [MyInt] | main.rs:289:48:291:5 | { ... } [MyInt] | main.rs:301:30:301:54 | ...::take_self(...) [MyInt] |
412413
| main.rs:306:55:306:55 | b [MyInt] | main.rs:293:26:293:37 | ...: MyInt [MyInt] | main.rs:293:49:295:5 | { ... } [MyInt] | main.rs:306:30:306:56 | ...::take_second(...) [MyInt] |
413414
testFailures

rust/ql/test/library-tests/dataflow/global/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ fn test_operator_overloading() {
274274

275275
let a = MyInt { value: source(28) };
276276
let c = *a;
277-
sink(c); // $ hasTaintFlow=28 MISSING: hasValueFlow=28
277+
sink(c); // $ hasValueFlow=28
278278
}
279279

280280
trait MyTrait2 {

rust/ql/test/library-tests/dataflow/global/viableCallable.expected

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@
5959
| main.rs:212:13:212:34 | ...::new(...) | main.rs:205:5:208:5 | fn new |
6060
| main.rs:212:24:212:33 | source(...) | main.rs:1:1:3:1 | fn source |
6161
| main.rs:214:5:214:11 | sink(...) | main.rs:5:1:7:1 | fn sink |
62+
| main.rs:236:11:236:15 | * ... | {EXTERNAL LOCATION} | fn deref |
63+
| main.rs:236:11:236:15 | * ... | {EXTERNAL LOCATION} | fn deref |
6264
| main.rs:242:28:242:36 | source(...) | main.rs:1:1:3:1 | fn source |
6365
| main.rs:244:13:244:17 | ... + ... | main.rs:220:5:223:5 | fn add |
6466
| main.rs:245:5:245:17 | sink(...) | main.rs:5:1:7:1 | fn sink |
@@ -75,6 +77,8 @@
7577
| main.rs:266:5:266:10 | ... *= ... | main.rs:227:5:229:5 | fn mul_assign |
7678
| main.rs:267:5:267:17 | sink(...) | main.rs:5:1:7:1 | fn sink |
7779
| main.rs:270:28:270:37 | source(...) | main.rs:1:1:3:1 | fn source |
80+
| main.rs:272:13:272:29 | * ... | {EXTERNAL LOCATION} | fn deref |
81+
| main.rs:272:13:272:29 | * ... | {EXTERNAL LOCATION} | fn deref |
7882
| main.rs:272:14:272:29 | ...::deref(...) | main.rs:235:5:237:5 | fn deref |
7983
| main.rs:273:5:273:11 | sink(...) | main.rs:5:1:7:1 | fn sink |
8084
| main.rs:275:28:275:37 | source(...) | main.rs:1:1:3:1 | fn source |

rust/ql/test/library-tests/dataflow/local/DataFlowStep.expected

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -825,8 +825,8 @@ localStep
825825
| main.rs:616:36:616:41 | [post] MacroExpr | main.rs:616:36:616:39 | [post] ...::new(...) |
826826
readStep
827827
| main.rs:50:9:50:15 | Some(...) | {EXTERNAL LOCATION} | Some | main.rs:50:14:50:14 | _ |
828+
| main.rs:116:10:116:11 | * ... [pre-dereferenced] | file://:0:0:0:0 | &ref | main.rs:116:10:116:11 | * ... |
828829
| main.rs:116:11:116:11 | [post] i [borrowed] | file://:0:0:0:0 | &ref | main.rs:116:11:116:11 | [post] i |
829-
| main.rs:116:11:116:11 | i | file://:0:0:0:0 | &ref | main.rs:116:10:116:11 | * ... |
830830
| main.rs:124:10:124:10 | a | file://:0:0:0:0 | tuple.0 | main.rs:124:10:124:12 | a.0 |
831831
| main.rs:125:10:125:10 | a | file://:0:0:0:0 | tuple.1 | main.rs:125:10:125:12 | a.1 |
832832
| main.rs:130:9:130:20 | TuplePat | file://:0:0:0:0 | tuple.0 | main.rs:130:10:130:11 | a0 |
@@ -934,30 +934,30 @@ readStep
934934
| main.rs:506:13:506:13 | [post] a [borrowed] | file://:0:0:0:0 | &ref | main.rs:506:13:506:13 | [post] a |
935935
| main.rs:519:10:519:11 | [post] vs [borrowed] | file://:0:0:0:0 | &ref | main.rs:519:10:519:11 | [post] vs |
936936
| main.rs:519:10:519:11 | vs | file://:0:0:0:0 | element | main.rs:519:10:519:14 | vs[0] |
937-
| main.rs:520:11:520:35 | ... .unwrap() | file://:0:0:0:0 | &ref | main.rs:520:10:520:35 | * ... |
937+
| main.rs:520:10:520:35 | * ... [pre-dereferenced] | file://:0:0:0:0 | &ref | main.rs:520:10:520:35 | * ... |
938938
| main.rs:520:11:520:35 | [post] ... .unwrap() [borrowed] | file://:0:0:0:0 | &ref | main.rs:520:11:520:35 | [post] ... .unwrap() |
939-
| main.rs:521:11:521:35 | ... .unwrap() | file://:0:0:0:0 | &ref | main.rs:521:10:521:35 | * ... |
939+
| main.rs:521:10:521:35 | * ... [pre-dereferenced] | file://:0:0:0:0 | &ref | main.rs:521:10:521:35 | * ... |
940940
| main.rs:521:11:521:35 | [post] ... .unwrap() [borrowed] | file://:0:0:0:0 | &ref | main.rs:521:11:521:35 | [post] ... .unwrap() |
941941
| main.rs:523:14:523:15 | vs | file://:0:0:0:0 | element | main.rs:523:9:523:9 | v |
942942
| main.rs:526:9:526:10 | &... | file://:0:0:0:0 | &ref | main.rs:526:10:526:10 | v |
943943
| main.rs:526:15:526:23 | vs.iter() | file://:0:0:0:0 | element | main.rs:526:9:526:10 | &... |
944944
| main.rs:531:9:531:10 | &... | file://:0:0:0:0 | &ref | main.rs:531:10:531:10 | v |
945945
| main.rs:531:15:531:17 | vs2 | file://:0:0:0:0 | element | main.rs:531:9:531:10 | &... |
946+
| main.rs:535:28:535:29 | * ... [pre-dereferenced] | file://:0:0:0:0 | &ref | main.rs:535:28:535:29 | * ... |
946947
| main.rs:535:29:535:29 | [post] x [borrowed] | file://:0:0:0:0 | &ref | main.rs:535:29:535:29 | [post] x |
947-
| main.rs:535:29:535:29 | x | file://:0:0:0:0 | &ref | main.rs:535:28:535:29 | * ... |
948+
| main.rs:536:33:536:34 | * ... [pre-dereferenced] | file://:0:0:0:0 | &ref | main.rs:536:33:536:34 | * ... |
948949
| main.rs:536:34:536:34 | [post] x [borrowed] | file://:0:0:0:0 | &ref | main.rs:536:34:536:34 | [post] x |
949-
| main.rs:536:34:536:34 | x | file://:0:0:0:0 | &ref | main.rs:536:33:536:34 | * ... |
950950
| main.rs:538:14:538:27 | vs.into_iter() | file://:0:0:0:0 | element | main.rs:538:9:538:9 | v |
951951
| main.rs:544:10:544:15 | [post] vs_mut [borrowed] | file://:0:0:0:0 | &ref | main.rs:544:10:544:15 | [post] vs_mut |
952952
| main.rs:544:10:544:15 | vs_mut | file://:0:0:0:0 | element | main.rs:544:10:544:18 | vs_mut[0] |
953-
| main.rs:545:11:545:39 | ... .unwrap() | file://:0:0:0:0 | &ref | main.rs:545:10:545:39 | * ... |
953+
| main.rs:545:10:545:39 | * ... [pre-dereferenced] | file://:0:0:0:0 | &ref | main.rs:545:10:545:39 | * ... |
954954
| main.rs:545:11:545:39 | [post] ... .unwrap() [borrowed] | file://:0:0:0:0 | &ref | main.rs:545:11:545:39 | [post] ... .unwrap() |
955-
| main.rs:546:11:546:39 | ... .unwrap() | file://:0:0:0:0 | &ref | main.rs:546:10:546:39 | * ... |
955+
| main.rs:546:10:546:39 | * ... [pre-dereferenced] | file://:0:0:0:0 | &ref | main.rs:546:10:546:39 | * ... |
956956
| main.rs:546:11:546:39 | [post] ... .unwrap() [borrowed] | file://:0:0:0:0 | &ref | main.rs:546:11:546:39 | [post] ... .unwrap() |
957957
| main.rs:548:9:548:14 | &mut ... | file://:0:0:0:0 | &ref | main.rs:548:14:548:14 | v |
958958
| main.rs:548:19:548:35 | vs_mut.iter_mut() | file://:0:0:0:0 | element | main.rs:548:9:548:14 | &mut ... |
959+
| main.rs:562:10:562:15 | * ... [pre-dereferenced] | file://:0:0:0:0 | &ref | main.rs:562:10:562:15 | * ... |
959960
| main.rs:562:11:562:15 | [post] c_ref [borrowed] | file://:0:0:0:0 | &ref | main.rs:562:11:562:15 | [post] c_ref |
960-
| main.rs:562:11:562:15 | c_ref | file://:0:0:0:0 | &ref | main.rs:562:10:562:15 | * ... |
961961
storeStep
962962
| main.rs:116:11:116:11 | i | file://:0:0:0:0 | &ref | main.rs:116:11:116:11 | i [borrowed] |
963963
| main.rs:123:14:123:22 | source(...) | file://:0:0:0:0 | tuple.0 | main.rs:123:13:123:26 | TupleExpr |

0 commit comments

Comments
 (0)