blob: 6739634f65b305cf25c6410a26f9303564238de9 [file] [log] [blame]
<!DOCTYPE html>
<!--
Preview this file as rendered HTML from the github source at:
https://htmlpreview.github.io/?https://github.com/rust-lang/rust/blob/master/src/test/run-make-fulldeps/coverage-spanview/expected_mir_dump.overflow/overflow.main.-------.InstrumentCoverage.0.html
For revisions in Pull Requests (PR):
* Replace "rust-lang" with the github PR author
* Replace "master" with the PR branch name
-->
<html>
<head>
<title>overflow.main - Coverage Spans</title>
<style>
.line {
counter-increment: line;
}
.line:before {
content: counter(line) ": ";
font-family: Menlo, Monaco, monospace;
font-style: italic;
width: 3.8em;
display: inline-block;
text-align: right;
filter: opacity(50%);
-webkit-user-select: none;
}
.code {
color: #dddddd;
background-color: #222222;
font-family: Menlo, Monaco, monospace;
line-height: 1.4em;
border-bottom: 2px solid #222222;
white-space: pre;
display: inline-block;
}
.odd {
background-color: #55bbff;
color: #223311;
}
.even {
background-color: #ee7756;
color: #551133;
}
.code {
--index: calc(var(--layer) - 1);
padding-top: calc(var(--index) * 0.15em);
filter:
hue-rotate(calc(var(--index) * 25deg))
saturate(calc(100% - (var(--index) * 2%)))
brightness(calc(100% - (var(--index) * 1.5%)));
}
.annotation {
color: #4444ff;
font-family: monospace;
font-style: italic;
display: none;
-webkit-user-select: none;
}
body:active .annotation {
/* requires holding mouse down anywhere on the page */
display: inline-block;
}
span:hover .annotation {
/* requires hover over a span ONLY on its first line */
display: inline-block;
}
</style>
</head>
<body>
<div class="code" style="counter-reset: line 14"><span class="line"><span><span class="code even" style="--layer: 1" title="16:25-16:27: @0[1]: _1 = const 10_i32
16:9-16:22: @0[2]: FakeRead(ForLet, _1)"><span class="annotation">@0⦊</span>fn main() -&gt; Result&lt;(),u8&gt; {</span></span>
<span class="line"><span class="code even" style="--layer: 1" title="16:25-16:27: @0[1]: _1 = const 10_i32
16:9-16:22: @0[2]: FakeRead(ForLet, _1)"> let mut countdown = 10<span class="annotation">⦉@0</span></span></span><span class="code" style="--layer: 0">;</span></span>
<span class="line"><span class="code" style="--layer: 0"> while </span><span><span class="code odd" style="--layer: 1" title="17:11-17:20: @2[2]: _5 = _1
17:11-17:24: @2[3]: _4 = Gt(move _5, const 0_i32)
17:11-17:24: @2[5]: FakeRead(ForMatchedPlace, _4)"><span class="annotation">@1,2⦊</span>countdown &gt; 0<span class="annotation">⦉@1,2</span></span></span><span class="code" style="--layer: 0"> {</span></span>
<span class="line"><span class="code" style="--layer: 0"> if </span><span><span class="code even" style="--layer: 1" title="18:12-18:21: @5[3]: _8 = _1
18:12-18:26: @5[4]: _7 = Eq(move _8, const 1_i32)
18:12-18:26: @5[6]: FakeRead(ForMatchedPlace, _7)"><span class="annotation">@3,5⦊</span>countdown == 1<span class="annotation">⦉@3,5</span></span></span><span class="code" style="--layer: 0"> </span><span><span class="code odd" style="--layer: 1" title="19:26-19:44: @8.Call: _9 = might_overflow(const 10_u32) -&gt; [return: bb9, unwind: bb23]
19:17-19:23: @9[0]: FakeRead(ForLet, _9)
20:22-20:34: @9[7]: _51 = const main::promoted[1]
20:22-20:34: @9[8]: _15 = &amp;(*_51)
20:22-20:34: @9[9]: _14 = &amp;(*_15)
20:22-20:34: @9[10]: _13 = move _14 as &amp;[&amp;str] (Pointer(Unsize))
20:36-20:42: @9[18]: _22 = &amp;_9
20:13-20:44: @9[19]: _21 = (move _22,)
20:13-20:44: @9[21]: FakeRead(ForMatchedPlace, _21)
20:13-20:44: @9[23]: _23 = (_21.0: &amp;u32)
20:13-20:44: @9[26]: _25 = &amp;(*_23)
20:13-20:44: @9[28]: _26 = &lt;u32 as std::fmt::Display&gt;::fmt as for&lt;&#39;r, &#39;s, &#39;t0&gt; fn(&amp;&#39;r u32, &amp;&#39;s mut std::fmt::Formatter&lt;&#39;t0&gt;) -&gt; std::result::Result&lt;(), std::fmt::Error&gt; (Pointer(ReifyFnPointer))
20:13-20:44: @9.Call: _24 = ArgumentV1::new::&lt;u32&gt;(move _25, move _26) -&gt; [return: bb10, unwind: bb23]
20:13-20:44: @10[2]: _20 = [move _24]
20:13-20:44: @10[5]: _19 = &amp;_20
20:13-20:44: @10[6]: _18 = &amp;(*_19)
20:13-20:44: @10[7]: _17 = move _18 as &amp;[std::fmt::ArgumentV1] (Pointer(Unsize))
20:13-20:44: @10.Call: _12 = Arguments::new_v1(move _13, move _17) -&gt; [return: bb11, unwind: bb23]
20:13-20:44: @11.Call: _11 = _print(move _12) -&gt; [return: bb12, unwind: bb23]
20:13-20:44: @12[6]: _10 = const ()
18:27-21:10: @12[8]: _6 = const ()"><span class="annotation">@6,8,9,10,11,12⦊</span>{</span></span>
<span class="line"><span class="code odd" style="--layer: 1" title="19:26-19:44: @8.Call: _9 = might_overflow(const 10_u32) -&gt; [return: bb9, unwind: bb23]
19:17-19:23: @9[0]: FakeRead(ForLet, _9)
20:22-20:34: @9[7]: _51 = const main::promoted[1]
20:22-20:34: @9[8]: _15 = &amp;(*_51)
20:22-20:34: @9[9]: _14 = &amp;(*_15)
20:22-20:34: @9[10]: _13 = move _14 as &amp;[&amp;str] (Pointer(Unsize))
20:36-20:42: @9[18]: _22 = &amp;_9
20:13-20:44: @9[19]: _21 = (move _22,)
20:13-20:44: @9[21]: FakeRead(ForMatchedPlace, _21)
20:13-20:44: @9[23]: _23 = (_21.0: &amp;u32)
20:13-20:44: @9[26]: _25 = &amp;(*_23)
20:13-20:44: @9[28]: _26 = &lt;u32 as std::fmt::Display&gt;::fmt as for&lt;&#39;r, &#39;s, &#39;t0&gt; fn(&amp;&#39;r u32, &amp;&#39;s mut std::fmt::Formatter&lt;&#39;t0&gt;) -&gt; std::result::Result&lt;(), std::fmt::Error&gt; (Pointer(ReifyFnPointer))
20:13-20:44: @9.Call: _24 = ArgumentV1::new::&lt;u32&gt;(move _25, move _26) -&gt; [return: bb10, unwind: bb23]
20:13-20:44: @10[2]: _20 = [move _24]
20:13-20:44: @10[5]: _19 = &amp;_20
20:13-20:44: @10[6]: _18 = &amp;(*_19)
20:13-20:44: @10[7]: _17 = move _18 as &amp;[std::fmt::ArgumentV1] (Pointer(Unsize))
20:13-20:44: @10.Call: _12 = Arguments::new_v1(move _13, move _17) -&gt; [return: bb11, unwind: bb23]
20:13-20:44: @11.Call: _11 = _print(move _12) -&gt; [return: bb12, unwind: bb23]
20:13-20:44: @12[6]: _10 = const ()
18:27-21:10: @12[8]: _6 = const ()"> let result = might_overflow(10);</span></span>
<span class="line"><span class="code odd" style="--layer: 1" title="19:26-19:44: @8.Call: _9 = might_overflow(const 10_u32) -&gt; [return: bb9, unwind: bb23]
19:17-19:23: @9[0]: FakeRead(ForLet, _9)
20:22-20:34: @9[7]: _51 = const main::promoted[1]
20:22-20:34: @9[8]: _15 = &amp;(*_51)
20:22-20:34: @9[9]: _14 = &amp;(*_15)
20:22-20:34: @9[10]: _13 = move _14 as &amp;[&amp;str] (Pointer(Unsize))
20:36-20:42: @9[18]: _22 = &amp;_9
20:13-20:44: @9[19]: _21 = (move _22,)
20:13-20:44: @9[21]: FakeRead(ForMatchedPlace, _21)
20:13-20:44: @9[23]: _23 = (_21.0: &amp;u32)
20:13-20:44: @9[26]: _25 = &amp;(*_23)
20:13-20:44: @9[28]: _26 = &lt;u32 as std::fmt::Display&gt;::fmt as for&lt;&#39;r, &#39;s, &#39;t0&gt; fn(&amp;&#39;r u32, &amp;&#39;s mut std::fmt::Formatter&lt;&#39;t0&gt;) -&gt; std::result::Result&lt;(), std::fmt::Error&gt; (Pointer(ReifyFnPointer))
20:13-20:44: @9.Call: _24 = ArgumentV1::new::&lt;u32&gt;(move _25, move _26) -&gt; [return: bb10, unwind: bb23]
20:13-20:44: @10[2]: _20 = [move _24]
20:13-20:44: @10[5]: _19 = &amp;_20
20:13-20:44: @10[6]: _18 = &amp;(*_19)
20:13-20:44: @10[7]: _17 = move _18 as &amp;[std::fmt::ArgumentV1] (Pointer(Unsize))
20:13-20:44: @10.Call: _12 = Arguments::new_v1(move _13, move _17) -&gt; [return: bb11, unwind: bb23]
20:13-20:44: @11.Call: _11 = _print(move _12) -&gt; [return: bb12, unwind: bb23]
20:13-20:44: @12[6]: _10 = const ()
18:27-21:10: @12[8]: _6 = const ()"> println!("Result: {}", result);</span></span>
<span class="line"><span class="code odd" style="--layer: 1" title="19:26-19:44: @8.Call: _9 = might_overflow(const 10_u32) -&gt; [return: bb9, unwind: bb23]
19:17-19:23: @9[0]: FakeRead(ForLet, _9)
20:22-20:34: @9[7]: _51 = const main::promoted[1]
20:22-20:34: @9[8]: _15 = &amp;(*_51)
20:22-20:34: @9[9]: _14 = &amp;(*_15)
20:22-20:34: @9[10]: _13 = move _14 as &amp;[&amp;str] (Pointer(Unsize))
20:36-20:42: @9[18]: _22 = &amp;_9
20:13-20:44: @9[19]: _21 = (move _22,)
20:13-20:44: @9[21]: FakeRead(ForMatchedPlace, _21)
20:13-20:44: @9[23]: _23 = (_21.0: &amp;u32)
20:13-20:44: @9[26]: _25 = &amp;(*_23)
20:13-20:44: @9[28]: _26 = &lt;u32 as std::fmt::Display&gt;::fmt as for&lt;&#39;r, &#39;s, &#39;t0&gt; fn(&amp;&#39;r u32, &amp;&#39;s mut std::fmt::Formatter&lt;&#39;t0&gt;) -&gt; std::result::Result&lt;(), std::fmt::Error&gt; (Pointer(ReifyFnPointer))
20:13-20:44: @9.Call: _24 = ArgumentV1::new::&lt;u32&gt;(move _25, move _26) -&gt; [return: bb10, unwind: bb23]
20:13-20:44: @10[2]: _20 = [move _24]
20:13-20:44: @10[5]: _19 = &amp;_20
20:13-20:44: @10[6]: _18 = &amp;(*_19)
20:13-20:44: @10[7]: _17 = move _18 as &amp;[std::fmt::ArgumentV1] (Pointer(Unsize))
20:13-20:44: @10.Call: _12 = Arguments::new_v1(move _13, move _17) -&gt; [return: bb11, unwind: bb23]
20:13-20:44: @11.Call: _11 = _print(move _12) -&gt; [return: bb12, unwind: bb23]
20:13-20:44: @12[6]: _10 = const ()
18:27-21:10: @12[8]: _6 = const ()"> }<span class="annotation">⦉@6,8,9,10,11,12</span></span></span><span class="code" style="--layer: 0"> else if </span><span><span class="code even" style="--layer: 1" title="21:19-21:28: @7[2]: _28 = _1
21:19-21:32: @7[3]: _27 = Lt(move _28, const 5_i32)
21:19-21:32: @7[5]: FakeRead(ForMatchedPlace, _27)"><span class="annotation">@7⦊</span>countdown &lt; 5<span class="annotation">⦉@7</span></span></span><span class="code" style="--layer: 0"> </span><span><span class="code odd" style="--layer: 1" title="22:26-22:43: @15.Call: _29 = might_overflow(const 1_u32) -&gt; [return: bb16, unwind: bb23]
22:17-22:23: @16[0]: FakeRead(ForLet, _29)
23:22-23:34: @16[7]: _50 = const main::promoted[0]
23:22-23:34: @16[8]: _35 = &amp;(*_50)
23:22-23:34: @16[9]: _34 = &amp;(*_35)
23:22-23:34: @16[10]: _33 = move _34 as &amp;[&amp;str] (Pointer(Unsize))
23:36-23:42: @16[18]: _42 = &amp;_29
23:13-23:44: @16[19]: _41 = (move _42,)
23:13-23:44: @16[21]: FakeRead(ForMatchedPlace, _41)
23:13-23:44: @16[23]: _43 = (_41.0: &amp;u32)
23:13-23:44: @16[26]: _45 = &amp;(*_43)
23:13-23:44: @16[28]: _46 = &lt;u32 as std::fmt::Display&gt;::fmt as for&lt;&#39;r, &#39;s, &#39;t0&gt; fn(&amp;&#39;r u32, &amp;&#39;s mut std::fmt::Formatter&lt;&#39;t0&gt;) -&gt; std::result::Result&lt;(), std::fmt::Error&gt; (Pointer(ReifyFnPointer))
23:13-23:44: @16.Call: _44 = ArgumentV1::new::&lt;u32&gt;(move _45, move _46) -&gt; [return: bb17, unwind: bb23]
23:13-23:44: @17[2]: _40 = [move _44]
23:13-23:44: @17[5]: _39 = &amp;_40
23:13-23:44: @17[6]: _38 = &amp;(*_39)
23:13-23:44: @17[7]: _37 = move _38 as &amp;[std::fmt::ArgumentV1] (Pointer(Unsize))
23:13-23:44: @17.Call: _32 = Arguments::new_v1(move _33, move _37) -&gt; [return: bb18, unwind: bb23]
23:13-23:44: @18.Call: _31 = _print(move _32) -&gt; [return: bb19, unwind: bb23]
23:13-23:44: @19[6]: _30 = const ()
21:33-24:10: @19[8]: _6 = const ()"><span class="annotation">@13,15,16,17,18,19⦊</span>{</span></span>
<span class="line"><span class="code odd" style="--layer: 1" title="22:26-22:43: @15.Call: _29 = might_overflow(const 1_u32) -&gt; [return: bb16, unwind: bb23]
22:17-22:23: @16[0]: FakeRead(ForLet, _29)
23:22-23:34: @16[7]: _50 = const main::promoted[0]
23:22-23:34: @16[8]: _35 = &amp;(*_50)
23:22-23:34: @16[9]: _34 = &amp;(*_35)
23:22-23:34: @16[10]: _33 = move _34 as &amp;[&amp;str] (Pointer(Unsize))
23:36-23:42: @16[18]: _42 = &amp;_29
23:13-23:44: @16[19]: _41 = (move _42,)
23:13-23:44: @16[21]: FakeRead(ForMatchedPlace, _41)
23:13-23:44: @16[23]: _43 = (_41.0: &amp;u32)
23:13-23:44: @16[26]: _45 = &amp;(*_43)
23:13-23:44: @16[28]: _46 = &lt;u32 as std::fmt::Display&gt;::fmt as for&lt;&#39;r, &#39;s, &#39;t0&gt; fn(&amp;&#39;r u32, &amp;&#39;s mut std::fmt::Formatter&lt;&#39;t0&gt;) -&gt; std::result::Result&lt;(), std::fmt::Error&gt; (Pointer(ReifyFnPointer))
23:13-23:44: @16.Call: _44 = ArgumentV1::new::&lt;u32&gt;(move _45, move _46) -&gt; [return: bb17, unwind: bb23]
23:13-23:44: @17[2]: _40 = [move _44]
23:13-23:44: @17[5]: _39 = &amp;_40
23:13-23:44: @17[6]: _38 = &amp;(*_39)
23:13-23:44: @17[7]: _37 = move _38 as &amp;[std::fmt::ArgumentV1] (Pointer(Unsize))
23:13-23:44: @17.Call: _32 = Arguments::new_v1(move _33, move _37) -&gt; [return: bb18, unwind: bb23]
23:13-23:44: @18.Call: _31 = _print(move _32) -&gt; [return: bb19, unwind: bb23]
23:13-23:44: @19[6]: _30 = const ()
21:33-24:10: @19[8]: _6 = const ()"> let result = might_overflow(1);</span></span>
<span class="line"><span class="code odd" style="--layer: 1" title="22:26-22:43: @15.Call: _29 = might_overflow(const 1_u32) -&gt; [return: bb16, unwind: bb23]
22:17-22:23: @16[0]: FakeRead(ForLet, _29)
23:22-23:34: @16[7]: _50 = const main::promoted[0]
23:22-23:34: @16[8]: _35 = &amp;(*_50)
23:22-23:34: @16[9]: _34 = &amp;(*_35)
23:22-23:34: @16[10]: _33 = move _34 as &amp;[&amp;str] (Pointer(Unsize))
23:36-23:42: @16[18]: _42 = &amp;_29
23:13-23:44: @16[19]: _41 = (move _42,)
23:13-23:44: @16[21]: FakeRead(ForMatchedPlace, _41)
23:13-23:44: @16[23]: _43 = (_41.0: &amp;u32)
23:13-23:44: @16[26]: _45 = &amp;(*_43)
23:13-23:44: @16[28]: _46 = &lt;u32 as std::fmt::Display&gt;::fmt as for&lt;&#39;r, &#39;s, &#39;t0&gt; fn(&amp;&#39;r u32, &amp;&#39;s mut std::fmt::Formatter&lt;&#39;t0&gt;) -&gt; std::result::Result&lt;(), std::fmt::Error&gt; (Pointer(ReifyFnPointer))
23:13-23:44: @16.Call: _44 = ArgumentV1::new::&lt;u32&gt;(move _45, move _46) -&gt; [return: bb17, unwind: bb23]
23:13-23:44: @17[2]: _40 = [move _44]
23:13-23:44: @17[5]: _39 = &amp;_40
23:13-23:44: @17[6]: _38 = &amp;(*_39)
23:13-23:44: @17[7]: _37 = move _38 as &amp;[std::fmt::ArgumentV1] (Pointer(Unsize))
23:13-23:44: @17.Call: _32 = Arguments::new_v1(move _33, move _37) -&gt; [return: bb18, unwind: bb23]
23:13-23:44: @18.Call: _31 = _print(move _32) -&gt; [return: bb19, unwind: bb23]
23:13-23:44: @19[6]: _30 = const ()
21:33-24:10: @19[8]: _6 = const ()"> println!("Result: {}", result);</span></span>
<span class="line"><span class="code odd" style="--layer: 1" title="22:26-22:43: @15.Call: _29 = might_overflow(const 1_u32) -&gt; [return: bb16, unwind: bb23]
22:17-22:23: @16[0]: FakeRead(ForLet, _29)
23:22-23:34: @16[7]: _50 = const main::promoted[0]
23:22-23:34: @16[8]: _35 = &amp;(*_50)
23:22-23:34: @16[9]: _34 = &amp;(*_35)
23:22-23:34: @16[10]: _33 = move _34 as &amp;[&amp;str] (Pointer(Unsize))
23:36-23:42: @16[18]: _42 = &amp;_29
23:13-23:44: @16[19]: _41 = (move _42,)
23:13-23:44: @16[21]: FakeRead(ForMatchedPlace, _41)
23:13-23:44: @16[23]: _43 = (_41.0: &amp;u32)
23:13-23:44: @16[26]: _45 = &amp;(*_43)
23:13-23:44: @16[28]: _46 = &lt;u32 as std::fmt::Display&gt;::fmt as for&lt;&#39;r, &#39;s, &#39;t0&gt; fn(&amp;&#39;r u32, &amp;&#39;s mut std::fmt::Formatter&lt;&#39;t0&gt;) -&gt; std::result::Result&lt;(), std::fmt::Error&gt; (Pointer(ReifyFnPointer))
23:13-23:44: @16.Call: _44 = ArgumentV1::new::&lt;u32&gt;(move _45, move _46) -&gt; [return: bb17, unwind: bb23]
23:13-23:44: @17[2]: _40 = [move _44]
23:13-23:44: @17[5]: _39 = &amp;_40
23:13-23:44: @17[6]: _38 = &amp;(*_39)
23:13-23:44: @17[7]: _37 = move _38 as &amp;[std::fmt::ArgumentV1] (Pointer(Unsize))
23:13-23:44: @17.Call: _32 = Arguments::new_v1(move _33, move _37) -&gt; [return: bb18, unwind: bb23]
23:13-23:44: @18.Call: _31 = _print(move _32) -&gt; [return: bb19, unwind: bb23]
23:13-23:44: @19[6]: _30 = const ()
21:33-24:10: @19[8]: _6 = const ()"> }<span class="annotation">⦉@13,15,16,17,18,19</span></span></span><span><span class="code even" style="--layer: 1" title="24:10-24:10: @14[0]: _6 = const ()"><span class="annotation">@14⦊</span><span class="annotation">⦉@14</span></span></span><span class="code" style="--layer: 0"></span></span>
<span class="line"><span class="code" style="--layer: 0"> </span><span><span class="code odd" style="--layer: 1" title="25:9-25:23: @21[2]: _47 = CheckedSub(_1, const 1_i32)
25:9-25:23: @22[0]: _1 = move (_47.0: i32)"><span class="annotation">@21,22⦊</span>countdown -= 1<span class="annotation">⦉@21,22</span></span></span><span class="code" style="--layer: 0">;</span></span>
<span class="line"><span class="code" style="--layer: 0"> }</span></span>
<span class="line"><span class="code" style="--layer: 0"> </span><span><span class="code even" style="--layer: 1" title="27:8-27:10: @4[4]: _49 = ()
27:5-27:11: @4[5]: _0 = std::result::Result::&lt;(), u8&gt;::Ok(move _49)
28:2-28:2: @4.Return: return"><span class="annotation">@4⦊</span>Ok(())</span></span>
<span class="line"><span class="code even" style="--layer: 1" title="27:8-27:10: @4[4]: _49 = ()
27:5-27:11: @4[5]: _0 = std::result::Result::&lt;(), u8&gt;::Ok(move _49)
28:2-28:2: @4.Return: return">}<span class="annotation">⦉@4</span></span></span></span></div>
</body>
</html>