1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135
|
- // MIR for `main` before InstrumentCoverage
+ // MIR for `main` after InstrumentCoverage
fn main() -> () {
let mut _0: ();
let mut _1: Enum;
let mut _2: isize;
let _3: u32;
let mut _4: u32;
let _5: u32;
let mut _6: u32;
let _7: u32;
let mut _8: u32;
let _9: u32;
let mut _10: u32;
scope 1 {
debug d => _3;
}
scope 2 {
debug c => _5;
}
scope 3 {
debug b => _7;
}
scope 4 {
debug a => _9;
}
+ coverage body span: $DIR/branch_match_arms.rs:14:11: 21:2 (#0)
+ coverage ExpressionId(0) => Expression { lhs: Counter(1), op: Add, rhs: Counter(2) };
+ coverage ExpressionId(1) => Expression { lhs: Expression(0), op: Add, rhs: Counter(3) };
+ coverage ExpressionId(2) => Expression { lhs: Counter(0), op: Subtract, rhs: Expression(1) };
+ coverage Code(Counter(0)) => $DIR/branch_match_arms.rs:14:1: 15:21 (#0);
+ coverage Code(Counter(1)) => $DIR/branch_match_arms.rs:16:17: 16:33 (#0);
+ coverage Code(Counter(2)) => $DIR/branch_match_arms.rs:17:17: 17:33 (#0);
+ coverage Code(Counter(3)) => $DIR/branch_match_arms.rs:18:17: 18:33 (#0);
+ coverage Code(Expression(2)) => $DIR/branch_match_arms.rs:19:17: 19:33 (#0);
+ coverage Code(Counter(0)) => $DIR/branch_match_arms.rs:21:2: 21:2 (#0);
+
bb0: {
+ Coverage::CounterIncrement(0);
StorageLive(_1);
_1 = Enum::A(const 0_u32);
PlaceMention(_1);
_2 = discriminant(_1);
switchInt(move _2) -> [0: bb5, 1: bb4, 2: bb3, 3: bb2, otherwise: bb1];
}
bb1: {
FakeRead(ForMatchedPlace(None), _1);
unreachable;
}
bb2: {
+ Coverage::CounterIncrement(1);
falseEdge -> [real: bb8, imaginary: bb3];
}
bb3: {
+ Coverage::CounterIncrement(2);
falseEdge -> [real: bb7, imaginary: bb4];
}
bb4: {
+ Coverage::CounterIncrement(3);
falseEdge -> [real: bb6, imaginary: bb5];
}
bb5: {
+ Coverage::ExpressionUsed(2);
StorageLive(_9);
_9 = copy ((_1 as A).0: u32);
StorageLive(_10);
_10 = copy _9;
_0 = consume(move _10) -> [return: bb12, unwind: bb14];
}
bb6: {
StorageLive(_7);
_7 = copy ((_1 as B).0: u32);
StorageLive(_8);
_8 = copy _7;
_0 = consume(move _8) -> [return: bb11, unwind: bb14];
}
bb7: {
StorageLive(_5);
_5 = copy ((_1 as C).0: u32);
StorageLive(_6);
_6 = copy _5;
_0 = consume(move _6) -> [return: bb10, unwind: bb14];
}
bb8: {
StorageLive(_3);
_3 = copy ((_1 as D).0: u32);
StorageLive(_4);
_4 = copy _3;
_0 = consume(move _4) -> [return: bb9, unwind: bb14];
}
bb9: {
StorageDead(_4);
StorageDead(_3);
goto -> bb13;
}
bb10: {
StorageDead(_6);
StorageDead(_5);
goto -> bb13;
}
bb11: {
StorageDead(_8);
StorageDead(_7);
goto -> bb13;
}
bb12: {
StorageDead(_10);
StorageDead(_9);
goto -> bb13;
}
bb13: {
StorageDead(_1);
return;
}
bb14 (cleanup): {
resume;
}
}
|