4 Preview this file as rendered HTML from the github source at:
5 https://htmlpreview.github.io/?https://github.com/rust-lang/rust/blob/master/src/test/run-make-fulldeps/coverage-spanview/expected_mir_dump.used_crate/used_crate.used_function.-------.InstrumentCoverage.0.html
7 For revisions in Pull Requests (PR):
8 * Replace "rust-lang" with the github PR author
9 * Replace "master" with the PR branch name
14 <title>used_crate.used_function - Coverage Spans
</title>
17 counter-increment: line;
20 content: counter(line)
": ";
21 font-family: Menlo, Monaco, monospace;
24 display: inline-block;
27 -webkit-user-select: none;
31 background-color: #
222222;
32 font-family: Menlo, Monaco, monospace;
34 border-bottom:
2px solid #
222222;
36 display: inline-block;
39 background-color: #
55bbff;
43 background-color: #ee7756;
47 --index: calc(var(--layer) -
1);
48 padding-top: calc(var(--index) *
0.15em);
50 hue-rotate(calc(var(--index) *
25deg))
51 saturate(calc(
100% - (var(--index) *
2%)))
52 brightness(calc(
100% - (var(--index) *
1.5%)));
56 font-family: monospace;
59 -webkit-user-select: none;
61 body:active .annotation {
62 /* requires holding mouse down anywhere on the page */
63 display: inline-block;
65 span:hover .annotation {
66 /* requires hover over a span ONLY on its first line */
67 display: inline-block;
72 <div class=
"code" style=
"counter-reset: line 4"><span class=
"line"><span><span class=
"code even" style=
"--layer: 1"><span class=
"annotation">@
0,
1,
2,
3⦊
</span>pub fn used_function()
<span class=
"annotation">⦉@
0,
1,
2,
3</span></span></span><span class=
"code" style=
"--layer: 0">{
</span></span>
73 <span class=
"line"><span class=
"code" style=
"--layer: 0"> // Initialize test constants in a way that cannot be determined at compile time, to ensure
</span></span>
74 <span class=
"line"><span class=
"code" style=
"--layer: 0"> // rustc and LLVM cannot optimize out statements (or coverage counters) downstream from
</span></span>
75 <span class=
"line"><span class=
"code" style=
"--layer: 0"> // dependent conditions.
</span></span>
76 <span class=
"line"><span class=
"code" style=
"--layer: 0"> let
</span><span><span class=
"code even" style=
"--layer: 1" title=
"9:19-9:35: @0.Call: _4 = args() -> [return: bb1, unwind: bb10]
77 9:19-9:35: @1[0]: _3 = &_4
78 9:19-9:41: @1.Call: _2 = <Args as ExactSizeIterator>::len(move _3) -> [return: bb2, unwind: bb9]
79 9:19-9:46: @2[1]: _1 = Eq(move _2, const 1_usize)
80 9:9-9:16: @2[3]: FakeRead(ForLet, _1)
81 10:25-10:26: @3[2]: _5 = const 0_i32
82 10:9-10:22: @3[3]: FakeRead(ForLet, _5)
83 11:8-11:15: @3[6]: _7 = _1
84 11:8-11:15: @3[7]: FakeRead(ForMatchedPlace, _7)"><span class=
"annotation">@
0,
1,
2,
3⦊
</span>is_true = std::env::args().len() ==
1;
</span></span>
85 <span class=
"line"><span class=
"code even" style=
"--layer: 1" title=
"9:19-9:35: @0.Call: _4 = args() -> [return: bb1, unwind: bb10]
86 9:19-9:35: @1[0]: _3 = &_4
87 9:19-9:41: @1.Call: _2 = <Args as ExactSizeIterator>::len(move _3) -> [return: bb2, unwind: bb9]
88 9:19-9:46: @2[1]: _1 = Eq(move _2, const 1_usize)
89 9:9-9:16: @2[3]: FakeRead(ForLet, _1)
90 10:25-10:26: @3[2]: _5 = const 0_i32
91 10:9-10:22: @3[3]: FakeRead(ForLet, _5)
92 11:8-11:15: @3[6]: _7 = _1
93 11:8-11:15: @3[7]: FakeRead(ForMatchedPlace, _7)"> let mut countdown =
0;
</span></span>
94 <span class=
"line"><span class=
"code even" style=
"--layer: 1" title=
"9:19-9:35: @0.Call: _4 = args() -> [return: bb1, unwind: bb10]
95 9:19-9:35: @1[0]: _3 = &_4
96 9:19-9:41: @1.Call: _2 = <Args as ExactSizeIterator>::len(move _3) -> [return: bb2, unwind: bb9]
97 9:19-9:46: @2[1]: _1 = Eq(move _2, const 1_usize)
98 9:9-9:16: @2[3]: FakeRead(ForLet, _1)
99 10:25-10:26: @3[2]: _5 = const 0_i32
100 10:9-10:22: @3[3]: FakeRead(ForLet, _5)
101 11:8-11:15: @3[6]: _7 = _1
102 11:8-11:15: @3[7]: FakeRead(ForMatchedPlace, _7)"> if is_true
<span class=
"annotation">⦉@
0,
1,
2,
3</span></span></span><span class=
"code" style=
"--layer: 0"> </span><span><span class=
"code odd" style=
"--layer: 1" title=
"12:9-12:23: @6[0]: _5 = const 10_i32
103 11:16-13:6: @6[1]: _6 = const ()"><span class=
"annotation">@
4,
6⦊
</span>{
</span></span>
104 <span class=
"line"><span class=
"code odd" style=
"--layer: 1" title=
"12:9-12:23: @6[0]: _5 = const 10_i32
105 11:16-13:6: @6[1]: _6 = const ()"> countdown =
10;
</span></span>
106 <span class=
"line"><span class=
"code odd" style=
"--layer: 1" title=
"12:9-12:23: @6[0]: _5 = const 10_i32
107 11:16-13:6: @6[1]: _6 = const ()"> }
<span class=
"annotation">⦉@
4,
6</span></span></span><span><span class=
"code even" style=
"--layer: 1" title=
"13:6-13:6: @5[0]: _6 = const ()"><span class=
"annotation">@
5⦊
</span>‸
<span class=
"annotation">⦉@
5</span></span></span><span class=
"code" style=
"--layer: 0"></span></span>
108 <span class=
"line"><span class=
"code" style=
"--layer: 0"> </span><span><span class=
"code odd" style=
"--layer: 1" title=
"14:5-14:25: @7.Call: _8 = use_this_lib_crate() -> [return: bb8, unwind: bb10]
109 15:2-15:2: @8.Return: return"><span class=
"annotation">@
7,
8⦊
</span>use_this_lib_crate();
</span></span>
110 <span class=
"line"><span class=
"code odd" style=
"--layer: 1" title=
"14:5-14:25: @7.Call: _8 = use_this_lib_crate() -> [return: bb8, unwind: bb10]
111 15:2-15:2: @8.Return: return">}
<span class=
"annotation">⦉@
7,
8</span></span></span></span></div>