Renamed tests to avoid exceeding Windows max path limit

This commit is contained in:
Rich Kadel 2020-10-05 09:26:30 -07:00
parent f5aebad28f
commit 6f627663a7
126 changed files with 586 additions and 592 deletions

View File

@ -154,13 +154,7 @@ fn dump_matched_mir_node<'tcx, F>(
dump_file_basename(tcx, pass_num, pass_name, disambiguator, body.source);
let mut file = create_dump_file_with_basename(tcx, &file_basename, "html")?;
if body.source.def_id().is_local() {
write_mir_fn_spanview(
tcx,
body,
spanview,
&file_basename,
&mut file,
)?;
write_mir_fn_spanview(tcx, body, spanview, &file_basename, &mut file)?;
}
};
}

View File

@ -2,11 +2,11 @@
# ISSUE(76038): When targeting MSVC, Rust binaries built with both `-Z instrument-coverage` and
# `-C link-dead-code` typically crash (with a seg-fault) or at best generate an empty `*.profraw`.
# See ../instrument-coverage/coverage_tools.mk for more information.
# See ../coverage/coverage_tools.mk for more information.
-include ../instrument-coverage/coverage_tools.mk
-include ../coverage/coverage_tools.mk
BASEDIR=../instrument-coverage-llvm-ir-base
BASEDIR=../coverage-llvmir-base
ifeq ($(UNAME),Darwin)
INSTR_PROF_DATA_SUFFIX=,regular,live_support

View File

@ -4,8 +4,8 @@
# LINK_DEAD_CODE requires ignore-msvc due to Issue #76038
LINK_DEAD_CODE=yes
-include ../instrument-coverage-llvm-ir-base/Makefile
-include ../coverage-llvmir-base/Makefile
# ISSUE(76038): When targeting MSVC, Rust binaries built with both `-Z instrument-coverage` and
# `-C link-dead-code` typically crash (with a seg-fault) or at best generate an empty `*.profraw`.
# See ../instrument-coverage/coverage_tools.mk for more information.
# See ../coverage/coverage_tools.mk for more information.

View File

@ -6,12 +6,12 @@
# ISSUE(76038): When targeting MSVC, Rust binaries built with both `-Z instrument-coverage` and
# `-C link-dead-code` typically crash (with a seg-fault) or at best generate an empty `*.profraw`.
# See ../instrument-coverage/coverage_tools.mk for more information.
# See ../coverage/coverage_tools.mk for more information.
-include ../instrument-coverage/coverage_tools.mk
-include ../coverage/coverage_tools.mk
BASEDIR=../instrument-coverage-cov-reports-base
SOURCEDIR=../instrument-coverage
BASEDIR=../coverage-reports-base
SOURCEDIR=../coverage
all: $(patsubst $(SOURCEDIR)/%.rs,%,$(wildcard $(SOURCEDIR)/*.rs))

View File

@ -3,7 +3,7 @@
{
"files": [
{
"filename": "../instrument-coverage/closure.rs",
"filename": "../coverage/closure.rs",
"summary": {
"functions": {
"count": 5,

View File

@ -3,7 +3,7 @@
{
"files": [
{
"filename": "../instrument-coverage/drop_trait.rs",
"filename": "../coverage/drop_trait.rs",
"summary": {
"functions": {
"count": 2,

View File

@ -3,7 +3,7 @@
{
"files": [
{
"filename": "../instrument-coverage/generics.rs",
"filename": "../coverage/generics.rs",
"summary": {
"functions": {
"count": 3,

View File

@ -3,7 +3,7 @@
{
"files": [
{
"filename": "../instrument-coverage/if.rs",
"filename": "../coverage/if.rs",
"summary": {
"functions": {
"count": 1,

View File

@ -3,7 +3,7 @@
{
"files": [
{
"filename": "../instrument-coverage/if_else.rs",
"filename": "../coverage/if_else.rs",
"summary": {
"functions": {
"count": 1,

View File

@ -3,7 +3,7 @@
{
"files": [
{
"filename": "../instrument-coverage/inner_items.rs",
"filename": "../coverage/inner_items.rs",
"summary": {
"functions": {
"count": 4,

View File

@ -3,7 +3,7 @@
{
"files": [
{
"filename": "../instrument-coverage/lazy_boolean.rs",
"filename": "../coverage/lazy_boolean.rs",
"summary": {
"functions": {
"count": 1,

View File

@ -3,7 +3,7 @@
{
"files": [
{
"filename": "../instrument-coverage/loop_break_value.rs",
"filename": "../coverage/loop_break_value.rs",
"summary": {
"functions": {
"count": 1,

View File

@ -3,7 +3,7 @@
{
"files": [
{
"filename": "../instrument-coverage/simple_loop.rs",
"filename": "../coverage/simple_loop.rs",
"summary": {
"functions": {
"count": 1,

View File

@ -3,7 +3,7 @@
{
"files": [
{
"filename": "../instrument-coverage/simple_match.rs",
"filename": "../coverage/simple_match.rs",
"summary": {
"functions": {
"count": 1,

View File

@ -3,7 +3,7 @@
{
"files": [
{
"filename": "../instrument-coverage/question_mark_error_result.rs",
"filename": "../coverage/try_error_result.rs",
"summary": {
"functions": {
"count": 2,

View File

@ -3,7 +3,7 @@
{
"files": [
{
"filename": "../instrument-coverage/various_conditions.rs",
"filename": "../coverage/various_conditions.rs",
"summary": {
"functions": {
"count": 1,

View File

@ -3,7 +3,7 @@
{
"files": [
{
"filename": "../instrument-coverage/while_early_return.rs",
"filename": "../coverage/while_early_return.rs",
"summary": {
"functions": {
"count": 1,

View File

@ -11,46 +11,46 @@
11| 1| countdown = 10;
12| 1| }
13| |
14| | mod inner_mod {
15| | const INNER_MOD_CONST: u32 = 1000;
14| | mod in_mod {
15| | const IN_MOD_CONST: u32 = 1000;
16| | }
17| |
18| | fn inner_function(a: u32) {
18| | fn in_func(a: u32) {
19| 3| let b = 1;
20| 3| let c = a + b;
21| 3| println!("c = {}", c)
22| 3| }
23| |
24| | struct InnerStruct {
25| | inner_struct_field: u32,
24| | struct InStruct {
25| | in_struct_field: u32,
26| | }
27| |
28| | const INNER_CONST: u32 = 1234;
28| | const IN_CONST: u32 = 1234;
29| |
30| | trait InnerTrait {
31| | fn inner_trait_func(&mut self, incr: u32);
30| | trait InTrait {
31| | fn trait_func(&mut self, incr: u32);
32| |
33| 1| fn default_trait_func(&mut self) {
34| 1| inner_function(INNER_CONST);
35| 1| self.inner_trait_func(INNER_CONST);
34| 1| in_func(IN_CONST);
35| 1| self.trait_func(IN_CONST);
36| 1| }
37| | }
38| |
39| | impl InnerTrait for InnerStruct {
40| | fn inner_trait_func(&mut self, incr: u32) {
41| 1| self.inner_struct_field += incr;
42| 1| inner_function(self.inner_struct_field);
39| | impl InTrait for InStruct {
40| | fn trait_func(&mut self, incr: u32) {
41| 1| self.in_struct_field += incr;
42| 1| in_func(self.in_struct_field);
43| 1| }
44| | }
45| |
46| | type InnerType = String;
46| | type InType = String;
47| |
48| 1| if is_true {
49| 1| inner_function(countdown);
49| 1| in_func(countdown);
50| 1| }
51| |
52| 1| let mut val = InnerStruct {
53| 1| inner_struct_field: 101,
52| 1| let mut val = InStruct {
53| 1| in_struct_field: 101,
54| 1| };
55| 1|
56| 1| val.default_trait_func();

View File

@ -8,8 +8,8 @@
# LINK_DEAD_CODE requires ignore-msvc due to Issue #76038
LINK_DEAD_CODE=yes
-include ../instrument-coverage-cov-reports-base/Makefile
-include ../coverage-reports-base/Makefile
# ISSUE(76038): When targeting MSVC, Rust binaries built with both `-Z instrument-coverage` and
# `-C link-dead-code` typically crash (with a seg-fault) or at best generate an empty `*.profraw`.
# See ../instrument-coverage/coverage_tools.mk for more information.
# See ../coverage/coverage_tools.mk for more information.

View File

@ -3,7 +3,7 @@
{
"files": [
{
"filename": "../instrument-coverage/closure.rs",
"filename": "../coverage/closure.rs",
"summary": {
"functions": {
"count": 5,

View File

@ -3,7 +3,7 @@
{
"files": [
{
"filename": "../instrument-coverage/drop_trait.rs",
"filename": "../coverage/drop_trait.rs",
"summary": {
"functions": {
"count": 2,

View File

@ -3,7 +3,7 @@
{
"files": [
{
"filename": "../instrument-coverage/generics.rs",
"filename": "../coverage/generics.rs",
"summary": {
"functions": {
"count": 3,

View File

@ -3,7 +3,7 @@
{
"files": [
{
"filename": "../instrument-coverage/if.rs",
"filename": "../coverage/if.rs",
"summary": {
"functions": {
"count": 1,

View File

@ -3,7 +3,7 @@
{
"files": [
{
"filename": "../instrument-coverage/if_else.rs",
"filename": "../coverage/if_else.rs",
"summary": {
"functions": {
"count": 1,

View File

@ -3,7 +3,7 @@
{
"files": [
{
"filename": "../instrument-coverage/inner_items.rs",
"filename": "../coverage/inner_items.rs",
"summary": {
"functions": {
"count": 4,

View File

@ -3,7 +3,7 @@
{
"files": [
{
"filename": "../instrument-coverage/lazy_boolean.rs",
"filename": "../coverage/lazy_boolean.rs",
"summary": {
"functions": {
"count": 1,

View File

@ -3,7 +3,7 @@
{
"files": [
{
"filename": "../instrument-coverage/loop_break_value.rs",
"filename": "../coverage/loop_break_value.rs",
"summary": {
"functions": {
"count": 1,

View File

@ -3,7 +3,7 @@
{
"files": [
{
"filename": "../instrument-coverage/simple_loop.rs",
"filename": "../coverage/simple_loop.rs",
"summary": {
"functions": {
"count": 1,

View File

@ -3,7 +3,7 @@
{
"files": [
{
"filename": "../instrument-coverage/simple_match.rs",
"filename": "../coverage/simple_match.rs",
"summary": {
"functions": {
"count": 1,

View File

@ -3,7 +3,7 @@
{
"files": [
{
"filename": "../instrument-coverage/question_mark_error_result.rs",
"filename": "../coverage/try_error_result.rs",
"summary": {
"functions": {
"count": 2,

View File

@ -3,7 +3,7 @@
{
"files": [
{
"filename": "../instrument-coverage/various_conditions.rs",
"filename": "../coverage/various_conditions.rs",
"summary": {
"functions": {
"count": 1,

View File

@ -3,7 +3,7 @@
{
"files": [
{
"filename": "../instrument-coverage/while_early_return.rs",
"filename": "../coverage/while_early_return.rs",
"summary": {
"functions": {
"count": 1,

View File

@ -11,46 +11,46 @@
11| 1| countdown = 10;
12| 1| }
13| |
14| | mod inner_mod {
15| | const INNER_MOD_CONST: u32 = 1000;
14| | mod in_mod {
15| | const IN_MOD_CONST: u32 = 1000;
16| | }
17| |
18| | fn inner_function(a: u32) {
18| | fn in_func(a: u32) {
19| 3| let b = 1;
20| 3| let c = a + b;
21| 3| println!("c = {}", c)
22| 3| }
23| |
24| | struct InnerStruct {
25| | inner_struct_field: u32,
24| | struct InStruct {
25| | in_struct_field: u32,
26| | }
27| |
28| | const INNER_CONST: u32 = 1234;
28| | const IN_CONST: u32 = 1234;
29| |
30| | trait InnerTrait {
31| | fn inner_trait_func(&mut self, incr: u32);
30| | trait InTrait {
31| | fn trait_func(&mut self, incr: u32);
32| |
33| 1| fn default_trait_func(&mut self) {
34| 1| inner_function(INNER_CONST);
35| 1| self.inner_trait_func(INNER_CONST);
34| 1| in_func(IN_CONST);
35| 1| self.trait_func(IN_CONST);
36| 1| }
37| | }
38| |
39| | impl InnerTrait for InnerStruct {
40| | fn inner_trait_func(&mut self, incr: u32) {
41| 1| self.inner_struct_field += incr;
42| 1| inner_function(self.inner_struct_field);
39| | impl InTrait for InStruct {
40| | fn trait_func(&mut self, incr: u32) {
41| 1| self.in_struct_field += incr;
42| 1| in_func(self.in_struct_field);
43| 1| }
44| | }
45| |
46| | type InnerType = String;
46| | type InType = String;
47| |
48| 1| if is_true {
49| 1| inner_function(countdown);
49| 1| in_func(countdown);
50| 1| }
51| |
52| 1| let mut val = InnerStruct {
53| 1| inner_struct_field: 101,
52| 1| let mut val = InStruct {
53| 1| in_struct_field: 101,
54| 1| };
55| 1|
56| 1| val.default_trait_func();

View File

@ -2,11 +2,11 @@
# ISSUE(76038): When targeting MSVC, Rust binaries built with both `-Z instrument-coverage` and
# `-C link-dead-code` typically crash (with a seg-fault) or at best generate an empty `*.profraw`.
# See ../instrument-coverage/coverage_tools.mk for more information.
# See ../coverage/coverage_tools.mk for more information.
-include ../instrument-coverage/coverage_tools.mk
-include ../coverage/coverage_tools.mk
SOURCEDIR=../instrument-coverage
SOURCEDIR=../coverage
all: $(patsubst $(SOURCEDIR)/%.rs,%,$(wildcard $(SOURCEDIR)/*.rs))

View File

@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<title>inner_items.main-InnerTrait-default_trait_func - Coverage Spans</title>
<title>inner_items.main-InTrait-default_trait_func - Coverage Spans</title>
<style>
.line {
counter-increment: line;
@ -59,24 +59,24 @@
</style>
</head>
<body>
<div class="code" style="counter-reset: line 32"><span class="line"> <span class="code" style="--layer: 0">fn default_trait_func(&amp;mut self) </span><span><span class="code even" style="--layer: 1" title="34:13-34:40: @0.Call: _2 = inner_function(const INNER_CONST) -&gt; [return: bb1, unwind: bb3]
<div class="code" style="counter-reset: line 32"><span class="line"> <span class="code" style="--layer: 0">fn default_trait_func(&amp;mut self) </span><span><span class="code even" style="--layer: 1" title="34:13-34:30: @0.Call: _2 = in_func(const IN_CONST) -&gt; [return: bb1, unwind: bb3]
35:13-35:17: @1[3]: _4 = &amp;mut (*_1)
35:13-35:47: @1.Call: _3 = &lt;Self as InnerTrait&gt;::inner_trait_func(move _4, const INNER_CONST) -&gt; [return: bb2, unwind: bb3]
35:13-35:38: @1.Call: _3 = &lt;Self as InTrait&gt;::trait_func(move _4, const IN_CONST) -&gt; [return: bb2, unwind: bb3]
33:42-36:10: @2[2]: _0 = const ()
36:10-36:10: @2.Return: return"><span class="annotation">@0,1,2⦊</span>{</span></span>
<span class="line"><span class="code even" style="--layer: 1" title="34:13-34:40: @0.Call: _2 = inner_function(const INNER_CONST) -&gt; [return: bb1, unwind: bb3]
<span class="line"><span class="code even" style="--layer: 1" title="34:13-34:30: @0.Call: _2 = in_func(const IN_CONST) -&gt; [return: bb1, unwind: bb3]
35:13-35:17: @1[3]: _4 = &amp;mut (*_1)
35:13-35:47: @1.Call: _3 = &lt;Self as InnerTrait&gt;::inner_trait_func(move _4, const INNER_CONST) -&gt; [return: bb2, unwind: bb3]
35:13-35:38: @1.Call: _3 = &lt;Self as InTrait&gt;::trait_func(move _4, const IN_CONST) -&gt; [return: bb2, unwind: bb3]
33:42-36:10: @2[2]: _0 = const ()
36:10-36:10: @2.Return: return"> inner_function(INNER_CONST);</span></span>
<span class="line"><span class="code even" style="--layer: 1" title="34:13-34:40: @0.Call: _2 = inner_function(const INNER_CONST) -&gt; [return: bb1, unwind: bb3]
36:10-36:10: @2.Return: return"> in_func(IN_CONST);</span></span>
<span class="line"><span class="code even" style="--layer: 1" title="34:13-34:30: @0.Call: _2 = in_func(const IN_CONST) -&gt; [return: bb1, unwind: bb3]
35:13-35:17: @1[3]: _4 = &amp;mut (*_1)
35:13-35:47: @1.Call: _3 = &lt;Self as InnerTrait&gt;::inner_trait_func(move _4, const INNER_CONST) -&gt; [return: bb2, unwind: bb3]
35:13-35:38: @1.Call: _3 = &lt;Self as InTrait&gt;::trait_func(move _4, const IN_CONST) -&gt; [return: bb2, unwind: bb3]
33:42-36:10: @2[2]: _0 = const ()
36:10-36:10: @2.Return: return"> self.inner_trait_func(INNER_CONST);</span></span>
<span class="line"><span class="code even" style="--layer: 1" title="34:13-34:40: @0.Call: _2 = inner_function(const INNER_CONST) -&gt; [return: bb1, unwind: bb3]
36:10-36:10: @2.Return: return"> self.trait_func(IN_CONST);</span></span>
<span class="line"><span class="code even" style="--layer: 1" title="34:13-34:30: @0.Call: _2 = in_func(const IN_CONST) -&gt; [return: bb1, unwind: bb3]
35:13-35:17: @1[3]: _4 = &amp;mut (*_1)
35:13-35:47: @1.Call: _3 = &lt;Self as InnerTrait&gt;::inner_trait_func(move _4, const INNER_CONST) -&gt; [return: bb2, unwind: bb3]
35:13-35:38: @1.Call: _3 = &lt;Self as InTrait&gt;::trait_func(move _4, const IN_CONST) -&gt; [return: bb2, unwind: bb3]
33:42-36:10: @2[2]: _0 = const ()
36:10-36:10: @2.Return: return"> }<span class="annotation">⦉@0,1,2</span></span></span></span></div>
</body>

View File

@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<title>inner_items.main-inner_function - Coverage Spans</title>
<title>inner_items.main-in_func - Coverage Spans</title>
<style>
.line {
counter-increment: line;
@ -59,13 +59,13 @@
</style>
</head>
<body>
<div class="code" style="counter-reset: line 17"><span class="line"> <span class="code" style="--layer: 0">fn inner_function(a: u32) {</span></span>
<div class="code" style="counter-reset: line 17"><span class="line"> <span class="code" style="--layer: 0">fn in_func(a: u32) {</span></span>
<span class="line"><span class="code" style="--layer: 0"> let </span><span><span class="code even" style="--layer: 1" title="19:17-19:18: @0[1]: _2 = const 1_u32
19:13-19:14: @0[2]: FakeRead(ForLet, _2)"><span class="annotation">@0⦊</span>b = 1<span class="annotation">⦉@0</span></span></span><span class="code" style="--layer: 0">;</span></span>
<span class="line"><span class="code" style="--layer: 0"> let </span><span><span class="code odd" style="--layer: 1" title="20:13-20:14: @1[3]: FakeRead(ForLet, _3)"><span class="annotation">@1,2,3,4⦊</span>c<span class="annotation">⦉@1,2,3,4</span></span></span><span class="code" style="--layer: 0"> = </span><span><span class="code even" style="--layer: 1" title="20:17-20:18: @0[5]: _4 = _1
20:21-20:22: @0[7]: _5 = _2
20:17-20:22: @0[8]: _6 = CheckedAdd(_4, _5)"><span class="annotation">@0⦊</span>a + b<span class="annotation">⦉@0</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="21:18-21:26: @1[9]: _23 = const inner_function::promoted[0]
<span class="line"><span class="code" style="--layer: 0"> </span><span><span class="code odd" style="--layer: 1" title="21:18-21:26: @1[9]: _23 = const in_func::promoted[0]
21:18-21:26: @1[10]: _11 = &amp;(*_23)
21:18-21:26: @1[11]: _10 = &amp;(*_11)
21:18-21:26: @1[12]: _9 = move _10 as &amp;[&amp;str] (Pointer(Unsize))
@ -84,7 +84,7 @@
21:9-21:30: @3.Call: _7 = _print(move _8) -&gt; [return: bb4, unwind: bb5]
21:9-21:30: @4[6]: _0 = const ()
22:6-22:6: @4.Return: return"><span class="annotation">@1,2,3,4⦊</span>println!("c = {}", c)</span></span>
<span class="line"><span class="code odd" style="--layer: 1" title="21:18-21:26: @1[9]: _23 = const inner_function::promoted[0]
<span class="line"><span class="code odd" style="--layer: 1" title="21:18-21:26: @1[9]: _23 = const in_func::promoted[0]
21:18-21:26: @1[10]: _11 = &amp;(*_23)
21:18-21:26: @1[11]: _10 = &amp;(*_11)
21:18-21:26: @1[12]: _9 = move _10 as &amp;[&amp;str] (Pointer(Unsize))

View File

@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<title>inner_items.main-{impl#0}-inner_trait_func - Coverage Spans</title>
<title>inner_items.main-{impl#0}-trait_func - Coverage Spans</title>
<style>
.line {
counter-increment: line;
@ -59,14 +59,14 @@
</style>
</head>
<body>
<div class="code" style="counter-reset: line 39"><span class="line"> <span class="code" style="--layer: 0">fn inner_trait_func(&amp;mut self, incr: u32) {</span></span>
<span class="line"><span class="code" style="--layer: 0"> </span><span><span class="code even" style="--layer: 1" title="41:40-41:44: @0[1]: _3 = _2
41:13-41:44: @0[2]: _4 = CheckedAdd(((*_1).0: u32), _3)"><span class="annotation">@0⦊</span>self.inner_struct_field += incr<span class="annotation">⦉@0</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="42:28-42:51: @1[4]: _6 = ((*_1).0: u32)
42:13-42:52: @1.Call: _5 = inner_function(move _6) -&gt; [return: bb2, unwind: bb3]
43:10-43:10: @2.Return: return"><span class="annotation">@1,2⦊</span>inner_function(self.inner_struct_field);</span></span>
<span class="line"><span class="code odd" style="--layer: 1" title="42:28-42:51: @1[4]: _6 = ((*_1).0: u32)
42:13-42:52: @1.Call: _5 = inner_function(move _6) -&gt; [return: bb2, unwind: bb3]
<div class="code" style="counter-reset: line 39"><span class="line"> <span class="code" style="--layer: 0">fn trait_func(&amp;mut self, incr: u32) {</span></span>
<span class="line"><span class="code" style="--layer: 0"> </span><span><span class="code even" style="--layer: 1" title="41:37-41:41: @0[1]: _3 = _2
41:13-41:41: @0[2]: _4 = CheckedAdd(((*_1).0: u32), _3)"><span class="annotation">@0⦊</span>self.in_struct_field += incr<span class="annotation">⦉@0</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="42:21-42:41: @1[4]: _6 = ((*_1).0: u32)
42:13-42:42: @1.Call: _5 = in_func(move _6) -&gt; [return: bb2, unwind: bb3]
43:10-43:10: @2.Return: return"><span class="annotation">@1,2⦊</span>in_func(self.in_struct_field);</span></span>
<span class="line"><span class="code odd" style="--layer: 1" title="42:21-42:41: @1[4]: _6 = ((*_1).0: u32)
42:13-42:42: @1.Call: _5 = in_func(move _6) -&gt; [return: bb2, unwind: bb3]
43:10-43:10: @2.Return: return"> }<span class="annotation">⦉@1,2</span></span></span></span></div>
</body>
</html>

View File

@ -92,80 +92,80 @@
<span class="line"><span class="code odd" style="--layer: 1" title="11:9-11:23: @6[0]: _5 = const 10_u32
10:16-12:6: @6[1]: _6 = const ()"> }<span class="annotation">⦉@4,6</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"> mod inner_mod {</span></span>
<span class="line"><span class="code" style="--layer: 0"> const INNER_MOD_CONST: u32 = 1000;</span></span>
<span class="line"><span class="code" style="--layer: 0"> mod in_mod {</span></span>
<span class="line"><span class="code" style="--layer: 0"> const IN_MOD_CONST: u32 = 1000;</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="line"><span class="code" style="--layer: 0"> fn inner_function(a: u32) {</span></span>
<span class="line"><span class="code" style="--layer: 0"> fn in_func(a: u32) {</span></span>
<span class="line"><span class="code" style="--layer: 0"> let b = 1;</span></span>
<span class="line"><span class="code" style="--layer: 0"> let c = a + b;</span></span>
<span class="line"><span class="code" style="--layer: 0"> println!("c = {}", c)</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="line"><span class="code" style="--layer: 0"> struct InnerStruct {</span></span>
<span class="line"><span class="code" style="--layer: 0"> inner_struct_field: u32,</span></span>
<span class="line"><span class="code" style="--layer: 0"> struct InStruct {</span></span>
<span class="line"><span class="code" style="--layer: 0"> in_struct_field: u32,</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="line"><span class="code" style="--layer: 0"> const INNER_CONST: u32 = 1234;</span></span>
<span class="line"><span class="code" style="--layer: 0"> const IN_CONST: u32 = 1234;</span></span>
<span class="line"><span class="code" style="--layer: 0"></span></span>
<span class="line"><span class="code" style="--layer: 0"> trait InnerTrait {</span></span>
<span class="line"><span class="code" style="--layer: 0"> fn inner_trait_func(&amp;mut self, incr: u32);</span></span>
<span class="line"><span class="code" style="--layer: 0"> trait InTrait {</span></span>
<span class="line"><span class="code" style="--layer: 0"> fn trait_func(&amp;mut self, incr: u32);</span></span>
<span class="line"><span class="code" style="--layer: 0"></span></span>
<span class="line"><span class="code" style="--layer: 0"> fn default_trait_func(&amp;mut self) {</span></span>
<span class="line"><span class="code" style="--layer: 0"> inner_function(INNER_CONST);</span></span>
<span class="line"><span class="code" style="--layer: 0"> self.inner_trait_func(INNER_CONST);</span></span>
<span class="line"><span class="code" style="--layer: 0"> in_func(IN_CONST);</span></span>
<span class="line"><span class="code" style="--layer: 0"> self.trait_func(IN_CONST);</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="line"><span class="code" style="--layer: 0"></span></span>
<span class="line"><span class="code" style="--layer: 0"> impl InnerTrait for InnerStruct {</span></span>
<span class="line"><span class="code" style="--layer: 0"> fn inner_trait_func(&amp;mut self, incr: u32) {</span></span>
<span class="line"><span class="code" style="--layer: 0"> self.inner_struct_field += incr;</span></span>
<span class="line"><span class="code" style="--layer: 0"> inner_function(self.inner_struct_field);</span></span>
<span class="line"><span class="code" style="--layer: 0"> impl InTrait for InStruct {</span></span>
<span class="line"><span class="code" style="--layer: 0"> fn trait_func(&amp;mut self, incr: u32) {</span></span>
<span class="line"><span class="code" style="--layer: 0"> self.in_struct_field += incr;</span></span>
<span class="line"><span class="code" style="--layer: 0"> in_func(self.in_struct_field);</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="line"><span class="code" style="--layer: 0"></span></span>
<span class="line"><span class="code" style="--layer: 0"> type InnerType = String;</span></span>
<span class="line"><span class="code" style="--layer: 0"> type InType = String;</span></span>
<span class="line"><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="48:8-48:15: @7[4]: _9 = _1
48:8-48:15: @7[5]: FakeRead(ForMatchedPlace, _9)"><span class="annotation">@7⦊</span>is_true<span class="annotation">⦉@7</span></span></span><span class="code" style="--layer: 0"> </span><span><span class="code odd" style="--layer: 1" title="49:24-49:33: @10[2]: _11 = _5
49:9-49:34: @10.Call: _10 = inner_function(move _11) -&gt; [return: bb11, unwind: bb15]
48:8-48:15: @7[5]: FakeRead(ForMatchedPlace, _9)"><span class="annotation">@7⦊</span>is_true<span class="annotation">⦉@7</span></span></span><span class="code" style="--layer: 0"> </span><span><span class="code odd" style="--layer: 1" title="49:17-49:26: @10[2]: _11 = _5
49:9-49:27: @10.Call: _10 = in_func(move _11) -&gt; [return: bb11, unwind: bb15]
48:16-50:6: @11[2]: _8 = const ()"><span class="annotation">@8,10,11⦊</span>{</span></span>
<span class="line"><span class="code odd" style="--layer: 1" title="49:24-49:33: @10[2]: _11 = _5
49:9-49:34: @10.Call: _10 = inner_function(move _11) -&gt; [return: bb11, unwind: bb15]
48:16-50:6: @11[2]: _8 = const ()"> inner_function(countdown);</span></span>
<span class="line"><span class="code odd" style="--layer: 1" title="49:24-49:33: @10[2]: _11 = _5
49:9-49:34: @10.Call: _10 = inner_function(move _11) -&gt; [return: bb11, unwind: bb15]
<span class="line"><span class="code odd" style="--layer: 1" title="49:17-49:26: @10[2]: _11 = _5
49:9-49:27: @10.Call: _10 = in_func(move _11) -&gt; [return: bb11, unwind: bb15]
48:16-50:6: @11[2]: _8 = const ()"> in_func(countdown);</span></span>
<span class="line"><span class="code odd" style="--layer: 1" title="49:17-49:26: @10[2]: _11 = _5
49:9-49:27: @10.Call: _10 = in_func(move _11) -&gt; [return: bb11, unwind: bb15]
48:16-50:6: @11[2]: _8 = const ()"> }<span class="annotation">⦉@8,10,11</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"> let </span><span><span class="code even" style="--layer: 1" title="52:19-54:6: @12[3]: _12 = InnerStruct { inner_struct_field: const 101_u32 }
<span class="line"><span class="code" style="--layer: 0"> let </span><span><span class="code even" style="--layer: 1" title="52:19-54:6: @12[3]: _12 = InStruct { in_struct_field: const 101_u32 }
52:9-52:16: @12[4]: FakeRead(ForLet, _12)
56:5-56:8: @12[7]: _14 = &amp;mut _12
56:5-56:29: @12.Call: _13 = &lt;InnerStruct as InnerTrait&gt;::default_trait_func(move _14) -&gt; [return: bb13, unwind: bb15]
57:2-57:2: @13.Return: return"><span class="annotation">@12,13⦊</span>mut val = InnerStruct {</span></span>
<span class="line"><span class="code even" style="--layer: 1" title="52:19-54:6: @12[3]: _12 = InnerStruct { inner_struct_field: const 101_u32 }
56:5-56:29: @12.Call: _13 = &lt;InStruct as InTrait&gt;::default_trait_func(move _14) -&gt; [return: bb13, unwind: bb15]
57:2-57:2: @13.Return: return"><span class="annotation">@12,13⦊</span>mut val = InStruct {</span></span>
<span class="line"><span class="code even" style="--layer: 1" title="52:19-54:6: @12[3]: _12 = InStruct { in_struct_field: const 101_u32 }
52:9-52:16: @12[4]: FakeRead(ForLet, _12)
56:5-56:8: @12[7]: _14 = &amp;mut _12
56:5-56:29: @12.Call: _13 = &lt;InnerStruct as InnerTrait&gt;::default_trait_func(move _14) -&gt; [return: bb13, unwind: bb15]
57:2-57:2: @13.Return: return"> inner_struct_field: 101,</span></span>
<span class="line"><span class="code even" style="--layer: 1" title="52:19-54:6: @12[3]: _12 = InnerStruct { inner_struct_field: const 101_u32 }
56:5-56:29: @12.Call: _13 = &lt;InStruct as InTrait&gt;::default_trait_func(move _14) -&gt; [return: bb13, unwind: bb15]
57:2-57:2: @13.Return: return"> in_struct_field: 101,</span></span>
<span class="line"><span class="code even" style="--layer: 1" title="52:19-54:6: @12[3]: _12 = InStruct { in_struct_field: const 101_u32 }
52:9-52:16: @12[4]: FakeRead(ForLet, _12)
56:5-56:8: @12[7]: _14 = &amp;mut _12
56:5-56:29: @12.Call: _13 = &lt;InnerStruct as InnerTrait&gt;::default_trait_func(move _14) -&gt; [return: bb13, unwind: bb15]
56:5-56:29: @12.Call: _13 = &lt;InStruct as InTrait&gt;::default_trait_func(move _14) -&gt; [return: bb13, unwind: bb15]
57:2-57:2: @13.Return: return"> };</span></span>
<span class="line"><span class="code even" style="--layer: 1" title="52:19-54:6: @12[3]: _12 = InnerStruct { inner_struct_field: const 101_u32 }
<span class="line"><span class="code even" style="--layer: 1" title="52:19-54:6: @12[3]: _12 = InStruct { in_struct_field: const 101_u32 }
52:9-52:16: @12[4]: FakeRead(ForLet, _12)
56:5-56:8: @12[7]: _14 = &amp;mut _12
56:5-56:29: @12.Call: _13 = &lt;InnerStruct as InnerTrait&gt;::default_trait_func(move _14) -&gt; [return: bb13, unwind: bb15]
56:5-56:29: @12.Call: _13 = &lt;InStruct as InTrait&gt;::default_trait_func(move _14) -&gt; [return: bb13, unwind: bb15]
57:2-57:2: @13.Return: return"></span></span>
<span class="line"><span class="code even" style="--layer: 1" title="52:19-54:6: @12[3]: _12 = InnerStruct { inner_struct_field: const 101_u32 }
<span class="line"><span class="code even" style="--layer: 1" title="52:19-54:6: @12[3]: _12 = InStruct { in_struct_field: const 101_u32 }
52:9-52:16: @12[4]: FakeRead(ForLet, _12)
56:5-56:8: @12[7]: _14 = &amp;mut _12
56:5-56:29: @12.Call: _13 = &lt;InnerStruct as InnerTrait&gt;::default_trait_func(move _14) -&gt; [return: bb13, unwind: bb15]
56:5-56:29: @12.Call: _13 = &lt;InStruct as InTrait&gt;::default_trait_func(move _14) -&gt; [return: bb13, unwind: bb15]
57:2-57:2: @13.Return: return"> val.default_trait_func();</span></span>
<span class="line"><span class="code even" style="--layer: 1" title="52:19-54:6: @12[3]: _12 = InnerStruct { inner_struct_field: const 101_u32 }
<span class="line"><span class="code even" style="--layer: 1" title="52:19-54:6: @12[3]: _12 = InStruct { in_struct_field: const 101_u32 }
52:9-52:16: @12[4]: FakeRead(ForLet, _12)
56:5-56:8: @12[7]: _14 = &amp;mut _12
56:5-56:29: @12.Call: _13 = &lt;InnerStruct as InnerTrait&gt;::default_trait_func(move _14) -&gt; [return: bb13, unwind: bb15]
56:5-56:29: @12.Call: _13 = &lt;InStruct as InTrait&gt;::default_trait_func(move _14) -&gt; [return: bb13, unwind: bb15]
57:2-57:2: @13.Return: return">}<span class="annotation">⦉@12,13</span></span></span></span></div>
</body>
</html>

View File

@ -4,8 +4,8 @@
# LINK_DEAD_CODE requires ignore-msvc due to Issue #76038
LINK_DEAD_CODE=yes
-include ../instrument-coverage-mir-cov-html-base/Makefile
-include ../coverage-spanview-base/Makefile
# ISSUE(76038): When targeting MSVC, Rust binaries built with both `-Z instrument-coverage` and
# `-C link-dead-code` typically crash (with a seg-fault) or at best generate an empty `*.profraw`.
# See ../instrument-coverage/coverage_tools.mk for more information.
# See ../coverage/coverage_tools.mk for more information.

View File

@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<title>inner_items.main-InnerTrait-default_trait_func - Coverage Spans</title>
<title>inner_items.main-InTrait-default_trait_func - Coverage Spans</title>
<style>
.line {
counter-increment: line;
@ -59,24 +59,24 @@
</style>
</head>
<body>
<div class="code" style="counter-reset: line 32"><span class="line"> <span class="code" style="--layer: 0">fn default_trait_func(&amp;mut self) </span><span><span class="code even" style="--layer: 1" title="34:13-34:40: @0.Call: _2 = inner_function(const INNER_CONST) -&gt; [return: bb1, unwind: bb3]
<div class="code" style="counter-reset: line 32"><span class="line"> <span class="code" style="--layer: 0">fn default_trait_func(&amp;mut self) </span><span><span class="code even" style="--layer: 1" title="34:13-34:30: @0.Call: _2 = in_func(const IN_CONST) -&gt; [return: bb1, unwind: bb3]
35:13-35:17: @1[3]: _4 = &amp;mut (*_1)
35:13-35:47: @1.Call: _3 = &lt;Self as InnerTrait&gt;::inner_trait_func(move _4, const INNER_CONST) -&gt; [return: bb2, unwind: bb3]
35:13-35:38: @1.Call: _3 = &lt;Self as InTrait&gt;::trait_func(move _4, const IN_CONST) -&gt; [return: bb2, unwind: bb3]
33:42-36:10: @2[2]: _0 = const ()
36:10-36:10: @2.Return: return"><span class="annotation">@0,1,2⦊</span>{</span></span>
<span class="line"><span class="code even" style="--layer: 1" title="34:13-34:40: @0.Call: _2 = inner_function(const INNER_CONST) -&gt; [return: bb1, unwind: bb3]
<span class="line"><span class="code even" style="--layer: 1" title="34:13-34:30: @0.Call: _2 = in_func(const IN_CONST) -&gt; [return: bb1, unwind: bb3]
35:13-35:17: @1[3]: _4 = &amp;mut (*_1)
35:13-35:47: @1.Call: _3 = &lt;Self as InnerTrait&gt;::inner_trait_func(move _4, const INNER_CONST) -&gt; [return: bb2, unwind: bb3]
35:13-35:38: @1.Call: _3 = &lt;Self as InTrait&gt;::trait_func(move _4, const IN_CONST) -&gt; [return: bb2, unwind: bb3]
33:42-36:10: @2[2]: _0 = const ()
36:10-36:10: @2.Return: return"> inner_function(INNER_CONST);</span></span>
<span class="line"><span class="code even" style="--layer: 1" title="34:13-34:40: @0.Call: _2 = inner_function(const INNER_CONST) -&gt; [return: bb1, unwind: bb3]
36:10-36:10: @2.Return: return"> in_func(IN_CONST);</span></span>
<span class="line"><span class="code even" style="--layer: 1" title="34:13-34:30: @0.Call: _2 = in_func(const IN_CONST) -&gt; [return: bb1, unwind: bb3]
35:13-35:17: @1[3]: _4 = &amp;mut (*_1)
35:13-35:47: @1.Call: _3 = &lt;Self as InnerTrait&gt;::inner_trait_func(move _4, const INNER_CONST) -&gt; [return: bb2, unwind: bb3]
35:13-35:38: @1.Call: _3 = &lt;Self as InTrait&gt;::trait_func(move _4, const IN_CONST) -&gt; [return: bb2, unwind: bb3]
33:42-36:10: @2[2]: _0 = const ()
36:10-36:10: @2.Return: return"> self.inner_trait_func(INNER_CONST);</span></span>
<span class="line"><span class="code even" style="--layer: 1" title="34:13-34:40: @0.Call: _2 = inner_function(const INNER_CONST) -&gt; [return: bb1, unwind: bb3]
36:10-36:10: @2.Return: return"> self.trait_func(IN_CONST);</span></span>
<span class="line"><span class="code even" style="--layer: 1" title="34:13-34:30: @0.Call: _2 = in_func(const IN_CONST) -&gt; [return: bb1, unwind: bb3]
35:13-35:17: @1[3]: _4 = &amp;mut (*_1)
35:13-35:47: @1.Call: _3 = &lt;Self as InnerTrait&gt;::inner_trait_func(move _4, const INNER_CONST) -&gt; [return: bb2, unwind: bb3]
35:13-35:38: @1.Call: _3 = &lt;Self as InTrait&gt;::trait_func(move _4, const IN_CONST) -&gt; [return: bb2, unwind: bb3]
33:42-36:10: @2[2]: _0 = const ()
36:10-36:10: @2.Return: return"> }<span class="annotation">⦉@0,1,2</span></span></span></span></div>
</body>

View File

@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<title>inner_items.main-inner_function - Coverage Spans</title>
<title>inner_items.main-in_func - Coverage Spans</title>
<style>
.line {
counter-increment: line;
@ -59,13 +59,13 @@
</style>
</head>
<body>
<div class="code" style="counter-reset: line 17"><span class="line"> <span class="code" style="--layer: 0">fn inner_function(a: u32) {</span></span>
<div class="code" style="counter-reset: line 17"><span class="line"> <span class="code" style="--layer: 0">fn in_func(a: u32) {</span></span>
<span class="line"><span class="code" style="--layer: 0"> let </span><span><span class="code even" style="--layer: 1" title="19:17-19:18: @0[1]: _2 = const 1_u32
19:13-19:14: @0[2]: FakeRead(ForLet, _2)"><span class="annotation">@0⦊</span>b = 1<span class="annotation">⦉@0</span></span></span><span class="code" style="--layer: 0">;</span></span>
<span class="line"><span class="code" style="--layer: 0"> let </span><span><span class="code odd" style="--layer: 1" title="20:13-20:14: @1[3]: FakeRead(ForLet, _3)"><span class="annotation">@1,2,3,4⦊</span>c<span class="annotation">⦉@1,2,3,4</span></span></span><span class="code" style="--layer: 0"> = </span><span><span class="code even" style="--layer: 1" title="20:17-20:18: @0[5]: _4 = _1
20:21-20:22: @0[7]: _5 = _2
20:17-20:22: @0[8]: _6 = CheckedAdd(_4, _5)"><span class="annotation">@0⦊</span>a + b<span class="annotation">⦉@0</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="21:18-21:26: @1[9]: _23 = const inner_function::promoted[0]
<span class="line"><span class="code" style="--layer: 0"> </span><span><span class="code odd" style="--layer: 1" title="21:18-21:26: @1[9]: _23 = const in_func::promoted[0]
21:18-21:26: @1[10]: _11 = &amp;(*_23)
21:18-21:26: @1[11]: _10 = &amp;(*_11)
21:18-21:26: @1[12]: _9 = move _10 as &amp;[&amp;str] (Pointer(Unsize))
@ -84,7 +84,7 @@
21:9-21:30: @3.Call: _7 = _print(move _8) -&gt; [return: bb4, unwind: bb5]
21:9-21:30: @4[6]: _0 = const ()
22:6-22:6: @4.Return: return"><span class="annotation">@1,2,3,4⦊</span>println!("c = {}", c)</span></span>
<span class="line"><span class="code odd" style="--layer: 1" title="21:18-21:26: @1[9]: _23 = const inner_function::promoted[0]
<span class="line"><span class="code odd" style="--layer: 1" title="21:18-21:26: @1[9]: _23 = const in_func::promoted[0]
21:18-21:26: @1[10]: _11 = &amp;(*_23)
21:18-21:26: @1[11]: _10 = &amp;(*_11)
21:18-21:26: @1[12]: _9 = move _10 as &amp;[&amp;str] (Pointer(Unsize))

Some files were not shown because too many files have changed in this diff Show More