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.dead_code/dead_code.main.-------.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>dead_code.main - 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 26"><span class=
"line"><span><span class=
"code even" style=
"--layer: 1" title=
"31:19-31:35: @0.Call: _4 = std::env::args() -> [return: bb1, unwind: bb8]
73 31:19-31:35: @1[0]: _3 = &_4
74 31:19-31:41: @1.Call: _2 = <std::env::Args as std::iter::ExactSizeIterator>::len(move _3) -> [return: bb2, unwind: bb7]
75 31:19-31:46: @2[1]: _1 = Eq(move _2, const 1_usize)
76 31:9-31:16: @2[3]: FakeRead(ForLet, _1)
77 33:25-33:26: @3[2]: _5 = const 0_i32
78 33:9-33:22: @3[3]: FakeRead(ForLet, _5)
79 34:8-34:15: @3[5]: _6 = _1"><span class=
"annotation">@
0,
1,
2,
3⦊
</span>fn main() {
</span></span>
80 <span class=
"line"><span class=
"code even" style=
"--layer: 1" title=
"31:19-31:35: @0.Call: _4 = std::env::args() -> [return: bb1, unwind: bb8]
81 31:19-31:35: @1[0]: _3 = &_4
82 31:19-31:41: @1.Call: _2 = <std::env::Args as std::iter::ExactSizeIterator>::len(move _3) -> [return: bb2, unwind: bb7]
83 31:19-31:46: @2[1]: _1 = Eq(move _2, const 1_usize)
84 31:9-31:16: @2[3]: FakeRead(ForLet, _1)
85 33:25-33:26: @3[2]: _5 = const 0_i32
86 33:9-33:22: @3[3]: FakeRead(ForLet, _5)
87 34:8-34:15: @3[5]: _6 = _1"> // Initialize test constants in a way that cannot be determined at compile time, to ensure
</span></span>
88 <span class=
"line"><span class=
"code even" style=
"--layer: 1" title=
"31:19-31:35: @0.Call: _4 = std::env::args() -> [return: bb1, unwind: bb8]
89 31:19-31:35: @1[0]: _3 = &_4
90 31:19-31:41: @1.Call: _2 = <std::env::Args as std::iter::ExactSizeIterator>::len(move _3) -> [return: bb2, unwind: bb7]
91 31:19-31:46: @2[1]: _1 = Eq(move _2, const 1_usize)
92 31:9-31:16: @2[3]: FakeRead(ForLet, _1)
93 33:25-33:26: @3[2]: _5 = const 0_i32
94 33:9-33:22: @3[3]: FakeRead(ForLet, _5)
95 34:8-34:15: @3[5]: _6 = _1"> // rustc and LLVM cannot optimize out statements (or coverage counters) downstream from
</span></span>
96 <span class=
"line"><span class=
"code even" style=
"--layer: 1" title=
"31:19-31:35: @0.Call: _4 = std::env::args() -> [return: bb1, unwind: bb8]
97 31:19-31:35: @1[0]: _3 = &_4
98 31:19-31:41: @1.Call: _2 = <std::env::Args as std::iter::ExactSizeIterator>::len(move _3) -> [return: bb2, unwind: bb7]
99 31:19-31:46: @2[1]: _1 = Eq(move _2, const 1_usize)
100 31:9-31:16: @2[3]: FakeRead(ForLet, _1)
101 33:25-33:26: @3[2]: _5 = const 0_i32
102 33:9-33:22: @3[3]: FakeRead(ForLet, _5)
103 34:8-34:15: @3[5]: _6 = _1"> // dependent conditions.
</span></span>
104 <span class=
"line"><span class=
"code even" style=
"--layer: 1" title=
"31:19-31:35: @0.Call: _4 = std::env::args() -> [return: bb1, unwind: bb8]
105 31:19-31:35: @1[0]: _3 = &_4
106 31:19-31:41: @1.Call: _2 = <std::env::Args as std::iter::ExactSizeIterator>::len(move _3) -> [return: bb2, unwind: bb7]
107 31:19-31:46: @2[1]: _1 = Eq(move _2, const 1_usize)
108 31:9-31:16: @2[3]: FakeRead(ForLet, _1)
109 33:25-33:26: @3[2]: _5 = const 0_i32
110 33:9-33:22: @3[3]: FakeRead(ForLet, _5)
111 34:8-34:15: @3[5]: _6 = _1"> let is_true = std::env::args().len() ==
1;
</span></span>
112 <span class=
"line"><span class=
"code even" style=
"--layer: 1" title=
"31:19-31:35: @0.Call: _4 = std::env::args() -> [return: bb1, unwind: bb8]
113 31:19-31:35: @1[0]: _3 = &_4
114 31:19-31:41: @1.Call: _2 = <std::env::Args as std::iter::ExactSizeIterator>::len(move _3) -> [return: bb2, unwind: bb7]
115 31:19-31:46: @2[1]: _1 = Eq(move _2, const 1_usize)
116 31:9-31:16: @2[3]: FakeRead(ForLet, _1)
117 33:25-33:26: @3[2]: _5 = const 0_i32
118 33:9-33:22: @3[3]: FakeRead(ForLet, _5)
119 34:8-34:15: @3[5]: _6 = _1"></span></span>
120 <span class=
"line"><span class=
"code even" style=
"--layer: 1" title=
"31:19-31:35: @0.Call: _4 = std::env::args() -> [return: bb1, unwind: bb8]
121 31:19-31:35: @1[0]: _3 = &_4
122 31:19-31:41: @1.Call: _2 = <std::env::Args as std::iter::ExactSizeIterator>::len(move _3) -> [return: bb2, unwind: bb7]
123 31:19-31:46: @2[1]: _1 = Eq(move _2, const 1_usize)
124 31:9-31:16: @2[3]: FakeRead(ForLet, _1)
125 33:25-33:26: @3[2]: _5 = const 0_i32
126 33:9-33:22: @3[3]: FakeRead(ForLet, _5)
127 34:8-34:15: @3[5]: _6 = _1"> let mut countdown =
0;
</span></span>
128 <span class=
"line"><span class=
"code even" style=
"--layer: 1" title=
"31:19-31:35: @0.Call: _4 = std::env::args() -> [return: bb1, unwind: bb8]
129 31:19-31:35: @1[0]: _3 = &_4
130 31:19-31:41: @1.Call: _2 = <std::env::Args as std::iter::ExactSizeIterator>::len(move _3) -> [return: bb2, unwind: bb7]
131 31:19-31:46: @2[1]: _1 = Eq(move _2, const 1_usize)
132 31:9-31:16: @2[3]: FakeRead(ForLet, _1)
133 33:25-33:26: @3[2]: _5 = const 0_i32
134 33:9-33:22: @3[3]: FakeRead(ForLet, _5)
135 34:8-34:15: @3[5]: _6 = _1"> 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=
"35:9-35:23: @4[0]: _5 = const 10_i32
136 34:16-36:6: @4[1]: _0 = const ()"><span class=
"annotation">@
4⦊
</span>{
</span></span>
137 <span class=
"line"><span class=
"code odd" style=
"--layer: 1" title=
"35:9-35:23: @4[0]: _5 = const 10_i32
138 34:16-36:6: @4[1]: _0 = const ()"> countdown =
10;
</span></span>
139 <span class=
"line"><span class=
"code odd" style=
"--layer: 1" title=
"35:9-35:23: @4[0]: _5 = const 10_i32
140 34:16-36:6: @4[1]: _0 = const ()"> }
<span class=
"annotation">⦉@
4</span></span></span><span><span class=
"code even" style=
"--layer: 1" title=
"36:6-36:6: @5[0]: _0 = const ()"><span class=
"annotation">@
5⦊
</span>‸
<span class=
"annotation">⦉@
5</span></span></span><span class=
"code" style=
"--layer: 0"></span></span>
141 <span class=
"line"><span class=
"code" style=
"--layer: 0">}
</span><span><span class=
"code odd" style=
"--layer: 1" title=
"37:2-37:2: @6.Return: return"><span class=
"annotation">@
6⦊
</span>‸
<span class=
"annotation">⦉@
6</span></span></span></span></div>