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-base/expected_mir_dump.generics/generics.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>generics.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 21"><span class=
"line"><span class=
"code" style=
"--layer: 0">fn main() -
> Result
<(),u8
> {
</span></span>
73 <span class=
"line"><span class=
"code" style=
"--layer: 0"> let
</span><span><span class=
"code even" style=
"--layer: 1" title=
"23:27-23:51: @0[1]: _1 = Firework::<i32> { strength: const 1_i32 }
74 23:9-23:24: @0[2]: FakeRead(ForLet, _1)
75 24:5-24:16: @0[5]: _3 = &mut _1
76 24:5-24:32: @0.Call: _2 = Firework::<i32>::set_strength(move _3, const 2_i32) -> [return: bb1, unwind: bb16]
77 26:19-26:47: @1[3]: _4 = Firework::<f64> { strength: const 100.09999999999999f64 }
78 26:9-26:16: @1[4]: FakeRead(ForLet, _4)
79 27:5-27:8: @1[7]: _6 = &mut _4
80 27:5-27:28: @1.Call: _5 = Firework::<f64>::set_strength(move _6, const 200.09999999999999f64) -> [return: bb2, unwind: bb15]
81 28:5-28:8: @2[4]: _8 = &mut _4
82 28:5-28:28: @2.Call: _7 = Firework::<f64>::set_strength(move _8, const 300.30000000000001f64) -> [return: bb3, unwind: bb15]"><span class=
"annotation">@
0,
1,
2,
3⦊
</span>mut firecracker = Firework { strength:
1 };
</span></span>
83 <span class=
"line"><span class=
"code even" style=
"--layer: 1" title=
"23:27-23:51: @0[1]: _1 = Firework::<i32> { strength: const 1_i32 }
84 23:9-23:24: @0[2]: FakeRead(ForLet, _1)
85 24:5-24:16: @0[5]: _3 = &mut _1
86 24:5-24:32: @0.Call: _2 = Firework::<i32>::set_strength(move _3, const 2_i32) -> [return: bb1, unwind: bb16]
87 26:19-26:47: @1[3]: _4 = Firework::<f64> { strength: const 100.09999999999999f64 }
88 26:9-26:16: @1[4]: FakeRead(ForLet, _4)
89 27:5-27:8: @1[7]: _6 = &mut _4
90 27:5-27:28: @1.Call: _5 = Firework::<f64>::set_strength(move _6, const 200.09999999999999f64) -> [return: bb2, unwind: bb15]
91 28:5-28:8: @2[4]: _8 = &mut _4
92 28:5-28:28: @2.Call: _7 = Firework::<f64>::set_strength(move _8, const 300.30000000000001f64) -> [return: bb3, unwind: bb15]"> firecracker.set_strength(
2);
</span></span>
93 <span class=
"line"><span class=
"code even" style=
"--layer: 1" title=
"23:27-23:51: @0[1]: _1 = Firework::<i32> { strength: const 1_i32 }
94 23:9-23:24: @0[2]: FakeRead(ForLet, _1)
95 24:5-24:16: @0[5]: _3 = &mut _1
96 24:5-24:32: @0.Call: _2 = Firework::<i32>::set_strength(move _3, const 2_i32) -> [return: bb1, unwind: bb16]
97 26:19-26:47: @1[3]: _4 = Firework::<f64> { strength: const 100.09999999999999f64 }
98 26:9-26:16: @1[4]: FakeRead(ForLet, _4)
99 27:5-27:8: @1[7]: _6 = &mut _4
100 27:5-27:28: @1.Call: _5 = Firework::<f64>::set_strength(move _6, const 200.09999999999999f64) -> [return: bb2, unwind: bb15]
101 28:5-28:8: @2[4]: _8 = &mut _4
102 28:5-28:28: @2.Call: _7 = Firework::<f64>::set_strength(move _8, const 300.30000000000001f64) -> [return: bb3, unwind: bb15]"></span></span>
103 <span class=
"line"><span class=
"code even" style=
"--layer: 1" title=
"23:27-23:51: @0[1]: _1 = Firework::<i32> { strength: const 1_i32 }
104 23:9-23:24: @0[2]: FakeRead(ForLet, _1)
105 24:5-24:16: @0[5]: _3 = &mut _1
106 24:5-24:32: @0.Call: _2 = Firework::<i32>::set_strength(move _3, const 2_i32) -> [return: bb1, unwind: bb16]
107 26:19-26:47: @1[3]: _4 = Firework::<f64> { strength: const 100.09999999999999f64 }
108 26:9-26:16: @1[4]: FakeRead(ForLet, _4)
109 27:5-27:8: @1[7]: _6 = &mut _4
110 27:5-27:28: @1.Call: _5 = Firework::<f64>::set_strength(move _6, const 200.09999999999999f64) -> [return: bb2, unwind: bb15]
111 28:5-28:8: @2[4]: _8 = &mut _4
112 28:5-28:28: @2.Call: _7 = Firework::<f64>::set_strength(move _8, const 300.30000000000001f64) -> [return: bb3, unwind: bb15]"> let mut tnt = Firework { strength:
100.1 };
</span></span>
113 <span class=
"line"><span class=
"code even" style=
"--layer: 1" title=
"23:27-23:51: @0[1]: _1 = Firework::<i32> { strength: const 1_i32 }
114 23:9-23:24: @0[2]: FakeRead(ForLet, _1)
115 24:5-24:16: @0[5]: _3 = &mut _1
116 24:5-24:32: @0.Call: _2 = Firework::<i32>::set_strength(move _3, const 2_i32) -> [return: bb1, unwind: bb16]
117 26:19-26:47: @1[3]: _4 = Firework::<f64> { strength: const 100.09999999999999f64 }
118 26:9-26:16: @1[4]: FakeRead(ForLet, _4)
119 27:5-27:8: @1[7]: _6 = &mut _4
120 27:5-27:28: @1.Call: _5 = Firework::<f64>::set_strength(move _6, const 200.09999999999999f64) -> [return: bb2, unwind: bb15]
121 28:5-28:8: @2[4]: _8 = &mut _4
122 28:5-28:28: @2.Call: _7 = Firework::<f64>::set_strength(move _8, const 300.30000000000001f64) -> [return: bb3, unwind: bb15]"> tnt.set_strength(
200.1);
</span></span>
123 <span class=
"line"><span class=
"code even" style=
"--layer: 1" title=
"23:27-23:51: @0[1]: _1 = Firework::<i32> { strength: const 1_i32 }
124 23:9-23:24: @0[2]: FakeRead(ForLet, _1)
125 24:5-24:16: @0[5]: _3 = &mut _1
126 24:5-24:32: @0.Call: _2 = Firework::<i32>::set_strength(move _3, const 2_i32) -> [return: bb1, unwind: bb16]
127 26:19-26:47: @1[3]: _4 = Firework::<f64> { strength: const 100.09999999999999f64 }
128 26:9-26:16: @1[4]: FakeRead(ForLet, _4)
129 27:5-27:8: @1[7]: _6 = &mut _4
130 27:5-27:28: @1.Call: _5 = Firework::<f64>::set_strength(move _6, const 200.09999999999999f64) -> [return: bb2, unwind: bb15]
131 28:5-28:8: @2[4]: _8 = &mut _4
132 28:5-28:28: @2.Call: _7 = Firework::<f64>::set_strength(move _8, const 300.30000000000001f64) -> [return: bb3, unwind: bb15]"> tnt.set_strength(
300.3)
<span class=
"annotation">⦉@
0,
1,
2,
3</span></span></span><span class=
"code" style=
"--layer: 0">;
</span></span>
133 <span class=
"line"><span class=
"code" style=
"--layer: 0"></span></span>
134 <span class=
"line"><span class=
"code" style=
"--layer: 0"> if
</span><span><span class=
"code even" style=
"--layer: 1" title=
"30:8-30:12: @3[4]: _10 = const true
135 30:8-30:12: @3[5]: FakeRead(ForMatchedPlace, _10)"><span class=
"annotation">@
0,
1,
2,
3⦊
</span>true
<span class=
"annotation">⦉@
0,
1,
2,
3</span></span></span><span class=
"code" style=
"--layer: 0"> {
</span></span>
136 <span class=
"line"><span class=
"code" style=
"--layer: 0"> </span><span><span class=
"code odd" style=
"--layer: 1" title=
"31:18-31:41: @6[6]: _27 = const main::promoted[1]
137 31:18-31:41: @6[7]: _17 = &(*_27)
138 31:18-31:41: @6[8]: _16 = &(*_17)
139 31:18-31:41: @6[9]: _15 = move _16 as &[&str] (Pointer(Unsize))
140 31:9-31:43: @6[15]: _23 = ()
141 31:9-31:43: @6[16]: FakeRead(ForMatchedPlace, _23)
142 31:9-31:43: @6[17]: _26 = const main::promoted[0]
143 31:9-31:43: @6[18]: _21 = &(*_26)
144 31:9-31:43: @6[19]: _20 = &(*_21)
145 31:9-31:43: @6[20]: _19 = move _20 as &[std::fmt::ArgumentV1] (Pointer(Unsize))
146 31:9-31:43: @6.Call: _14 = Arguments::new_v1(move _15, move _19) -> [return: bb7, unwind: bb15]
147 31:9-31:43: @7.Call: _13 = _print(move _14) -> [return: bb8, unwind: bb15]
148 31:9-31:43: @8[5]: _12 = const ()
149 32:16-32:22: @8[7]: _0 = std::result::Result::<(), u8>::Err(const 1_u8)"><span class=
"annotation">@
4,
6,
7,
8,
12,
13⦊
</span>println!(
"Exiting with error...");
</span></span>
150 <span class=
"line"><span class=
"code odd" style=
"--layer: 1" title=
"31:18-31:41: @6[6]: _27 = const main::promoted[1]
151 31:18-31:41: @6[7]: _17 = &(*_27)
152 31:18-31:41: @6[8]: _16 = &(*_17)
153 31:18-31:41: @6[9]: _15 = move _16 as &[&str] (Pointer(Unsize))
154 31:9-31:43: @6[15]: _23 = ()
155 31:9-31:43: @6[16]: FakeRead(ForMatchedPlace, _23)
156 31:9-31:43: @6[17]: _26 = const main::promoted[0]
157 31:9-31:43: @6[18]: _21 = &(*_26)
158 31:9-31:43: @6[19]: _20 = &(*_21)
159 31:9-31:43: @6[20]: _19 = move _20 as &[std::fmt::ArgumentV1] (Pointer(Unsize))
160 31:9-31:43: @6.Call: _14 = Arguments::new_v1(move _15, move _19) -> [return: bb7, unwind: bb15]
161 31:9-31:43: @7.Call: _13 = _print(move _14) -> [return: bb8, unwind: bb15]
162 31:9-31:43: @8[5]: _12 = const ()
163 32:16-32:22: @8[7]: _0 = std::result::Result::<(), u8>::Err(const 1_u8)"> return Err(
1)
<span class=
"annotation">⦉@
4,
6,
7,
8,
12,
13</span></span></span><span class=
"code" style=
"--layer: 0">;
</span></span>
164 <span class=
"line"><span class=
"code" style=
"--layer: 0"> }
</span></span>
165 <span class=
"line"><span class=
"code" style=
"--layer: 0"></span></span>
166 <span class=
"line"><span class=
"code" style=
"--layer: 0"> let _ =
</span><span><span class=
"code even" style=
"--layer: 1" title=
"35:13-35:40: @5[4]: _24 = Firework::<i32> { strength: const 1000_i32 }
167 37:8-37:10: @9[2]: _25 = ()
168 37:5-37:11: @9[3]: _0 = std::result::Result::<(), u8>::Ok(move _25)"><span class=
"annotation">@
5,
9,
10,
11⦊
</span>Firework { strength:
1000 };
</span></span>
169 <span class=
"line"><span class=
"code even" style=
"--layer: 1" title=
"35:13-35:40: @5[4]: _24 = Firework::<i32> { strength: const 1000_i32 }
170 37:8-37:10: @9[2]: _25 = ()
171 37:5-37:11: @9[3]: _0 = std::result::Result::<(), u8>::Ok(move _25)"></span></span>
172 <span class=
"line"><span class=
"code even" style=
"--layer: 1" title=
"35:13-35:40: @5[4]: _24 = Firework::<i32> { strength: const 1000_i32 }
173 37:8-37:10: @9[2]: _25 = ()
174 37:5-37:11: @9[3]: _0 = std::result::Result::<(), u8>::Ok(move _25)"> Ok(())
<span class=
"annotation">⦉@
5,
9,
10,
11</span></span></span><span class=
"code" style=
"--layer: 0"></span></span>
175 <span class=
"line"><span class=
"code" style=
"--layer: 0">}
</span><span><span class=
"code odd" style=
"--layer: 1" title=
"38:2-38:2: @14.Return: return"><span class=
"annotation">@
14⦊
</span>‸
<span class=
"annotation">⦉@
14</span></span></span></span></div>