Addressed feedback from 2020-12-01

Added one more test (two files) showing coverage of generics and unused
functions across crates.

Created and referenced new Issues, as requested.

Added comments.

Added a note about the possible effects of compiler options on LLVM
coverage maps.
This commit is contained in:
Rich Kadel 2020-12-01 23:01:26 -08:00
parent def932ca86
commit d96f351fa3
28 changed files with 1797 additions and 366 deletions

View File

@ -262,6 +262,10 @@ fn add_unreachable_coverage<'tcx>(
tcx: TyCtxt<'tcx>,
function_coverage_map: &mut FxHashMap<Instance<'tcx>, FunctionCoverage<'tcx>>,
) {
// FIXME(#79622): Can this solution be simplified and/or improved? Are there other sources
// of compiler state data that might help (or better sources that could be exposed, but
// aren't yet)?
// Note: If the crate *only* defines generic functions, there are no codegenerated non-generic
// functions to add any unreachable code to. In this case, the unreachable code regions will
// have no coverage, instead of having coverage with zero executions.
@ -359,6 +363,21 @@ fn add_unreachable_coverage<'tcx>(
for def_id in
unreachable_def_ids_by_file.remove(&covered_file_name).into_iter().flatten()
{
// Note, this loop adds an unreachable code regions for each MIR-derived region.
// Alternatively, we could add a single code region for the maximum span of all
// code regions here.
//
// Observed downsides of this approach are:
//
// 1. The coverage results will appear inconsistent compared with the same (or
// similar) code in a function that is reached.
// 2. If the function is unreachable from one crate but reachable when compiling
// another referencing crate (such as a cross-crate reference to a
// generic function or inlined function), actual coverage regions overlaid
// on a single larger code span of `Zero` coverage can appear confusing or
// wrong. Chaning the unreachable coverage from a `code_region` to a
// `gap_region` can help, but still can look odd with `0` line counts for
// lines between executed (> 0) lines (such as for blank lines or comments).
for &region in tcx.covered_code_regions(def_id) {
function_coverage.add_unreachable_region(region.clone());
}

View File

@ -140,7 +140,9 @@ impl CoverageGraph {
// The following `TerminatorKind`s are either not expected outside an unwind branch,
// or they should not (under normal circumstances) branch. Coverage graphs are
// simplified by assuring coverage results are accurate for well-behaved programs.
// simplified by assuring coverage results are accurate for program executions that
// don't panic.
//
// Programs that panic and unwind may record slightly inaccurate coverage results
// for a coverage region containing the `Terminator` that began the panic. This
// is as intended. (See Issue #78544 for a possible future option to support

View File

@ -499,6 +499,8 @@ fn fn_sig_and_body<'tcx>(
tcx: TyCtxt<'tcx>,
def_id: DefId,
) -> (Option<&'tcx rustc_hir::FnSig<'tcx>>, &'tcx rustc_hir::Body<'tcx>) {
// FIXME(#79625): Consider improving MIR to provide the information needed, to avoid going back
// to HIR for it.
let hir_node = tcx.hir().get_if_local(def_id).expect("expected DefId is local");
let fn_body_id = hir::map::associated_body(hir_node).expect("HIR node is a function with body");
(hir::map::fn_sig(hir_node), tcx.hir().body(fn_body_id))

View File

@ -359,12 +359,12 @@ impl<'a, 'tcx> CoverageSpans<'a, 'tcx> {
}
// Async functions wrap a closure that implements the body to be executed. The enclosing
// function is initially called, posts the closure to the executor, and returns. To avoid
// showing the return from the enclosing function as a "covered" return from the closure,
// the enclosing function's `TerminatorKind::Return`s `CoverageSpan` is excluded. The
// closure's `Return` is the only one that will be counted. This provides adequate
// coverage, and more intuitive counts. (Avoids double-counting the closing brace of the
// function body.)
// function is called and returns an `impl Future` without initially executing any of the
// body. To avoid showing the return from the enclosing function as a "covered" return from
// the closure, the enclosing function's `TerminatorKind::Return`s `CoverageSpan` is
// excluded. The closure's `Return` is the only one that will be counted. This provides
// adequate coverage, and more intuitive counts. (Avoids double-counting the closing brace
// of the function body.)
let body_ends_with_closure = if let Some(last_covspan) = refined_spans.last() {
last_covspan.is_closure && last_covspan.span.hi() == self.body_span.hi()
} else {

View File

@ -76,6 +76,8 @@ $ RUSTC=$HOME/rust/build/x86_64-unknown-linux-gnu/stage1/bin/rustc \
cargo build --example formatjson5
```
Note that some compiler options, combined with `-Zinstrument-coverage`, can produce LLVM IR and/or linked binaries that are incompatible with LLVM coverage maps. For example, coverage requires references to actual functions in LLVM IR. If any covered function is optimized out, the coverage tools may not be able to process the coverage results. If you need to pass additional options, with coverage enabled, test them early, to confirm you will get the coverage results you expect.
## Running the instrumented binary to generate raw coverage profiling data
In the previous example, `cargo` generated the coverage-instrumented binary `formatjson5`:

View File

@ -6,50 +6,50 @@
"filename": "../coverage/async.rs",
"summary": {
"functions": {
"count": 16,
"covered": 15,
"percent": 93.75
"count": 17,
"covered": 16,
"percent": 94.11764705882352
},
"instantiations": {
"count": 16,
"covered": 15,
"percent": 93.75
"count": 17,
"covered": 16,
"percent": 94.11764705882352
},
"lines": {
"count": 102,
"covered": 75,
"percent": 73.52941176470588
"count": 105,
"covered": 77,
"percent": 73.33333333333333
},
"regions": {
"count": 76,
"covered": 35,
"notcovered": 41,
"percent": 46.05263157894737
"count": 78,
"covered": 36,
"notcovered": 42,
"percent": 46.15384615384615
}
}
}
],
"totals": {
"functions": {
"count": 16,
"covered": 15,
"percent": 93.75
"count": 17,
"covered": 16,
"percent": 94.11764705882352
},
"instantiations": {
"count": 16,
"covered": 15,
"percent": 93.75
"count": 17,
"covered": 16,
"percent": 94.11764705882352
},
"lines": {
"count": 102,
"covered": 75,
"percent": 73.52941176470588
"count": 105,
"covered": 77,
"percent": 73.33333333333333
},
"regions": {
"count": 76,
"covered": 35,
"notcovered": 41,
"percent": 46.05263157894737
"count": 78,
"covered": 36,
"notcovered": 42,
"percent": 46.15384615384615
}
}
}

View File

@ -0,0 +1,85 @@
{
"data": [
{
"files": [
{
"filename": "../coverage/used_crate/mod.rs",
"summary": {
"functions": {
"count": 3,
"covered": 3,
"percent": 100
},
"instantiations": {
"count": 4,
"covered": 4,
"percent": 100
},
"lines": {
"count": 31,
"covered": 14,
"percent": 45.16129032258064
},
"regions": {
"count": 16,
"covered": 6,
"notcovered": 10,
"percent": 37.5
}
}
},
{
"filename": "../coverage/uses_crate.rs",
"summary": {
"functions": {
"count": 1,
"covered": 1,
"percent": 100
},
"instantiations": {
"count": 1,
"covered": 1,
"percent": 100
},
"lines": {
"count": 6,
"covered": 6,
"percent": 100
},
"regions": {
"count": 1,
"covered": 1,
"notcovered": 0,
"percent": 100
}
}
}
],
"totals": {
"functions": {
"count": 4,
"covered": 4,
"percent": 100
},
"instantiations": {
"count": 5,
"covered": 5,
"percent": 100
},
"lines": {
"count": 37,
"covered": 20,
"percent": 54.054054054054056
},
"regions": {
"count": 17,
"covered": 7,
"notcovered": 10,
"percent": 41.17647058823529
}
}
}
],
"type": "llvm.coverage.json.export",
"version": "2.0.1"
}

View File

@ -93,39 +93,43 @@
88| | }
89| 1|}
90| |
91| 1|fn main() {
92| 1| let _ = g(10);
93| 1| let _ = h(9);
94| 1| let mut future = Box::pin(i(8));
95| 1| j(7);
96| 1| l(6);
97| 1| executor::block_on(future.as_mut());
98| 1|}
99| |
100| |mod executor {
101| | use core::{
102| | future::Future,
103| | pin::Pin,
104| | task::{Context, Poll, RawWaker, RawWakerVTable, Waker},
105| | };
106| |
107| 1| pub fn block_on<F: Future>(mut future: F) -> F::Output {
108| 1| let mut future = unsafe { Pin::new_unchecked(&mut future) };
109| 1|
110| 1| static VTABLE: RawWakerVTable = RawWakerVTable::new(
111| 1| |_| unimplemented!("clone"),
112| 1| |_| unimplemented!("wake"),
113| 1| |_| unimplemented!("wake_by_ref"),
114| 1| |_| (),
115| 1| );
116| 1| let waker = unsafe { Waker::from_raw(RawWaker::new(core::ptr::null(), &VTABLE)) };
117| 1| let mut context = Context::from_waker(&waker);
118| |
119| | loop {
120| 1| if let Poll::Ready(val) = future.as_mut().poll(&mut context) {
121| 1| break val;
122| 0| }
123| | }
124| 1| }
125| |}
91| 1|async fn m(x: u8) -> u8 { x - 1 }
^0
92| |
93| 1|fn main() {
94| 1| let _ = g(10);
95| 1| let _ = h(9);
96| 1| let mut future = Box::pin(i(8));
97| 1| j(7);
98| 1| l(6);
99| 1| let _ = m(5);
100| 1| executor::block_on(future.as_mut());
101| 1|}
102| |
103| |mod executor {
104| | use core::{
105| | future::Future,
106| | pin::Pin,
107| | task::{Context, Poll, RawWaker, RawWakerVTable, Waker},
108| | };
109| |
110| 1| pub fn block_on<F: Future>(mut future: F) -> F::Output {
111| 1| let mut future = unsafe { Pin::new_unchecked(&mut future) };
112| 1|
113| 1| static VTABLE: RawWakerVTable = RawWakerVTable::new(
114| 1| |_| unimplemented!("clone"),
115| 1| |_| unimplemented!("wake"),
116| 1| |_| unimplemented!("wake_by_ref"),
117| 1| |_| (),
118| 1| );
119| 1| let waker = unsafe { Waker::from_raw(RawWaker::new(core::ptr::null(), &VTABLE)) };
120| 1| let mut context = Context::from_waker(&waker);
121| |
122| | loop {
123| 1| if let Poll::Ready(val) = future.as_mut().poll(&mut context) {
124| 1| break val;
125| 0| }
126| | }
127| 1| }
128| |}

View File

@ -45,4 +45,19 @@
44| |`function_source_hash` without a code region, if necessary.
45| |
46| |*/
47| |
48| |// FIXME(#79626): The derived traits get coverage, which is great, but some of the traits appear
49| |// to get two coverage execution counts at different positions:
50| |//
51| |// ```text
52| |// 4| 2|#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord)]
53| |// ^0 ^0 ^0 ^0 ^1 ^0 ^0^0
54| |// ```text
55| |//
56| |// `PartialEq`, `PartialOrd`, and `Ord` (and possibly `Eq`, if the trait name was longer than 2
57| |// characters) have counts at their first and last characters.
58| |//
59| |// Why is this? Why does `PartialOrd` have two values (1 and 0)? This must mean we are checking
60| |// distinct coverages, so maybe we don't want to eliminate one of them. Should we merge them?
61| |// If merged, do we lose some information?

View File

@ -0,0 +1,69 @@
../coverage/used_crate/mod.rs:
1| |#![allow(unused_assignments, unused_variables)]
2| |
3| |use std::fmt::Debug;
4| |
5| 1|pub fn used_function() {
6| | // Initialize test constants in a way that cannot be determined at compile time, to ensure
7| | // rustc and LLVM cannot optimize out statements (or coverage counters) downstream from
8| | // dependent conditions.
9| 1| let is_true = std::env::args().len() == 1;
10| 1| let mut countdown = 0;
11| 1| if is_true {
12| 1| countdown = 10;
13| 1| }
^0
14| 1| used_twice_generic_function("some str");
15| 1|}
16| |
17| 1|pub fn used_generic_function<T: Debug>(arg: T) {
18| 1| println!("used_generic_function with {:?}", arg);
19| 1|}
20| |
21| 2|pub fn used_twice_generic_function<T: Debug>(arg: T) {
22| 2| println!("used_twice_generic_function with {:?}", arg);
23| 2|}
------------------
| uses_crate::used_crate::used_twice_generic_function::<alloc::vec::Vec<i32>>:
| 21| 1|pub fn used_twice_generic_function<T: Debug>(arg: T) {
| 22| 1| println!("used_twice_generic_function with {:?}", arg);
| 23| 1|}
------------------
| uses_crate::used_crate::used_twice_generic_function::<&str>:
| 21| 1|pub fn used_twice_generic_function<T: Debug>(arg: T) {
| 22| 1| println!("used_twice_generic_function with {:?}", arg);
| 23| 1|}
------------------
24| |
25| 0|pub fn unused_generic_function<T: Debug>(arg: T) {
26| 0| println!("unused_generic_function with {:?}", arg);
27| 0|}
28| |
29| 0|pub fn unused_function() {
30| 0| let is_true = std::env::args().len() == 1;
31| 0| let mut countdown = 2;
32| 0| if !is_true {
33| 0| countdown = 20;
34| 0| }
35| 0|}
36| |
37| 0|fn unused_private_function() {
38| 0| let is_true = std::env::args().len() == 1;
39| 0| let mut countdown = 2;
40| 0| if !is_true {
41| 0| countdown = 20;
42| 0| }
43| 0|}
../coverage/uses_crate.rs:
1| |#![allow(unused_assignments, unused_variables)]
2| |
3| |mod used_crate;
4| |
5| 1|fn main() {
6| 1| used_crate::used_function();
7| 1| let some_vec = vec![1, 2, 3, 4];
8| 1| used_crate::used_generic_function(&some_vec);
9| 1| used_crate::used_twice_generic_function(some_vec);
10| 1|}

View File

@ -26,18 +26,18 @@ Counter in file 0 77:14 -> 77:16, 0
Counter in file 0 78:14 -> 78:16, 0
Counter in file 0 79:14 -> 79:16, 0
Counter in file 0 81:1 -> 81:2, 0
Counter in file 0 91:25 -> 91:34, 0
Counter in file 0 5:1 -> 5:25, #1
Counter in file 0 21:1 -> 21:23, #1
Counter in file 0 17:20 -> 17:21, #1
Counter in file 0 67:5 -> 67:23, #1
Counter in file 0 38:1 -> 38:19, #1
Counter in file 0 13:20 -> 13:21, #1
Counter in file 0 29:1 -> 29:22, #1
Counter in file 0 91:1 -> 98:2, #1
Counter in file 0 5:25 -> 6:14, #1
Counter in file 0 7:9 -> 7:10, #2
Counter in file 0 9:9 -> 9:10, (#1 - #2)
Counter in file 0 11:1 -> 11:2, (#2 + (#1 - #2))
Counter in file 0 21:1 -> 21:23, #1
Counter in file 0 67:5 -> 67:23, #1
Counter in file 0 38:1 -> 38:19, #1
Counter in file 0 29:1 -> 29:22, #1
Counter in file 0 93:1 -> 101:2, #1
Counter in file 0 91:1 -> 91:25, #1
Counter in file 0 38:19 -> 42:12, #1
Counter in file 0 43:9 -> 43:10, #3
Counter in file 0 43:14 -> 43:18, (#1 + 0)
@ -53,6 +53,7 @@ Counter in file 0 51:5 -> 52:18, #1
Counter in file 0 53:13 -> 53:14, #2
Counter in file 0 63:13 -> 63:14, (#1 - #2)
Counter in file 0 65:5 -> 65:6, (#2 + (#1 - #2))
Counter in file 0 17:20 -> 17:21, #1
Counter in file 0 49:1 -> 68:12, #1
Counter in file 0 69:9 -> 69:10, #2
Counter in file 0 69:14 -> 69:27, (#1 + 0)
@ -68,17 +69,18 @@ Counter in file 0 86:14 -> 86:16, #2
Counter in file 0 87:14 -> 87:16, #3
Counter in file 0 89:1 -> 89:2, (#3 + (#2 + (#1 - (#3 + #2))))
Counter in file 0 17:1 -> 17:20, #1
Counter in file 0 13:20 -> 13:21, #1
Counter in file 0 66:5 -> 66:23, #1
Counter in file 0 107:5 -> 117:54, #1
Counter in file 0 120:32 -> 120:35, ((#1 + #2) - #2)
Counter in file 0 120:39 -> 120:73, (#1 + #2)
Counter in file 0 121:23 -> 121:26, (((#1 + #2) - #2) + 0)
Counter in file 0 122:14 -> 122:15, #2
Counter in file 0 124:5 -> 124:6, (((#1 + #2) - #2) + 0)
Counter in file 0 114:17 -> 114:19, #1
Counter in file 0 17:9 -> 17:10, #1
Counter in file 0 17:9 -> 17:10, #1
Counter in file 0 117:17 -> 117:19, #1
Counter in file 0 17:9 -> 17:10, #1
Counter in file 0 110:5 -> 120:54, #1
Counter in file 0 123:32 -> 123:35, ((#1 + #2) - #2)
Counter in file 0 123:39 -> 123:73, (#1 + #2)
Counter in file 0 124:23 -> 124:26, (((#1 + #2) - #2) + 0)
Counter in file 0 125:14 -> 125:15, #2
Counter in file 0 127:5 -> 127:6, (((#1 + #2) - #2) + 0)
Emitting segments for file: ../coverage/async.rs
Combined regions:
5:1 -> 5:25 (count=1)
@ -149,14 +151,16 @@ Combined regions:
86:14 -> 86:16 (count=0)
87:14 -> 87:16 (count=1)
89:1 -> 89:2 (count=1)
91:1 -> 98:2 (count=1)
107:5 -> 117:54 (count=1)
114:17 -> 114:19 (count=1)
120:32 -> 120:35 (count=1)
120:39 -> 120:73 (count=1)
121:23 -> 121:26 (count=1)
122:14 -> 122:15 (count=0)
124:5 -> 124:6 (count=1)
91:1 -> 91:25 (count=1)
91:25 -> 91:34 (count=0)
93:1 -> 101:2 (count=1)
110:5 -> 120:54 (count=1)
117:17 -> 117:19 (count=1)
123:32 -> 123:35 (count=1)
123:39 -> 123:73 (count=1)
124:23 -> 124:26 (count=1)
125:14 -> 125:15 (count=0)
127:5 -> 127:6 (count=1)
Segment at 5:1 (count = 1), RegionEntry
Segment at 5:25 (count = 1), RegionEntry
Segment at 6:14 (count = 0), Skipped
@ -287,18 +291,21 @@ Segment at 87:16 (count = 0), Skipped
Segment at 89:1 (count = 1), RegionEntry
Segment at 89:2 (count = 0), Skipped
Segment at 91:1 (count = 1), RegionEntry
Segment at 98:2 (count = 0), Skipped
Segment at 107:5 (count = 1), RegionEntry
Segment at 114:17 (count = 1), RegionEntry
Segment at 114:19 (count = 1)
Segment at 117:54 (count = 0), Skipped
Segment at 120:32 (count = 1), RegionEntry
Segment at 120:35 (count = 0), Skipped
Segment at 120:39 (count = 1), RegionEntry
Segment at 120:73 (count = 0), Skipped
Segment at 121:23 (count = 1), RegionEntry
Segment at 121:26 (count = 0), Skipped
Segment at 122:14 (count = 0), RegionEntry
Segment at 122:15 (count = 0), Skipped
Segment at 124:5 (count = 1), RegionEntry
Segment at 124:6 (count = 0), Skipped
Segment at 91:25 (count = 0), RegionEntry
Segment at 91:34 (count = 0), Skipped
Segment at 93:1 (count = 1), RegionEntry
Segment at 101:2 (count = 0), Skipped
Segment at 110:5 (count = 1), RegionEntry
Segment at 117:17 (count = 1), RegionEntry
Segment at 117:19 (count = 1)
Segment at 120:54 (count = 0), Skipped
Segment at 123:32 (count = 1), RegionEntry
Segment at 123:35 (count = 0), Skipped
Segment at 123:39 (count = 1), RegionEntry
Segment at 123:73 (count = 0), Skipped
Segment at 124:23 (count = 1), RegionEntry
Segment at 124:26 (count = 0), Skipped
Segment at 125:14 (count = 0), RegionEntry
Segment at 125:15 (count = 0), Skipped
Segment at 127:5 (count = 1), RegionEntry
Segment at 127:6 (count = 0), Skipped

View File

@ -0,0 +1,80 @@
Counter in file 0 17:1 -> 19:2, #1
Counter in file 0 25:1 -> 27:2, 0
Counter in file 0 29:1 -> 32:16, 0
Counter in file 0 32:17 -> 34:6, 0
Counter in file 0 34:6 -> 34:7, 0
Counter in file 0 35:1 -> 35:2, 0
Counter in file 0 37:1 -> 40:16, 0
Counter in file 0 40:17 -> 42:6, 0
Counter in file 0 42:6 -> 42:7, 0
Counter in file 0 43:1 -> 43:2, 0
Counter in file 0 5:1 -> 5:24, #1
Counter in file 0 9:9 -> 11:15, (#1 + 0)
Counter in file 0 11:16 -> 13:6, #2
Counter in file 0 13:6 -> 13:7, (#1 - #2)
Counter in file 0 14:5 -> 15:2, (#2 + (#1 - #2))
Counter in file 0 21:1 -> 23:2, #1
Counter in file 0 21:1 -> 23:2, #1
Counter in file 0 5:1 -> 10:2, #1
Emitting segments for file: ../coverage/used_crate/mod.rs
Combined regions:
5:1 -> 5:24 (count=1)
9:9 -> 11:15 (count=1)
11:16 -> 13:6 (count=1)
13:6 -> 13:7 (count=0)
14:5 -> 15:2 (count=1)
17:1 -> 19:2 (count=1)
21:1 -> 23:2 (count=2)
25:1 -> 27:2 (count=0)
29:1 -> 32:16 (count=0)
32:17 -> 34:6 (count=0)
34:6 -> 34:7 (count=0)
35:1 -> 35:2 (count=0)
37:1 -> 40:16 (count=0)
40:17 -> 42:6 (count=0)
42:6 -> 42:7 (count=0)
43:1 -> 43:2 (count=0)
Segment at 5:1 (count = 1), RegionEntry
Segment at 5:24 (count = 0), Skipped
Segment at 9:9 (count = 1), RegionEntry
Segment at 11:15 (count = 0), Skipped
Segment at 11:16 (count = 1), RegionEntry
Segment at 13:6 (count = 0), RegionEntry
Segment at 13:7 (count = 0), Skipped
Segment at 14:5 (count = 1), RegionEntry
Segment at 15:2 (count = 0), Skipped
Segment at 17:1 (count = 1), RegionEntry
Segment at 19:2 (count = 0), Skipped
Segment at 21:1 (count = 2), RegionEntry
Segment at 23:2 (count = 0), Skipped
Segment at 25:1 (count = 0), RegionEntry
Segment at 27:2 (count = 0), Skipped
Segment at 29:1 (count = 0), RegionEntry
Segment at 32:16 (count = 0), Skipped
Segment at 32:17 (count = 0), RegionEntry
Segment at 34:6 (count = 0), RegionEntry
Segment at 34:7 (count = 0), Skipped
Segment at 35:1 (count = 0), RegionEntry
Segment at 35:2 (count = 0), Skipped
Segment at 37:1 (count = 0), RegionEntry
Segment at 40:16 (count = 0), Skipped
Segment at 40:17 (count = 0), RegionEntry
Segment at 42:6 (count = 0), RegionEntry
Segment at 42:7 (count = 0), Skipped
Segment at 43:1 (count = 0), RegionEntry
Segment at 43:2 (count = 0), Skipped
Emitting segments for function: _RINvNtCs4fqI2P2rA04_10uses_crate10used_crate27used_twice_generic_functionINtNtCs3QflaznQylx_5alloc3vec3VeclEEB4_
Combined regions:
21:1 -> 23:2 (count=1)
Segment at 21:1 (count = 1), RegionEntry
Segment at 23:2 (count = 0), Skipped
Emitting segments for function: _RINvNtCs4fqI2P2rA04_10uses_crate10used_crate27used_twice_generic_functionReEB4_
Combined regions:
21:1 -> 23:2 (count=1)
Segment at 21:1 (count = 1), RegionEntry
Segment at 23:2 (count = 0), Skipped
Emitting segments for file: ../coverage/uses_crate.rs
Combined regions:
5:1 -> 10:2 (count=1)
Segment at 5:1 (count = 1), RegionEntry
Segment at 10:2 (count = 0), Skipped

View File

@ -69,7 +69,7 @@ For revisions in Pull Requests (PR):
</style>
</head>
<body>
<div class="code" style="counter-reset: line 113"><span class="line"> <span class="code" style="--layer: 0">|_| </span><span><span class="code even" style="--layer: 1" title="114:17-114:19: @0[0]: _0 = ()
114:19-114:19: @0.Return: return"><span class="annotation">@0⦊</span>()<span class="annotation">⦉@0</span></span></span></span></div>
<div class="code" style="counter-reset: line 116"><span class="line"> <span class="code" style="--layer: 0">|_| </span><span><span class="code even" style="--layer: 1" title="117:17-117:19: @0[0]: _0 = ()
117:19-117:19: @0.Return: return"><span class="annotation">@0⦊</span>()<span class="annotation">⦉@0</span></span></span></span></div>
</body>
</html>

View File

@ -69,171 +69,171 @@ For revisions in Pull Requests (PR):
</style>
</head>
<body>
<div class="code" style="counter-reset: line 106"><span class="line"> <span><span class="code even" style="--layer: 1" title="108:54-108:65: @0[2]: _3 = &amp;mut _1
108:35-108:66: @0.Call: _2 = Pin::&lt;&amp;mut F&gt;::new_unchecked(move _3) -&gt; [return: bb1, unwind: bb20]
108:13-108:23: @1[1]: FakeRead(ForLet, _2)
116:60-116:77: @1.Call: _6 = null::&lt;()&gt;() -&gt; [return: bb2, unwind: bb20]
116:80-116:86: @2[3]: _9 = const {alloc0: &amp;RawWakerVTable}
116:79-116:86: @2[4]: _8 = &amp;(*_9)
116:79-116:86: @2[5]: _7 = &amp;(*_8)
116:46-116:87: @2.Call: _5 = RawWaker::new(move _6, move _7) -&gt; [return: bb3, unwind: bb20]
116:30-116:88: @3.Call: _4 = Waker::from_raw(move _5) -&gt; [return: bb4, unwind: bb20]
116:13-116:18: @4[1]: FakeRead(ForLet, _4)
117:47-117:53: @4[7]: _12 = &amp;_4
117:47-117:53: @4[8]: _11 = &amp;(*_12)
117:27-117:54: @4.Call: _10 = Context::from_waker(move _11) -&gt; [return: bb5, unwind: bb19]
117:13-117:24: @5[1]: FakeRead(ForLet, _10)"><span class="annotation">@0,1,2,3,4,5⦊</span>pub fn block_on&lt;F: Future&gt;(mut future: F) -&gt; F::Output {</span></span>
<span class="line"><span class="code even" style="--layer: 1" title="108:54-108:65: @0[2]: _3 = &amp;mut _1
108:35-108:66: @0.Call: _2 = Pin::&lt;&amp;mut F&gt;::new_unchecked(move _3) -&gt; [return: bb1, unwind: bb20]
108:13-108:23: @1[1]: FakeRead(ForLet, _2)
116:60-116:77: @1.Call: _6 = null::&lt;()&gt;() -&gt; [return: bb2, unwind: bb20]
116:80-116:86: @2[3]: _9 = const {alloc0: &amp;RawWakerVTable}
116:79-116:86: @2[4]: _8 = &amp;(*_9)
116:79-116:86: @2[5]: _7 = &amp;(*_8)
116:46-116:87: @2.Call: _5 = RawWaker::new(move _6, move _7) -&gt; [return: bb3, unwind: bb20]
116:30-116:88: @3.Call: _4 = Waker::from_raw(move _5) -&gt; [return: bb4, unwind: bb20]
116:13-116:18: @4[1]: FakeRead(ForLet, _4)
117:47-117:53: @4[7]: _12 = &amp;_4
117:47-117:53: @4[8]: _11 = &amp;(*_12)
117:27-117:54: @4.Call: _10 = Context::from_waker(move _11) -&gt; [return: bb5, unwind: bb19]
117:13-117:24: @5[1]: FakeRead(ForLet, _10)"> let mut future = unsafe { Pin::new_unchecked(&amp;mut future) };</span></span>
<span class="line"><span class="code even" style="--layer: 1" title="108:54-108:65: @0[2]: _3 = &amp;mut _1
108:35-108:66: @0.Call: _2 = Pin::&lt;&amp;mut F&gt;::new_unchecked(move _3) -&gt; [return: bb1, unwind: bb20]
108:13-108:23: @1[1]: FakeRead(ForLet, _2)
116:60-116:77: @1.Call: _6 = null::&lt;()&gt;() -&gt; [return: bb2, unwind: bb20]
116:80-116:86: @2[3]: _9 = const {alloc0: &amp;RawWakerVTable}
116:79-116:86: @2[4]: _8 = &amp;(*_9)
116:79-116:86: @2[5]: _7 = &amp;(*_8)
116:46-116:87: @2.Call: _5 = RawWaker::new(move _6, move _7) -&gt; [return: bb3, unwind: bb20]
116:30-116:88: @3.Call: _4 = Waker::from_raw(move _5) -&gt; [return: bb4, unwind: bb20]
116:13-116:18: @4[1]: FakeRead(ForLet, _4)
117:47-117:53: @4[7]: _12 = &amp;_4
117:47-117:53: @4[8]: _11 = &amp;(*_12)
117:27-117:54: @4.Call: _10 = Context::from_waker(move _11) -&gt; [return: bb5, unwind: bb19]
117:13-117:24: @5[1]: FakeRead(ForLet, _10)"></span></span>
<span class="line"><span class="code even" style="--layer: 1" title="108:54-108:65: @0[2]: _3 = &amp;mut _1
108:35-108:66: @0.Call: _2 = Pin::&lt;&amp;mut F&gt;::new_unchecked(move _3) -&gt; [return: bb1, unwind: bb20]
108:13-108:23: @1[1]: FakeRead(ForLet, _2)
116:60-116:77: @1.Call: _6 = null::&lt;()&gt;() -&gt; [return: bb2, unwind: bb20]
116:80-116:86: @2[3]: _9 = const {alloc0: &amp;RawWakerVTable}
116:79-116:86: @2[4]: _8 = &amp;(*_9)
116:79-116:86: @2[5]: _7 = &amp;(*_8)
116:46-116:87: @2.Call: _5 = RawWaker::new(move _6, move _7) -&gt; [return: bb3, unwind: bb20]
116:30-116:88: @3.Call: _4 = Waker::from_raw(move _5) -&gt; [return: bb4, unwind: bb20]
116:13-116:18: @4[1]: FakeRead(ForLet, _4)
117:47-117:53: @4[7]: _12 = &amp;_4
117:47-117:53: @4[8]: _11 = &amp;(*_12)
117:27-117:54: @4.Call: _10 = Context::from_waker(move _11) -&gt; [return: bb5, unwind: bb19]
117:13-117:24: @5[1]: FakeRead(ForLet, _10)"> static VTABLE: RawWakerVTable = RawWakerVTable::new(</span></span>
<span class="line"><span class="code even" style="--layer: 1" title="108:54-108:65: @0[2]: _3 = &amp;mut _1
108:35-108:66: @0.Call: _2 = Pin::&lt;&amp;mut F&gt;::new_unchecked(move _3) -&gt; [return: bb1, unwind: bb20]
108:13-108:23: @1[1]: FakeRead(ForLet, _2)
116:60-116:77: @1.Call: _6 = null::&lt;()&gt;() -&gt; [return: bb2, unwind: bb20]
116:80-116:86: @2[3]: _9 = const {alloc0: &amp;RawWakerVTable}
116:79-116:86: @2[4]: _8 = &amp;(*_9)
116:79-116:86: @2[5]: _7 = &amp;(*_8)
116:46-116:87: @2.Call: _5 = RawWaker::new(move _6, move _7) -&gt; [return: bb3, unwind: bb20]
116:30-116:88: @3.Call: _4 = Waker::from_raw(move _5) -&gt; [return: bb4, unwind: bb20]
116:13-116:18: @4[1]: FakeRead(ForLet, _4)
117:47-117:53: @4[7]: _12 = &amp;_4
117:47-117:53: @4[8]: _11 = &amp;(*_12)
117:27-117:54: @4.Call: _10 = Context::from_waker(move _11) -&gt; [return: bb5, unwind: bb19]
117:13-117:24: @5[1]: FakeRead(ForLet, _10)"> |_| unimplemented!("clone"),</span></span>
<span class="line"><span class="code even" style="--layer: 1" title="108:54-108:65: @0[2]: _3 = &amp;mut _1
108:35-108:66: @0.Call: _2 = Pin::&lt;&amp;mut F&gt;::new_unchecked(move _3) -&gt; [return: bb1, unwind: bb20]
108:13-108:23: @1[1]: FakeRead(ForLet, _2)
116:60-116:77: @1.Call: _6 = null::&lt;()&gt;() -&gt; [return: bb2, unwind: bb20]
116:80-116:86: @2[3]: _9 = const {alloc0: &amp;RawWakerVTable}
116:79-116:86: @2[4]: _8 = &amp;(*_9)
116:79-116:86: @2[5]: _7 = &amp;(*_8)
116:46-116:87: @2.Call: _5 = RawWaker::new(move _6, move _7) -&gt; [return: bb3, unwind: bb20]
116:30-116:88: @3.Call: _4 = Waker::from_raw(move _5) -&gt; [return: bb4, unwind: bb20]
116:13-116:18: @4[1]: FakeRead(ForLet, _4)
117:47-117:53: @4[7]: _12 = &amp;_4
117:47-117:53: @4[8]: _11 = &amp;(*_12)
117:27-117:54: @4.Call: _10 = Context::from_waker(move _11) -&gt; [return: bb5, unwind: bb19]
117:13-117:24: @5[1]: FakeRead(ForLet, _10)"> |_| unimplemented!("wake"),</span></span>
<span class="line"><span class="code even" style="--layer: 1" title="108:54-108:65: @0[2]: _3 = &amp;mut _1
108:35-108:66: @0.Call: _2 = Pin::&lt;&amp;mut F&gt;::new_unchecked(move _3) -&gt; [return: bb1, unwind: bb20]
108:13-108:23: @1[1]: FakeRead(ForLet, _2)
116:60-116:77: @1.Call: _6 = null::&lt;()&gt;() -&gt; [return: bb2, unwind: bb20]
116:80-116:86: @2[3]: _9 = const {alloc0: &amp;RawWakerVTable}
116:79-116:86: @2[4]: _8 = &amp;(*_9)
116:79-116:86: @2[5]: _7 = &amp;(*_8)
116:46-116:87: @2.Call: _5 = RawWaker::new(move _6, move _7) -&gt; [return: bb3, unwind: bb20]
116:30-116:88: @3.Call: _4 = Waker::from_raw(move _5) -&gt; [return: bb4, unwind: bb20]
116:13-116:18: @4[1]: FakeRead(ForLet, _4)
117:47-117:53: @4[7]: _12 = &amp;_4
117:47-117:53: @4[8]: _11 = &amp;(*_12)
117:27-117:54: @4.Call: _10 = Context::from_waker(move _11) -&gt; [return: bb5, unwind: bb19]
117:13-117:24: @5[1]: FakeRead(ForLet, _10)"> |_| unimplemented!("wake_by_ref"),</span></span>
<span class="line"><span class="code even" style="--layer: 1" title="108:54-108:65: @0[2]: _3 = &amp;mut _1
108:35-108:66: @0.Call: _2 = Pin::&lt;&amp;mut F&gt;::new_unchecked(move _3) -&gt; [return: bb1, unwind: bb20]
108:13-108:23: @1[1]: FakeRead(ForLet, _2)
116:60-116:77: @1.Call: _6 = null::&lt;()&gt;() -&gt; [return: bb2, unwind: bb20]
116:80-116:86: @2[3]: _9 = const {alloc0: &amp;RawWakerVTable}
116:79-116:86: @2[4]: _8 = &amp;(*_9)
116:79-116:86: @2[5]: _7 = &amp;(*_8)
116:46-116:87: @2.Call: _5 = RawWaker::new(move _6, move _7) -&gt; [return: bb3, unwind: bb20]
116:30-116:88: @3.Call: _4 = Waker::from_raw(move _5) -&gt; [return: bb4, unwind: bb20]
116:13-116:18: @4[1]: FakeRead(ForLet, _4)
117:47-117:53: @4[7]: _12 = &amp;_4
117:47-117:53: @4[8]: _11 = &amp;(*_12)
117:27-117:54: @4.Call: _10 = Context::from_waker(move _11) -&gt; [return: bb5, unwind: bb19]
117:13-117:24: @5[1]: FakeRead(ForLet, _10)"> |_| (),</span></span>
<span class="line"><span class="code even" style="--layer: 1" title="108:54-108:65: @0[2]: _3 = &amp;mut _1
108:35-108:66: @0.Call: _2 = Pin::&lt;&amp;mut F&gt;::new_unchecked(move _3) -&gt; [return: bb1, unwind: bb20]
108:13-108:23: @1[1]: FakeRead(ForLet, _2)
116:60-116:77: @1.Call: _6 = null::&lt;()&gt;() -&gt; [return: bb2, unwind: bb20]
116:80-116:86: @2[3]: _9 = const {alloc0: &amp;RawWakerVTable}
116:79-116:86: @2[4]: _8 = &amp;(*_9)
116:79-116:86: @2[5]: _7 = &amp;(*_8)
116:46-116:87: @2.Call: _5 = RawWaker::new(move _6, move _7) -&gt; [return: bb3, unwind: bb20]
116:30-116:88: @3.Call: _4 = Waker::from_raw(move _5) -&gt; [return: bb4, unwind: bb20]
116:13-116:18: @4[1]: FakeRead(ForLet, _4)
117:47-117:53: @4[7]: _12 = &amp;_4
117:47-117:53: @4[8]: _11 = &amp;(*_12)
117:27-117:54: @4.Call: _10 = Context::from_waker(move _11) -&gt; [return: bb5, unwind: bb19]
117:13-117:24: @5[1]: FakeRead(ForLet, _10)"> );</span></span>
<span class="line"><span class="code even" style="--layer: 1" title="108:54-108:65: @0[2]: _3 = &amp;mut _1
108:35-108:66: @0.Call: _2 = Pin::&lt;&amp;mut F&gt;::new_unchecked(move _3) -&gt; [return: bb1, unwind: bb20]
108:13-108:23: @1[1]: FakeRead(ForLet, _2)
116:60-116:77: @1.Call: _6 = null::&lt;()&gt;() -&gt; [return: bb2, unwind: bb20]
116:80-116:86: @2[3]: _9 = const {alloc0: &amp;RawWakerVTable}
116:79-116:86: @2[4]: _8 = &amp;(*_9)
116:79-116:86: @2[5]: _7 = &amp;(*_8)
116:46-116:87: @2.Call: _5 = RawWaker::new(move _6, move _7) -&gt; [return: bb3, unwind: bb20]
116:30-116:88: @3.Call: _4 = Waker::from_raw(move _5) -&gt; [return: bb4, unwind: bb20]
116:13-116:18: @4[1]: FakeRead(ForLet, _4)
117:47-117:53: @4[7]: _12 = &amp;_4
117:47-117:53: @4[8]: _11 = &amp;(*_12)
117:27-117:54: @4.Call: _10 = Context::from_waker(move _11) -&gt; [return: bb5, unwind: bb19]
117:13-117:24: @5[1]: FakeRead(ForLet, _10)"> let waker = unsafe { Waker::from_raw(RawWaker::new(core::ptr::null(), &amp;VTABLE)) };</span></span>
<span class="line"><span class="code even" style="--layer: 1" title="108:54-108:65: @0[2]: _3 = &amp;mut _1
108:35-108:66: @0.Call: _2 = Pin::&lt;&amp;mut F&gt;::new_unchecked(move _3) -&gt; [return: bb1, unwind: bb20]
108:13-108:23: @1[1]: FakeRead(ForLet, _2)
116:60-116:77: @1.Call: _6 = null::&lt;()&gt;() -&gt; [return: bb2, unwind: bb20]
116:80-116:86: @2[3]: _9 = const {alloc0: &amp;RawWakerVTable}
116:79-116:86: @2[4]: _8 = &amp;(*_9)
116:79-116:86: @2[5]: _7 = &amp;(*_8)
116:46-116:87: @2.Call: _5 = RawWaker::new(move _6, move _7) -&gt; [return: bb3, unwind: bb20]
116:30-116:88: @3.Call: _4 = Waker::from_raw(move _5) -&gt; [return: bb4, unwind: bb20]
116:13-116:18: @4[1]: FakeRead(ForLet, _4)
117:47-117:53: @4[7]: _12 = &amp;_4
117:47-117:53: @4[8]: _11 = &amp;(*_12)
117:27-117:54: @4.Call: _10 = Context::from_waker(move _11) -&gt; [return: bb5, unwind: bb19]
117:13-117:24: @5[1]: FakeRead(ForLet, _10)"> let mut context = Context::from_waker(&amp;waker)<span class="annotation">⦉@0,1,2,3,4,5</span></span></span><span class="code" style="--layer: 0">;</span></span>
<div class="code" style="counter-reset: line 109"><span class="line"> <span><span class="code even" style="--layer: 1" title="111:54-111:65: @0[2]: _3 = &amp;mut _1
111:35-111:66: @0.Call: _2 = Pin::&lt;&amp;mut F&gt;::new_unchecked(move _3) -&gt; [return: bb1, unwind: bb20]
111:13-111:23: @1[1]: FakeRead(ForLet, _2)
119:60-119:77: @1.Call: _6 = null::&lt;()&gt;() -&gt; [return: bb2, unwind: bb20]
119:80-119:86: @2[3]: _9 = const {alloc0: &amp;RawWakerVTable}
119:79-119:86: @2[4]: _8 = &amp;(*_9)
119:79-119:86: @2[5]: _7 = &amp;(*_8)
119:46-119:87: @2.Call: _5 = RawWaker::new(move _6, move _7) -&gt; [return: bb3, unwind: bb20]
119:30-119:88: @3.Call: _4 = Waker::from_raw(move _5) -&gt; [return: bb4, unwind: bb20]
119:13-119:18: @4[1]: FakeRead(ForLet, _4)
120:47-120:53: @4[7]: _12 = &amp;_4
120:47-120:53: @4[8]: _11 = &amp;(*_12)
120:27-120:54: @4.Call: _10 = Context::from_waker(move _11) -&gt; [return: bb5, unwind: bb19]
120:13-120:24: @5[1]: FakeRead(ForLet, _10)"><span class="annotation">@0,1,2,3,4,5⦊</span>pub fn block_on&lt;F: Future&gt;(mut future: F) -&gt; F::Output {</span></span>
<span class="line"><span class="code even" style="--layer: 1" title="111:54-111:65: @0[2]: _3 = &amp;mut _1
111:35-111:66: @0.Call: _2 = Pin::&lt;&amp;mut F&gt;::new_unchecked(move _3) -&gt; [return: bb1, unwind: bb20]
111:13-111:23: @1[1]: FakeRead(ForLet, _2)
119:60-119:77: @1.Call: _6 = null::&lt;()&gt;() -&gt; [return: bb2, unwind: bb20]
119:80-119:86: @2[3]: _9 = const {alloc0: &amp;RawWakerVTable}
119:79-119:86: @2[4]: _8 = &amp;(*_9)
119:79-119:86: @2[5]: _7 = &amp;(*_8)
119:46-119:87: @2.Call: _5 = RawWaker::new(move _6, move _7) -&gt; [return: bb3, unwind: bb20]
119:30-119:88: @3.Call: _4 = Waker::from_raw(move _5) -&gt; [return: bb4, unwind: bb20]
119:13-119:18: @4[1]: FakeRead(ForLet, _4)
120:47-120:53: @4[7]: _12 = &amp;_4
120:47-120:53: @4[8]: _11 = &amp;(*_12)
120:27-120:54: @4.Call: _10 = Context::from_waker(move _11) -&gt; [return: bb5, unwind: bb19]
120:13-120:24: @5[1]: FakeRead(ForLet, _10)"> let mut future = unsafe { Pin::new_unchecked(&amp;mut future) };</span></span>
<span class="line"><span class="code even" style="--layer: 1" title="111:54-111:65: @0[2]: _3 = &amp;mut _1
111:35-111:66: @0.Call: _2 = Pin::&lt;&amp;mut F&gt;::new_unchecked(move _3) -&gt; [return: bb1, unwind: bb20]
111:13-111:23: @1[1]: FakeRead(ForLet, _2)
119:60-119:77: @1.Call: _6 = null::&lt;()&gt;() -&gt; [return: bb2, unwind: bb20]
119:80-119:86: @2[3]: _9 = const {alloc0: &amp;RawWakerVTable}
119:79-119:86: @2[4]: _8 = &amp;(*_9)
119:79-119:86: @2[5]: _7 = &amp;(*_8)
119:46-119:87: @2.Call: _5 = RawWaker::new(move _6, move _7) -&gt; [return: bb3, unwind: bb20]
119:30-119:88: @3.Call: _4 = Waker::from_raw(move _5) -&gt; [return: bb4, unwind: bb20]
119:13-119:18: @4[1]: FakeRead(ForLet, _4)
120:47-120:53: @4[7]: _12 = &amp;_4
120:47-120:53: @4[8]: _11 = &amp;(*_12)
120:27-120:54: @4.Call: _10 = Context::from_waker(move _11) -&gt; [return: bb5, unwind: bb19]
120:13-120:24: @5[1]: FakeRead(ForLet, _10)"></span></span>
<span class="line"><span class="code even" style="--layer: 1" title="111:54-111:65: @0[2]: _3 = &amp;mut _1
111:35-111:66: @0.Call: _2 = Pin::&lt;&amp;mut F&gt;::new_unchecked(move _3) -&gt; [return: bb1, unwind: bb20]
111:13-111:23: @1[1]: FakeRead(ForLet, _2)
119:60-119:77: @1.Call: _6 = null::&lt;()&gt;() -&gt; [return: bb2, unwind: bb20]
119:80-119:86: @2[3]: _9 = const {alloc0: &amp;RawWakerVTable}
119:79-119:86: @2[4]: _8 = &amp;(*_9)
119:79-119:86: @2[5]: _7 = &amp;(*_8)
119:46-119:87: @2.Call: _5 = RawWaker::new(move _6, move _7) -&gt; [return: bb3, unwind: bb20]
119:30-119:88: @3.Call: _4 = Waker::from_raw(move _5) -&gt; [return: bb4, unwind: bb20]
119:13-119:18: @4[1]: FakeRead(ForLet, _4)
120:47-120:53: @4[7]: _12 = &amp;_4
120:47-120:53: @4[8]: _11 = &amp;(*_12)
120:27-120:54: @4.Call: _10 = Context::from_waker(move _11) -&gt; [return: bb5, unwind: bb19]
120:13-120:24: @5[1]: FakeRead(ForLet, _10)"> static VTABLE: RawWakerVTable = RawWakerVTable::new(</span></span>
<span class="line"><span class="code even" style="--layer: 1" title="111:54-111:65: @0[2]: _3 = &amp;mut _1
111:35-111:66: @0.Call: _2 = Pin::&lt;&amp;mut F&gt;::new_unchecked(move _3) -&gt; [return: bb1, unwind: bb20]
111:13-111:23: @1[1]: FakeRead(ForLet, _2)
119:60-119:77: @1.Call: _6 = null::&lt;()&gt;() -&gt; [return: bb2, unwind: bb20]
119:80-119:86: @2[3]: _9 = const {alloc0: &amp;RawWakerVTable}
119:79-119:86: @2[4]: _8 = &amp;(*_9)
119:79-119:86: @2[5]: _7 = &amp;(*_8)
119:46-119:87: @2.Call: _5 = RawWaker::new(move _6, move _7) -&gt; [return: bb3, unwind: bb20]
119:30-119:88: @3.Call: _4 = Waker::from_raw(move _5) -&gt; [return: bb4, unwind: bb20]
119:13-119:18: @4[1]: FakeRead(ForLet, _4)
120:47-120:53: @4[7]: _12 = &amp;_4
120:47-120:53: @4[8]: _11 = &amp;(*_12)
120:27-120:54: @4.Call: _10 = Context::from_waker(move _11) -&gt; [return: bb5, unwind: bb19]
120:13-120:24: @5[1]: FakeRead(ForLet, _10)"> |_| unimplemented!("clone"),</span></span>
<span class="line"><span class="code even" style="--layer: 1" title="111:54-111:65: @0[2]: _3 = &amp;mut _1
111:35-111:66: @0.Call: _2 = Pin::&lt;&amp;mut F&gt;::new_unchecked(move _3) -&gt; [return: bb1, unwind: bb20]
111:13-111:23: @1[1]: FakeRead(ForLet, _2)
119:60-119:77: @1.Call: _6 = null::&lt;()&gt;() -&gt; [return: bb2, unwind: bb20]
119:80-119:86: @2[3]: _9 = const {alloc0: &amp;RawWakerVTable}
119:79-119:86: @2[4]: _8 = &amp;(*_9)
119:79-119:86: @2[5]: _7 = &amp;(*_8)
119:46-119:87: @2.Call: _5 = RawWaker::new(move _6, move _7) -&gt; [return: bb3, unwind: bb20]
119:30-119:88: @3.Call: _4 = Waker::from_raw(move _5) -&gt; [return: bb4, unwind: bb20]
119:13-119:18: @4[1]: FakeRead(ForLet, _4)
120:47-120:53: @4[7]: _12 = &amp;_4
120:47-120:53: @4[8]: _11 = &amp;(*_12)
120:27-120:54: @4.Call: _10 = Context::from_waker(move _11) -&gt; [return: bb5, unwind: bb19]
120:13-120:24: @5[1]: FakeRead(ForLet, _10)"> |_| unimplemented!("wake"),</span></span>
<span class="line"><span class="code even" style="--layer: 1" title="111:54-111:65: @0[2]: _3 = &amp;mut _1
111:35-111:66: @0.Call: _2 = Pin::&lt;&amp;mut F&gt;::new_unchecked(move _3) -&gt; [return: bb1, unwind: bb20]
111:13-111:23: @1[1]: FakeRead(ForLet, _2)
119:60-119:77: @1.Call: _6 = null::&lt;()&gt;() -&gt; [return: bb2, unwind: bb20]
119:80-119:86: @2[3]: _9 = const {alloc0: &amp;RawWakerVTable}
119:79-119:86: @2[4]: _8 = &amp;(*_9)
119:79-119:86: @2[5]: _7 = &amp;(*_8)
119:46-119:87: @2.Call: _5 = RawWaker::new(move _6, move _7) -&gt; [return: bb3, unwind: bb20]
119:30-119:88: @3.Call: _4 = Waker::from_raw(move _5) -&gt; [return: bb4, unwind: bb20]
119:13-119:18: @4[1]: FakeRead(ForLet, _4)
120:47-120:53: @4[7]: _12 = &amp;_4
120:47-120:53: @4[8]: _11 = &amp;(*_12)
120:27-120:54: @4.Call: _10 = Context::from_waker(move _11) -&gt; [return: bb5, unwind: bb19]
120:13-120:24: @5[1]: FakeRead(ForLet, _10)"> |_| unimplemented!("wake_by_ref"),</span></span>
<span class="line"><span class="code even" style="--layer: 1" title="111:54-111:65: @0[2]: _3 = &amp;mut _1
111:35-111:66: @0.Call: _2 = Pin::&lt;&amp;mut F&gt;::new_unchecked(move _3) -&gt; [return: bb1, unwind: bb20]
111:13-111:23: @1[1]: FakeRead(ForLet, _2)
119:60-119:77: @1.Call: _6 = null::&lt;()&gt;() -&gt; [return: bb2, unwind: bb20]
119:80-119:86: @2[3]: _9 = const {alloc0: &amp;RawWakerVTable}
119:79-119:86: @2[4]: _8 = &amp;(*_9)
119:79-119:86: @2[5]: _7 = &amp;(*_8)
119:46-119:87: @2.Call: _5 = RawWaker::new(move _6, move _7) -&gt; [return: bb3, unwind: bb20]
119:30-119:88: @3.Call: _4 = Waker::from_raw(move _5) -&gt; [return: bb4, unwind: bb20]
119:13-119:18: @4[1]: FakeRead(ForLet, _4)
120:47-120:53: @4[7]: _12 = &amp;_4
120:47-120:53: @4[8]: _11 = &amp;(*_12)
120:27-120:54: @4.Call: _10 = Context::from_waker(move _11) -&gt; [return: bb5, unwind: bb19]
120:13-120:24: @5[1]: FakeRead(ForLet, _10)"> |_| (),</span></span>
<span class="line"><span class="code even" style="--layer: 1" title="111:54-111:65: @0[2]: _3 = &amp;mut _1
111:35-111:66: @0.Call: _2 = Pin::&lt;&amp;mut F&gt;::new_unchecked(move _3) -&gt; [return: bb1, unwind: bb20]
111:13-111:23: @1[1]: FakeRead(ForLet, _2)
119:60-119:77: @1.Call: _6 = null::&lt;()&gt;() -&gt; [return: bb2, unwind: bb20]
119:80-119:86: @2[3]: _9 = const {alloc0: &amp;RawWakerVTable}
119:79-119:86: @2[4]: _8 = &amp;(*_9)
119:79-119:86: @2[5]: _7 = &amp;(*_8)
119:46-119:87: @2.Call: _5 = RawWaker::new(move _6, move _7) -&gt; [return: bb3, unwind: bb20]
119:30-119:88: @3.Call: _4 = Waker::from_raw(move _5) -&gt; [return: bb4, unwind: bb20]
119:13-119:18: @4[1]: FakeRead(ForLet, _4)
120:47-120:53: @4[7]: _12 = &amp;_4
120:47-120:53: @4[8]: _11 = &amp;(*_12)
120:27-120:54: @4.Call: _10 = Context::from_waker(move _11) -&gt; [return: bb5, unwind: bb19]
120:13-120:24: @5[1]: FakeRead(ForLet, _10)"> );</span></span>
<span class="line"><span class="code even" style="--layer: 1" title="111:54-111:65: @0[2]: _3 = &amp;mut _1
111:35-111:66: @0.Call: _2 = Pin::&lt;&amp;mut F&gt;::new_unchecked(move _3) -&gt; [return: bb1, unwind: bb20]
111:13-111:23: @1[1]: FakeRead(ForLet, _2)
119:60-119:77: @1.Call: _6 = null::&lt;()&gt;() -&gt; [return: bb2, unwind: bb20]
119:80-119:86: @2[3]: _9 = const {alloc0: &amp;RawWakerVTable}
119:79-119:86: @2[4]: _8 = &amp;(*_9)
119:79-119:86: @2[5]: _7 = &amp;(*_8)
119:46-119:87: @2.Call: _5 = RawWaker::new(move _6, move _7) -&gt; [return: bb3, unwind: bb20]
119:30-119:88: @3.Call: _4 = Waker::from_raw(move _5) -&gt; [return: bb4, unwind: bb20]
119:13-119:18: @4[1]: FakeRead(ForLet, _4)
120:47-120:53: @4[7]: _12 = &amp;_4
120:47-120:53: @4[8]: _11 = &amp;(*_12)
120:27-120:54: @4.Call: _10 = Context::from_waker(move _11) -&gt; [return: bb5, unwind: bb19]
120:13-120:24: @5[1]: FakeRead(ForLet, _10)"> let waker = unsafe { Waker::from_raw(RawWaker::new(core::ptr::null(), &amp;VTABLE)) };</span></span>
<span class="line"><span class="code even" style="--layer: 1" title="111:54-111:65: @0[2]: _3 = &amp;mut _1
111:35-111:66: @0.Call: _2 = Pin::&lt;&amp;mut F&gt;::new_unchecked(move _3) -&gt; [return: bb1, unwind: bb20]
111:13-111:23: @1[1]: FakeRead(ForLet, _2)
119:60-119:77: @1.Call: _6 = null::&lt;()&gt;() -&gt; [return: bb2, unwind: bb20]
119:80-119:86: @2[3]: _9 = const {alloc0: &amp;RawWakerVTable}
119:79-119:86: @2[4]: _8 = &amp;(*_9)
119:79-119:86: @2[5]: _7 = &amp;(*_8)
119:46-119:87: @2.Call: _5 = RawWaker::new(move _6, move _7) -&gt; [return: bb3, unwind: bb20]
119:30-119:88: @3.Call: _4 = Waker::from_raw(move _5) -&gt; [return: bb4, unwind: bb20]
119:13-119:18: @4[1]: FakeRead(ForLet, _4)
120:47-120:53: @4[7]: _12 = &amp;_4
120:47-120:53: @4[8]: _11 = &amp;(*_12)
120:27-120:54: @4.Call: _10 = Context::from_waker(move _11) -&gt; [return: bb5, unwind: bb19]
120:13-120:24: @5[1]: FakeRead(ForLet, _10)"> let mut context = Context::from_waker(&amp;waker)<span class="annotation">⦉@0,1,2,3,4,5</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"> loop {</span></span>
<span class="line"><span class="code" style="--layer: 0"> if let Poll::Ready(</span><span><span class="code odd" style="--layer: 1" title="120:32-120:35: @12[1]: _20 = move ((_14 as Ready).0: &lt;F as std::future::Future&gt;::Output)"><span class="annotation">@10,12,14,15,16,17⦊</span>val<span class="annotation">⦉@10,12,14,15,16,17</span></span></span><span class="code" style="--layer: 0">) = </span><span><span class="code even" style="--layer: 1" title="120:39-120:45: @7[3]: _16 = &amp;mut _2
120:39-120:54: @7.Call: _15 = Pin::&lt;&amp;mut F&gt;::as_mut(move _16) -&gt; [return: bb8, unwind: bb19]
120:60-120:72: @8[3]: _18 = &amp;mut _10
120:60-120:72: @8[4]: _17 = &amp;mut (*_18)
120:39-120:73: @8.Call: _14 = &lt;F as Future&gt;::poll(move _15, move _17) -&gt; [return: bb9, unwind: bb19]
120:39-120:73: @9[2]: FakeRead(ForMatchedPlace, _14)"><span class="annotation">@6,7,8,9⦊</span>future.as_mut().poll(&amp;mut context)<span class="annotation">⦉@6,7,8,9</span></span></span><span class="code" style="--layer: 0"> {</span></span>
<span class="line"><span class="code" style="--layer: 0"> break </span><span><span class="code odd" style="--layer: 1" title="121:23-121:26: @12[2]: _0 = move _20"><span class="annotation">@10,12,14,15,16,17⦊</span>val<span class="annotation">⦉@10,12,14,15,16,17</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 even" style="--layer: 1" title="122:14-122:14: @11[0]: _13 = const ()"><span class="annotation">@11,13⦊</span><span class="annotation">⦉@11,13</span></span></span><span class="code" style="--layer: 0"></span></span>
<span class="line"><span class="code" style="--layer: 0"> if let Poll::Ready(</span><span><span class="code odd" style="--layer: 1" title="123:32-123:35: @12[1]: _20 = move ((_14 as Ready).0: &lt;F as std::future::Future&gt;::Output)"><span class="annotation">@10,12,14,15,16,17⦊</span>val<span class="annotation">⦉@10,12,14,15,16,17</span></span></span><span class="code" style="--layer: 0">) = </span><span><span class="code even" style="--layer: 1" title="123:39-123:45: @7[3]: _16 = &amp;mut _2
123:39-123:54: @7.Call: _15 = Pin::&lt;&amp;mut F&gt;::as_mut(move _16) -&gt; [return: bb8, unwind: bb19]
123:60-123:72: @8[3]: _18 = &amp;mut _10
123:60-123:72: @8[4]: _17 = &amp;mut (*_18)
123:39-123:73: @8.Call: _14 = &lt;F as Future&gt;::poll(move _15, move _17) -&gt; [return: bb9, unwind: bb19]
123:39-123:73: @9[2]: FakeRead(ForMatchedPlace, _14)"><span class="annotation">@6,7,8,9⦊</span>future.as_mut().poll(&amp;mut context)<span class="annotation">⦉@6,7,8,9</span></span></span><span class="code" style="--layer: 0"> {</span></span>
<span class="line"><span class="code" style="--layer: 0"> break </span><span><span class="code odd" style="--layer: 1" title="124:23-124:26: @12[2]: _0 = move _20"><span class="annotation">@10,12,14,15,16,17⦊</span>val<span class="annotation">⦉@10,12,14,15,16,17</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 even" style="--layer: 1" title="125:14-125:14: @11[0]: _13 = const ()"><span class="annotation">@11,13⦊</span><span class="annotation">⦉@11,13</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 odd" style="--layer: 1" title="124:6-124:6: @17.Return: return"><span class="annotation">@10,12,14,15,16,17⦊</span><span class="annotation">⦉@10,12,14,15,16,17</span></span></span></span></div>
<span class="line"><span class="code" style="--layer: 0"> }</span><span><span class="code odd" style="--layer: 1" title="127:6-127:6: @17.Return: return"><span class="annotation">@10,12,14,15,16,17⦊</span><span class="annotation">⦉@10,12,14,15,16,17</span></span></span></span></div>
</body>
</html>

View File

@ -0,0 +1,79 @@
<!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.async/async.m-%7Bclosure%230%7D.-------.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>async.m-{closure#0} - 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 90"><span class="line"> <span><span class="code even" style="--layer: 1" title="91:25-91:34: @0[1]: _3 = (_1.0: u8)
91:25-91:34: @0[2]: FakeRead(ForLet, _3)
91:27-91:28: @0[4]: _4 = _3
91:27-91:32: @0[5]: _5 = CheckedSub(_4, const 1_u8)
91:27-91:32: @1[0]: _0 = move (_5.0: u8)
91:34-91:34: @1.Return: return"><span class="annotation">@0,1⦊</span>{ x - 1 }<span class="annotation">⦉@0,1</span></span></span></span></div>
</body>
</html>

View File

@ -0,0 +1,74 @@
<!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.async/async.m.-------.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>async.m - 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 90"><span class="line"><span><span class="code even" style="--layer: 1"><span class="annotation">@0,1⦊</span>async fn m(x: u8) -&gt; u8 <span class="annotation">⦉@0,1</span></span></span><span class="code" style="--layer: 0">{ x - 1 }</span></span></div>
</body>
</html>

View File

@ -69,101 +69,122 @@ For revisions in Pull Requests (PR):
</style>
</head>
<body>
<div class="code" style="counter-reset: line 90"><span class="line"><span><span class="code even" style="--layer: 1" title="92:13-92:18: @0.Call: _1 = g(const 10_u8) -&gt; [return: bb1, unwind: bb14]
93:13-93:17: @2.Call: _2 = h(const 9_usize) -&gt; [return: bb3, unwind: bb14]
94:31-94:35: @4.Call: _4 = i(const 8_u8) -&gt; [return: bb5, unwind: bb14]
94:22-94:36: @5.Call: _3 = Box::&lt;impl Future&gt;::pin(move _4) -&gt; [return: bb6, unwind: bb13]
94:9-94:19: @6[1]: FakeRead(ForLet, _3)
95:5-95:9: @6.Call: _5 = j(const 7_u8) -&gt; [return: bb7, unwind: bb12]
96:5-96:9: @7.Call: _6 = l(const 6_u8) -&gt; [return: bb8, unwind: bb12]
97:24-97:30: @8[4]: _9 = &amp;mut _3
97:24-97:39: @8.Call: _8 = Pin::&lt;Box&lt;impl Future&gt;&gt;::as_mut(move _9) -&gt; [return: bb9, unwind: bb12]
97:5-97:40: @9.Call: _7 = block_on::&lt;Pin&lt;&amp;mut impl Future&gt;&gt;(move _8) -&gt; [return: bb10, unwind: bb12]
91:11-98:2: @10[2]: _0 = const ()
98:2-98:2: @11.Return: return"><span class="annotation">@0,1,2,3,4,5,6,7,8,9,10,11⦊</span>fn main() {</span></span>
<span class="line"><span class="code even" style="--layer: 1" title="92:13-92:18: @0.Call: _1 = g(const 10_u8) -&gt; [return: bb1, unwind: bb14]
93:13-93:17: @2.Call: _2 = h(const 9_usize) -&gt; [return: bb3, unwind: bb14]
94:31-94:35: @4.Call: _4 = i(const 8_u8) -&gt; [return: bb5, unwind: bb14]
94:22-94:36: @5.Call: _3 = Box::&lt;impl Future&gt;::pin(move _4) -&gt; [return: bb6, unwind: bb13]
94:9-94:19: @6[1]: FakeRead(ForLet, _3)
95:5-95:9: @6.Call: _5 = j(const 7_u8) -&gt; [return: bb7, unwind: bb12]
96:5-96:9: @7.Call: _6 = l(const 6_u8) -&gt; [return: bb8, unwind: bb12]
97:24-97:30: @8[4]: _9 = &amp;mut _3
97:24-97:39: @8.Call: _8 = Pin::&lt;Box&lt;impl Future&gt;&gt;::as_mut(move _9) -&gt; [return: bb9, unwind: bb12]
97:5-97:40: @9.Call: _7 = block_on::&lt;Pin&lt;&amp;mut impl Future&gt;&gt;(move _8) -&gt; [return: bb10, unwind: bb12]
91:11-98:2: @10[2]: _0 = const ()
98:2-98:2: @11.Return: return"> let _ = g(10);</span></span>
<span class="line"><span class="code even" style="--layer: 1" title="92:13-92:18: @0.Call: _1 = g(const 10_u8) -&gt; [return: bb1, unwind: bb14]
93:13-93:17: @2.Call: _2 = h(const 9_usize) -&gt; [return: bb3, unwind: bb14]
94:31-94:35: @4.Call: _4 = i(const 8_u8) -&gt; [return: bb5, unwind: bb14]
94:22-94:36: @5.Call: _3 = Box::&lt;impl Future&gt;::pin(move _4) -&gt; [return: bb6, unwind: bb13]
94:9-94:19: @6[1]: FakeRead(ForLet, _3)
95:5-95:9: @6.Call: _5 = j(const 7_u8) -&gt; [return: bb7, unwind: bb12]
96:5-96:9: @7.Call: _6 = l(const 6_u8) -&gt; [return: bb8, unwind: bb12]
97:24-97:30: @8[4]: _9 = &amp;mut _3
97:24-97:39: @8.Call: _8 = Pin::&lt;Box&lt;impl Future&gt;&gt;::as_mut(move _9) -&gt; [return: bb9, unwind: bb12]
97:5-97:40: @9.Call: _7 = block_on::&lt;Pin&lt;&amp;mut impl Future&gt;&gt;(move _8) -&gt; [return: bb10, unwind: bb12]
91:11-98:2: @10[2]: _0 = const ()
98:2-98:2: @11.Return: return"> let _ = h(9);</span></span>
<span class="line"><span class="code even" style="--layer: 1" title="92:13-92:18: @0.Call: _1 = g(const 10_u8) -&gt; [return: bb1, unwind: bb14]
93:13-93:17: @2.Call: _2 = h(const 9_usize) -&gt; [return: bb3, unwind: bb14]
94:31-94:35: @4.Call: _4 = i(const 8_u8) -&gt; [return: bb5, unwind: bb14]
94:22-94:36: @5.Call: _3 = Box::&lt;impl Future&gt;::pin(move _4) -&gt; [return: bb6, unwind: bb13]
94:9-94:19: @6[1]: FakeRead(ForLet, _3)
95:5-95:9: @6.Call: _5 = j(const 7_u8) -&gt; [return: bb7, unwind: bb12]
96:5-96:9: @7.Call: _6 = l(const 6_u8) -&gt; [return: bb8, unwind: bb12]
97:24-97:30: @8[4]: _9 = &amp;mut _3
97:24-97:39: @8.Call: _8 = Pin::&lt;Box&lt;impl Future&gt;&gt;::as_mut(move _9) -&gt; [return: bb9, unwind: bb12]
97:5-97:40: @9.Call: _7 = block_on::&lt;Pin&lt;&amp;mut impl Future&gt;&gt;(move _8) -&gt; [return: bb10, unwind: bb12]
91:11-98:2: @10[2]: _0 = const ()
98:2-98:2: @11.Return: return"> let mut future = Box::pin(i(8));</span></span>
<span class="line"><span class="code even" style="--layer: 1" title="92:13-92:18: @0.Call: _1 = g(const 10_u8) -&gt; [return: bb1, unwind: bb14]
93:13-93:17: @2.Call: _2 = h(const 9_usize) -&gt; [return: bb3, unwind: bb14]
94:31-94:35: @4.Call: _4 = i(const 8_u8) -&gt; [return: bb5, unwind: bb14]
94:22-94:36: @5.Call: _3 = Box::&lt;impl Future&gt;::pin(move _4) -&gt; [return: bb6, unwind: bb13]
94:9-94:19: @6[1]: FakeRead(ForLet, _3)
95:5-95:9: @6.Call: _5 = j(const 7_u8) -&gt; [return: bb7, unwind: bb12]
96:5-96:9: @7.Call: _6 = l(const 6_u8) -&gt; [return: bb8, unwind: bb12]
97:24-97:30: @8[4]: _9 = &amp;mut _3
97:24-97:39: @8.Call: _8 = Pin::&lt;Box&lt;impl Future&gt;&gt;::as_mut(move _9) -&gt; [return: bb9, unwind: bb12]
97:5-97:40: @9.Call: _7 = block_on::&lt;Pin&lt;&amp;mut impl Future&gt;&gt;(move _8) -&gt; [return: bb10, unwind: bb12]
91:11-98:2: @10[2]: _0 = const ()
98:2-98:2: @11.Return: return"> j(7);</span></span>
<span class="line"><span class="code even" style="--layer: 1" title="92:13-92:18: @0.Call: _1 = g(const 10_u8) -&gt; [return: bb1, unwind: bb14]
93:13-93:17: @2.Call: _2 = h(const 9_usize) -&gt; [return: bb3, unwind: bb14]
94:31-94:35: @4.Call: _4 = i(const 8_u8) -&gt; [return: bb5, unwind: bb14]
94:22-94:36: @5.Call: _3 = Box::&lt;impl Future&gt;::pin(move _4) -&gt; [return: bb6, unwind: bb13]
94:9-94:19: @6[1]: FakeRead(ForLet, _3)
95:5-95:9: @6.Call: _5 = j(const 7_u8) -&gt; [return: bb7, unwind: bb12]
96:5-96:9: @7.Call: _6 = l(const 6_u8) -&gt; [return: bb8, unwind: bb12]
97:24-97:30: @8[4]: _9 = &amp;mut _3
97:24-97:39: @8.Call: _8 = Pin::&lt;Box&lt;impl Future&gt;&gt;::as_mut(move _9) -&gt; [return: bb9, unwind: bb12]
97:5-97:40: @9.Call: _7 = block_on::&lt;Pin&lt;&amp;mut impl Future&gt;&gt;(move _8) -&gt; [return: bb10, unwind: bb12]
91:11-98:2: @10[2]: _0 = const ()
98:2-98:2: @11.Return: return"> l(6);</span></span>
<span class="line"><span class="code even" style="--layer: 1" title="92:13-92:18: @0.Call: _1 = g(const 10_u8) -&gt; [return: bb1, unwind: bb14]
93:13-93:17: @2.Call: _2 = h(const 9_usize) -&gt; [return: bb3, unwind: bb14]
94:31-94:35: @4.Call: _4 = i(const 8_u8) -&gt; [return: bb5, unwind: bb14]
94:22-94:36: @5.Call: _3 = Box::&lt;impl Future&gt;::pin(move _4) -&gt; [return: bb6, unwind: bb13]
94:9-94:19: @6[1]: FakeRead(ForLet, _3)
95:5-95:9: @6.Call: _5 = j(const 7_u8) -&gt; [return: bb7, unwind: bb12]
96:5-96:9: @7.Call: _6 = l(const 6_u8) -&gt; [return: bb8, unwind: bb12]
97:24-97:30: @8[4]: _9 = &amp;mut _3
97:24-97:39: @8.Call: _8 = Pin::&lt;Box&lt;impl Future&gt;&gt;::as_mut(move _9) -&gt; [return: bb9, unwind: bb12]
97:5-97:40: @9.Call: _7 = block_on::&lt;Pin&lt;&amp;mut impl Future&gt;&gt;(move _8) -&gt; [return: bb10, unwind: bb12]
91:11-98:2: @10[2]: _0 = const ()
98:2-98:2: @11.Return: return"> executor::block_on(future.as_mut());</span></span>
<span class="line"><span class="code even" style="--layer: 1" title="92:13-92:18: @0.Call: _1 = g(const 10_u8) -&gt; [return: bb1, unwind: bb14]
93:13-93:17: @2.Call: _2 = h(const 9_usize) -&gt; [return: bb3, unwind: bb14]
94:31-94:35: @4.Call: _4 = i(const 8_u8) -&gt; [return: bb5, unwind: bb14]
94:22-94:36: @5.Call: _3 = Box::&lt;impl Future&gt;::pin(move _4) -&gt; [return: bb6, unwind: bb13]
94:9-94:19: @6[1]: FakeRead(ForLet, _3)
95:5-95:9: @6.Call: _5 = j(const 7_u8) -&gt; [return: bb7, unwind: bb12]
96:5-96:9: @7.Call: _6 = l(const 6_u8) -&gt; [return: bb8, unwind: bb12]
97:24-97:30: @8[4]: _9 = &amp;mut _3
97:24-97:39: @8.Call: _8 = Pin::&lt;Box&lt;impl Future&gt;&gt;::as_mut(move _9) -&gt; [return: bb9, unwind: bb12]
97:5-97:40: @9.Call: _7 = block_on::&lt;Pin&lt;&amp;mut impl Future&gt;&gt;(move _8) -&gt; [return: bb10, unwind: bb12]
91:11-98:2: @10[2]: _0 = const ()
98:2-98:2: @11.Return: return">}<span class="annotation">⦉@0,1,2,3,4,5,6,7,8,9,10,11</span></span></span></span></div>
<div class="code" style="counter-reset: line 92"><span class="line"><span><span class="code even" style="--layer: 1" title="94:13-94:18: @0.Call: _1 = g(const 10_u8) -&gt; [return: bb1, unwind: bb16]
95:13-95:17: @2.Call: _2 = h(const 9_usize) -&gt; [return: bb3, unwind: bb16]
96:31-96:35: @4.Call: _4 = i(const 8_u8) -&gt; [return: bb5, unwind: bb16]
96:22-96:36: @5.Call: _3 = Box::&lt;impl Future&gt;::pin(move _4) -&gt; [return: bb6, unwind: bb15]
96:9-96:19: @6[1]: FakeRead(ForLet, _3)
97:5-97:9: @6.Call: _5 = j(const 7_u8) -&gt; [return: bb7, unwind: bb14]
98:5-98:9: @7.Call: _6 = l(const 6_u8) -&gt; [return: bb8, unwind: bb14]
99:13-99:17: @8.Call: _7 = m(const 5_u8) -&gt; [return: bb9, unwind: bb14]
100:24-100:30: @10[4]: _10 = &amp;mut _3
100:24-100:39: @10.Call: _9 = Pin::&lt;Box&lt;impl Future&gt;&gt;::as_mut(move _10) -&gt; [return: bb11, unwind: bb14]
100:5-100:40: @11.Call: _8 = block_on::&lt;Pin&lt;&amp;mut impl Future&gt;&gt;(move _9) -&gt; [return: bb12, unwind: bb14]
93:11-101:2: @12[2]: _0 = const ()
101:2-101:2: @13.Return: return"><span class="annotation">@0,1,2,3,4,5,6,7,8,9,10,11,12,13⦊</span>fn main() {</span></span>
<span class="line"><span class="code even" style="--layer: 1" title="94:13-94:18: @0.Call: _1 = g(const 10_u8) -&gt; [return: bb1, unwind: bb16]
95:13-95:17: @2.Call: _2 = h(const 9_usize) -&gt; [return: bb3, unwind: bb16]
96:31-96:35: @4.Call: _4 = i(const 8_u8) -&gt; [return: bb5, unwind: bb16]
96:22-96:36: @5.Call: _3 = Box::&lt;impl Future&gt;::pin(move _4) -&gt; [return: bb6, unwind: bb15]
96:9-96:19: @6[1]: FakeRead(ForLet, _3)
97:5-97:9: @6.Call: _5 = j(const 7_u8) -&gt; [return: bb7, unwind: bb14]
98:5-98:9: @7.Call: _6 = l(const 6_u8) -&gt; [return: bb8, unwind: bb14]
99:13-99:17: @8.Call: _7 = m(const 5_u8) -&gt; [return: bb9, unwind: bb14]
100:24-100:30: @10[4]: _10 = &amp;mut _3
100:24-100:39: @10.Call: _9 = Pin::&lt;Box&lt;impl Future&gt;&gt;::as_mut(move _10) -&gt; [return: bb11, unwind: bb14]
100:5-100:40: @11.Call: _8 = block_on::&lt;Pin&lt;&amp;mut impl Future&gt;&gt;(move _9) -&gt; [return: bb12, unwind: bb14]
93:11-101:2: @12[2]: _0 = const ()
101:2-101:2: @13.Return: return"> let _ = g(10);</span></span>
<span class="line"><span class="code even" style="--layer: 1" title="94:13-94:18: @0.Call: _1 = g(const 10_u8) -&gt; [return: bb1, unwind: bb16]
95:13-95:17: @2.Call: _2 = h(const 9_usize) -&gt; [return: bb3, unwind: bb16]
96:31-96:35: @4.Call: _4 = i(const 8_u8) -&gt; [return: bb5, unwind: bb16]
96:22-96:36: @5.Call: _3 = Box::&lt;impl Future&gt;::pin(move _4) -&gt; [return: bb6, unwind: bb15]
96:9-96:19: @6[1]: FakeRead(ForLet, _3)
97:5-97:9: @6.Call: _5 = j(const 7_u8) -&gt; [return: bb7, unwind: bb14]
98:5-98:9: @7.Call: _6 = l(const 6_u8) -&gt; [return: bb8, unwind: bb14]
99:13-99:17: @8.Call: _7 = m(const 5_u8) -&gt; [return: bb9, unwind: bb14]
100:24-100:30: @10[4]: _10 = &amp;mut _3
100:24-100:39: @10.Call: _9 = Pin::&lt;Box&lt;impl Future&gt;&gt;::as_mut(move _10) -&gt; [return: bb11, unwind: bb14]
100:5-100:40: @11.Call: _8 = block_on::&lt;Pin&lt;&amp;mut impl Future&gt;&gt;(move _9) -&gt; [return: bb12, unwind: bb14]
93:11-101:2: @12[2]: _0 = const ()
101:2-101:2: @13.Return: return"> let _ = h(9);</span></span>
<span class="line"><span class="code even" style="--layer: 1" title="94:13-94:18: @0.Call: _1 = g(const 10_u8) -&gt; [return: bb1, unwind: bb16]
95:13-95:17: @2.Call: _2 = h(const 9_usize) -&gt; [return: bb3, unwind: bb16]
96:31-96:35: @4.Call: _4 = i(const 8_u8) -&gt; [return: bb5, unwind: bb16]
96:22-96:36: @5.Call: _3 = Box::&lt;impl Future&gt;::pin(move _4) -&gt; [return: bb6, unwind: bb15]
96:9-96:19: @6[1]: FakeRead(ForLet, _3)
97:5-97:9: @6.Call: _5 = j(const 7_u8) -&gt; [return: bb7, unwind: bb14]
98:5-98:9: @7.Call: _6 = l(const 6_u8) -&gt; [return: bb8, unwind: bb14]
99:13-99:17: @8.Call: _7 = m(const 5_u8) -&gt; [return: bb9, unwind: bb14]
100:24-100:30: @10[4]: _10 = &amp;mut _3
100:24-100:39: @10.Call: _9 = Pin::&lt;Box&lt;impl Future&gt;&gt;::as_mut(move _10) -&gt; [return: bb11, unwind: bb14]
100:5-100:40: @11.Call: _8 = block_on::&lt;Pin&lt;&amp;mut impl Future&gt;&gt;(move _9) -&gt; [return: bb12, unwind: bb14]
93:11-101:2: @12[2]: _0 = const ()
101:2-101:2: @13.Return: return"> let mut future = Box::pin(i(8));</span></span>
<span class="line"><span class="code even" style="--layer: 1" title="94:13-94:18: @0.Call: _1 = g(const 10_u8) -&gt; [return: bb1, unwind: bb16]
95:13-95:17: @2.Call: _2 = h(const 9_usize) -&gt; [return: bb3, unwind: bb16]
96:31-96:35: @4.Call: _4 = i(const 8_u8) -&gt; [return: bb5, unwind: bb16]
96:22-96:36: @5.Call: _3 = Box::&lt;impl Future&gt;::pin(move _4) -&gt; [return: bb6, unwind: bb15]
96:9-96:19: @6[1]: FakeRead(ForLet, _3)
97:5-97:9: @6.Call: _5 = j(const 7_u8) -&gt; [return: bb7, unwind: bb14]
98:5-98:9: @7.Call: _6 = l(const 6_u8) -&gt; [return: bb8, unwind: bb14]
99:13-99:17: @8.Call: _7 = m(const 5_u8) -&gt; [return: bb9, unwind: bb14]
100:24-100:30: @10[4]: _10 = &amp;mut _3
100:24-100:39: @10.Call: _9 = Pin::&lt;Box&lt;impl Future&gt;&gt;::as_mut(move _10) -&gt; [return: bb11, unwind: bb14]
100:5-100:40: @11.Call: _8 = block_on::&lt;Pin&lt;&amp;mut impl Future&gt;&gt;(move _9) -&gt; [return: bb12, unwind: bb14]
93:11-101:2: @12[2]: _0 = const ()
101:2-101:2: @13.Return: return"> j(7);</span></span>
<span class="line"><span class="code even" style="--layer: 1" title="94:13-94:18: @0.Call: _1 = g(const 10_u8) -&gt; [return: bb1, unwind: bb16]
95:13-95:17: @2.Call: _2 = h(const 9_usize) -&gt; [return: bb3, unwind: bb16]
96:31-96:35: @4.Call: _4 = i(const 8_u8) -&gt; [return: bb5, unwind: bb16]
96:22-96:36: @5.Call: _3 = Box::&lt;impl Future&gt;::pin(move _4) -&gt; [return: bb6, unwind: bb15]
96:9-96:19: @6[1]: FakeRead(ForLet, _3)
97:5-97:9: @6.Call: _5 = j(const 7_u8) -&gt; [return: bb7, unwind: bb14]
98:5-98:9: @7.Call: _6 = l(const 6_u8) -&gt; [return: bb8, unwind: bb14]
99:13-99:17: @8.Call: _7 = m(const 5_u8) -&gt; [return: bb9, unwind: bb14]
100:24-100:30: @10[4]: _10 = &amp;mut _3
100:24-100:39: @10.Call: _9 = Pin::&lt;Box&lt;impl Future&gt;&gt;::as_mut(move _10) -&gt; [return: bb11, unwind: bb14]
100:5-100:40: @11.Call: _8 = block_on::&lt;Pin&lt;&amp;mut impl Future&gt;&gt;(move _9) -&gt; [return: bb12, unwind: bb14]
93:11-101:2: @12[2]: _0 = const ()
101:2-101:2: @13.Return: return"> l(6);</span></span>
<span class="line"><span class="code even" style="--layer: 1" title="94:13-94:18: @0.Call: _1 = g(const 10_u8) -&gt; [return: bb1, unwind: bb16]
95:13-95:17: @2.Call: _2 = h(const 9_usize) -&gt; [return: bb3, unwind: bb16]
96:31-96:35: @4.Call: _4 = i(const 8_u8) -&gt; [return: bb5, unwind: bb16]
96:22-96:36: @5.Call: _3 = Box::&lt;impl Future&gt;::pin(move _4) -&gt; [return: bb6, unwind: bb15]
96:9-96:19: @6[1]: FakeRead(ForLet, _3)
97:5-97:9: @6.Call: _5 = j(const 7_u8) -&gt; [return: bb7, unwind: bb14]
98:5-98:9: @7.Call: _6 = l(const 6_u8) -&gt; [return: bb8, unwind: bb14]
99:13-99:17: @8.Call: _7 = m(const 5_u8) -&gt; [return: bb9, unwind: bb14]
100:24-100:30: @10[4]: _10 = &amp;mut _3
100:24-100:39: @10.Call: _9 = Pin::&lt;Box&lt;impl Future&gt;&gt;::as_mut(move _10) -&gt; [return: bb11, unwind: bb14]
100:5-100:40: @11.Call: _8 = block_on::&lt;Pin&lt;&amp;mut impl Future&gt;&gt;(move _9) -&gt; [return: bb12, unwind: bb14]
93:11-101:2: @12[2]: _0 = const ()
101:2-101:2: @13.Return: return"> let _ = m(5);</span></span>
<span class="line"><span class="code even" style="--layer: 1" title="94:13-94:18: @0.Call: _1 = g(const 10_u8) -&gt; [return: bb1, unwind: bb16]
95:13-95:17: @2.Call: _2 = h(const 9_usize) -&gt; [return: bb3, unwind: bb16]
96:31-96:35: @4.Call: _4 = i(const 8_u8) -&gt; [return: bb5, unwind: bb16]
96:22-96:36: @5.Call: _3 = Box::&lt;impl Future&gt;::pin(move _4) -&gt; [return: bb6, unwind: bb15]
96:9-96:19: @6[1]: FakeRead(ForLet, _3)
97:5-97:9: @6.Call: _5 = j(const 7_u8) -&gt; [return: bb7, unwind: bb14]
98:5-98:9: @7.Call: _6 = l(const 6_u8) -&gt; [return: bb8, unwind: bb14]
99:13-99:17: @8.Call: _7 = m(const 5_u8) -&gt; [return: bb9, unwind: bb14]
100:24-100:30: @10[4]: _10 = &amp;mut _3
100:24-100:39: @10.Call: _9 = Pin::&lt;Box&lt;impl Future&gt;&gt;::as_mut(move _10) -&gt; [return: bb11, unwind: bb14]
100:5-100:40: @11.Call: _8 = block_on::&lt;Pin&lt;&amp;mut impl Future&gt;&gt;(move _9) -&gt; [return: bb12, unwind: bb14]
93:11-101:2: @12[2]: _0 = const ()
101:2-101:2: @13.Return: return"> executor::block_on(future.as_mut());</span></span>
<span class="line"><span class="code even" style="--layer: 1" title="94:13-94:18: @0.Call: _1 = g(const 10_u8) -&gt; [return: bb1, unwind: bb16]
95:13-95:17: @2.Call: _2 = h(const 9_usize) -&gt; [return: bb3, unwind: bb16]
96:31-96:35: @4.Call: _4 = i(const 8_u8) -&gt; [return: bb5, unwind: bb16]
96:22-96:36: @5.Call: _3 = Box::&lt;impl Future&gt;::pin(move _4) -&gt; [return: bb6, unwind: bb15]
96:9-96:19: @6[1]: FakeRead(ForLet, _3)
97:5-97:9: @6.Call: _5 = j(const 7_u8) -&gt; [return: bb7, unwind: bb14]
98:5-98:9: @7.Call: _6 = l(const 6_u8) -&gt; [return: bb8, unwind: bb14]
99:13-99:17: @8.Call: _7 = m(const 5_u8) -&gt; [return: bb9, unwind: bb14]
100:24-100:30: @10[4]: _10 = &amp;mut _3
100:24-100:39: @10.Call: _9 = Pin::&lt;Box&lt;impl Future&gt;&gt;::as_mut(move _10) -&gt; [return: bb11, unwind: bb14]
100:5-100:40: @11.Call: _8 = block_on::&lt;Pin&lt;&amp;mut impl Future&gt;&gt;(move _9) -&gt; [return: bb12, unwind: bb14]
93:11-101:2: @12[2]: _0 = const ()
101:2-101:2: @13.Return: return">}<span class="annotation">⦉@0,1,2,3,4,5,6,7,8,9,10,11,12,13</span></span></span></span></div>
</body>
</html>

View File

@ -0,0 +1,151 @@
<!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.uses_crate/uses_crate.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>uses_crate.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 4"><span class="line"><span><span class="code even" style="--layer: 1" title="6:5-6:32: @0.Call: _1 = used_function() -&gt; [return: bb1, unwind: bb12]
7:20-7:36: @1[5]: _5 = Box([i32; 4])
7:20-7:36: @1[6]: (*_5) = [const 1_i32, const 2_i32, const 3_i32, const 4_i32]
7:20-7:36: @1[7]: _4 = move _5
7:20-7:36: @1[8]: _3 = move _4 as std::boxed::Box&lt;[i32]&gt; (Pointer(Unsize))
7:20-7:36: @3.Call: _2 = slice::&lt;impl [i32]&gt;::into_vec::&lt;std::alloc::Global&gt;(move _3) -&gt; [return: bb4, unwind: bb11]
7:9-7:17: @4[1]: FakeRead(ForLet, _2)
8:39-8:48: @4[4]: _7 = &amp;_2
8:5-8:49: @4.Call: _6 = used_generic_function::&lt;&amp;Vec&lt;i32&gt;&gt;(move _7) -&gt; [return: bb5, unwind: bb9]
9:45-9:53: @5[4]: _9 = move _2
9:5-9:54: @5.Call: _8 = used_twice_generic_function::&lt;Vec&lt;i32&gt;&gt;(move _9) -&gt; [return: bb6, unwind: bb8]
5:11-10:2: @6[2]: _0 = const ()
10:2-10:2: @7.Return: return"><span class="annotation">@0,1,2,3,4,5,6,7⦊</span>fn main() {</span></span>
<span class="line"><span class="code even" style="--layer: 1" title="6:5-6:32: @0.Call: _1 = used_function() -&gt; [return: bb1, unwind: bb12]
7:20-7:36: @1[5]: _5 = Box([i32; 4])
7:20-7:36: @1[6]: (*_5) = [const 1_i32, const 2_i32, const 3_i32, const 4_i32]
7:20-7:36: @1[7]: _4 = move _5
7:20-7:36: @1[8]: _3 = move _4 as std::boxed::Box&lt;[i32]&gt; (Pointer(Unsize))
7:20-7:36: @3.Call: _2 = slice::&lt;impl [i32]&gt;::into_vec::&lt;std::alloc::Global&gt;(move _3) -&gt; [return: bb4, unwind: bb11]
7:9-7:17: @4[1]: FakeRead(ForLet, _2)
8:39-8:48: @4[4]: _7 = &amp;_2
8:5-8:49: @4.Call: _6 = used_generic_function::&lt;&amp;Vec&lt;i32&gt;&gt;(move _7) -&gt; [return: bb5, unwind: bb9]
9:45-9:53: @5[4]: _9 = move _2
9:5-9:54: @5.Call: _8 = used_twice_generic_function::&lt;Vec&lt;i32&gt;&gt;(move _9) -&gt; [return: bb6, unwind: bb8]
5:11-10:2: @6[2]: _0 = const ()
10:2-10:2: @7.Return: return"> used_crate::used_function();</span></span>
<span class="line"><span class="code even" style="--layer: 1" title="6:5-6:32: @0.Call: _1 = used_function() -&gt; [return: bb1, unwind: bb12]
7:20-7:36: @1[5]: _5 = Box([i32; 4])
7:20-7:36: @1[6]: (*_5) = [const 1_i32, const 2_i32, const 3_i32, const 4_i32]
7:20-7:36: @1[7]: _4 = move _5
7:20-7:36: @1[8]: _3 = move _4 as std::boxed::Box&lt;[i32]&gt; (Pointer(Unsize))
7:20-7:36: @3.Call: _2 = slice::&lt;impl [i32]&gt;::into_vec::&lt;std::alloc::Global&gt;(move _3) -&gt; [return: bb4, unwind: bb11]
7:9-7:17: @4[1]: FakeRead(ForLet, _2)
8:39-8:48: @4[4]: _7 = &amp;_2
8:5-8:49: @4.Call: _6 = used_generic_function::&lt;&amp;Vec&lt;i32&gt;&gt;(move _7) -&gt; [return: bb5, unwind: bb9]
9:45-9:53: @5[4]: _9 = move _2
9:5-9:54: @5.Call: _8 = used_twice_generic_function::&lt;Vec&lt;i32&gt;&gt;(move _9) -&gt; [return: bb6, unwind: bb8]
5:11-10:2: @6[2]: _0 = const ()
10:2-10:2: @7.Return: return"> let some_vec = vec![1, 2, 3, 4];</span></span>
<span class="line"><span class="code even" style="--layer: 1" title="6:5-6:32: @0.Call: _1 = used_function() -&gt; [return: bb1, unwind: bb12]
7:20-7:36: @1[5]: _5 = Box([i32; 4])
7:20-7:36: @1[6]: (*_5) = [const 1_i32, const 2_i32, const 3_i32, const 4_i32]
7:20-7:36: @1[7]: _4 = move _5
7:20-7:36: @1[8]: _3 = move _4 as std::boxed::Box&lt;[i32]&gt; (Pointer(Unsize))
7:20-7:36: @3.Call: _2 = slice::&lt;impl [i32]&gt;::into_vec::&lt;std::alloc::Global&gt;(move _3) -&gt; [return: bb4, unwind: bb11]
7:9-7:17: @4[1]: FakeRead(ForLet, _2)
8:39-8:48: @4[4]: _7 = &amp;_2
8:5-8:49: @4.Call: _6 = used_generic_function::&lt;&amp;Vec&lt;i32&gt;&gt;(move _7) -&gt; [return: bb5, unwind: bb9]
9:45-9:53: @5[4]: _9 = move _2
9:5-9:54: @5.Call: _8 = used_twice_generic_function::&lt;Vec&lt;i32&gt;&gt;(move _9) -&gt; [return: bb6, unwind: bb8]
5:11-10:2: @6[2]: _0 = const ()
10:2-10:2: @7.Return: return"> used_crate::used_generic_function(&amp;some_vec);</span></span>
<span class="line"><span class="code even" style="--layer: 1" title="6:5-6:32: @0.Call: _1 = used_function() -&gt; [return: bb1, unwind: bb12]
7:20-7:36: @1[5]: _5 = Box([i32; 4])
7:20-7:36: @1[6]: (*_5) = [const 1_i32, const 2_i32, const 3_i32, const 4_i32]
7:20-7:36: @1[7]: _4 = move _5
7:20-7:36: @1[8]: _3 = move _4 as std::boxed::Box&lt;[i32]&gt; (Pointer(Unsize))
7:20-7:36: @3.Call: _2 = slice::&lt;impl [i32]&gt;::into_vec::&lt;std::alloc::Global&gt;(move _3) -&gt; [return: bb4, unwind: bb11]
7:9-7:17: @4[1]: FakeRead(ForLet, _2)
8:39-8:48: @4[4]: _7 = &amp;_2
8:5-8:49: @4.Call: _6 = used_generic_function::&lt;&amp;Vec&lt;i32&gt;&gt;(move _7) -&gt; [return: bb5, unwind: bb9]
9:45-9:53: @5[4]: _9 = move _2
9:5-9:54: @5.Call: _8 = used_twice_generic_function::&lt;Vec&lt;i32&gt;&gt;(move _9) -&gt; [return: bb6, unwind: bb8]
5:11-10:2: @6[2]: _0 = const ()
10:2-10:2: @7.Return: return"> used_crate::used_twice_generic_function(some_vec);</span></span>
<span class="line"><span class="code even" style="--layer: 1" title="6:5-6:32: @0.Call: _1 = used_function() -&gt; [return: bb1, unwind: bb12]
7:20-7:36: @1[5]: _5 = Box([i32; 4])
7:20-7:36: @1[6]: (*_5) = [const 1_i32, const 2_i32, const 3_i32, const 4_i32]
7:20-7:36: @1[7]: _4 = move _5
7:20-7:36: @1[8]: _3 = move _4 as std::boxed::Box&lt;[i32]&gt; (Pointer(Unsize))
7:20-7:36: @3.Call: _2 = slice::&lt;impl [i32]&gt;::into_vec::&lt;std::alloc::Global&gt;(move _3) -&gt; [return: bb4, unwind: bb11]
7:9-7:17: @4[1]: FakeRead(ForLet, _2)
8:39-8:48: @4[4]: _7 = &amp;_2
8:5-8:49: @4.Call: _6 = used_generic_function::&lt;&amp;Vec&lt;i32&gt;&gt;(move _7) -&gt; [return: bb5, unwind: bb9]
9:45-9:53: @5[4]: _9 = move _2
9:5-9:54: @5.Call: _8 = used_twice_generic_function::&lt;Vec&lt;i32&gt;&gt;(move _9) -&gt; [return: bb6, unwind: bb8]
5:11-10:2: @6[2]: _0 = const ()
10:2-10:2: @7.Return: return">}<span class="annotation">⦉@0,1,2,3,4,5,6,7</span></span></span></span></div>
</body>
</html>

View File

@ -0,0 +1,119 @@
<!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.uses_crate/uses_crate.used_crate-unused_function.-------.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>uses_crate.used_crate-unused_function - 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 28"><span class="line"><span><span class="code even" style="--layer: 1" title="30:19-30:35: @0.Call: _4 = args() -&gt; [return: bb1, unwind: bb9]
30:19-30:35: @1[0]: _3 = &amp;_4
30:19-30:41: @1.Call: _2 = &lt;Args as ExactSizeIterator&gt;::len(move _3) -&gt; [return: bb2, unwind: bb8]
30:19-30:46: @2[1]: _1 = Eq(move _2, const 1_usize)
30:9-30:16: @2[3]: FakeRead(ForLet, _1)
31:25-31:26: @3[2]: _5 = const 2_i32
31:9-31:22: @3[3]: FakeRead(ForLet, _5)
32:9-32:16: @3[6]: _7 = _1
32:8-32:16: @3[7]: _6 = Not(move _7)
32:8-32:16: @3[9]: FakeRead(ForMatchedPlace, _6)"><span class="annotation">@0,1,2,3⦊</span>pub fn unused_function() {</span></span>
<span class="line"><span class="code even" style="--layer: 1" title="30:19-30:35: @0.Call: _4 = args() -&gt; [return: bb1, unwind: bb9]
30:19-30:35: @1[0]: _3 = &amp;_4
30:19-30:41: @1.Call: _2 = &lt;Args as ExactSizeIterator&gt;::len(move _3) -&gt; [return: bb2, unwind: bb8]
30:19-30:46: @2[1]: _1 = Eq(move _2, const 1_usize)
30:9-30:16: @2[3]: FakeRead(ForLet, _1)
31:25-31:26: @3[2]: _5 = const 2_i32
31:9-31:22: @3[3]: FakeRead(ForLet, _5)
32:9-32:16: @3[6]: _7 = _1
32:8-32:16: @3[7]: _6 = Not(move _7)
32:8-32:16: @3[9]: FakeRead(ForMatchedPlace, _6)"> let is_true = std::env::args().len() == 1;</span></span>
<span class="line"><span class="code even" style="--layer: 1" title="30:19-30:35: @0.Call: _4 = args() -&gt; [return: bb1, unwind: bb9]
30:19-30:35: @1[0]: _3 = &amp;_4
30:19-30:41: @1.Call: _2 = &lt;Args as ExactSizeIterator&gt;::len(move _3) -&gt; [return: bb2, unwind: bb8]
30:19-30:46: @2[1]: _1 = Eq(move _2, const 1_usize)
30:9-30:16: @2[3]: FakeRead(ForLet, _1)
31:25-31:26: @3[2]: _5 = const 2_i32
31:9-31:22: @3[3]: FakeRead(ForLet, _5)
32:9-32:16: @3[6]: _7 = _1
32:8-32:16: @3[7]: _6 = Not(move _7)
32:8-32:16: @3[9]: FakeRead(ForMatchedPlace, _6)"> let mut countdown = 2;</span></span>
<span class="line"><span class="code even" style="--layer: 1" title="30:19-30:35: @0.Call: _4 = args() -&gt; [return: bb1, unwind: bb9]
30:19-30:35: @1[0]: _3 = &amp;_4
30:19-30:41: @1.Call: _2 = &lt;Args as ExactSizeIterator&gt;::len(move _3) -&gt; [return: bb2, unwind: bb8]
30:19-30:46: @2[1]: _1 = Eq(move _2, const 1_usize)
30:9-30:16: @2[3]: FakeRead(ForLet, _1)
31:25-31:26: @3[2]: _5 = const 2_i32
31:9-31:22: @3[3]: FakeRead(ForLet, _5)
32:9-32:16: @3[6]: _7 = _1
32:8-32:16: @3[7]: _6 = Not(move _7)
32:8-32:16: @3[9]: FakeRead(ForMatchedPlace, _6)"> 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="33:9-33:23: @6[0]: _5 = const 20_i32
32:17-34:6: @6[1]: _0 = const ()"><span class="annotation">@4,6⦊</span>{</span></span>
<span class="line"><span class="code odd" style="--layer: 1" title="33:9-33:23: @6[0]: _5 = const 20_i32
32:17-34:6: @6[1]: _0 = const ()"> countdown = 20;</span></span>
<span class="line"><span class="code odd" style="--layer: 1" title="33:9-33:23: @6[0]: _5 = const 20_i32
32:17-34:6: @6[1]: _0 = const ()"> }<span class="annotation">⦉@4,6</span></span></span><span><span class="code even" style="--layer: 1" title="34:6-34: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>
<span class="line"><span class="code" style="--layer: 0">}</span><span><span class="code odd" style="--layer: 1" title="35:2-35:2: @7.Return: return"><span class="annotation">@7⦊</span><span class="annotation">⦉@7</span></span></span></span></div>
</body>
</html>

View File

@ -0,0 +1,133 @@
<!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.uses_crate/uses_crate.used_crate-unused_generic_function.-------.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>uses_crate.used_crate-unused_generic_function - 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 24"><span class="line"><span><span class="code even" style="--layer: 1" title="26:14-26:49: @0[6]: _19 = const unused_generic_function::&lt;T&gt;::promoted[0]
26:14-26:49: @0[7]: _7 = &amp;(*_19)
26:14-26:49: @0[8]: _6 = &amp;(*_7)
26:14-26:49: @0[9]: _5 = move _6 as &amp;[&amp;str] (Pointer(Unsize))
26:51-26:54: @0[17]: _14 = &amp;_1
26:5-26:56: @0[18]: _13 = (move _14,)
26:5-26:56: @0[20]: FakeRead(ForMatchedPlace, _13)
26:5-26:56: @0[22]: _15 = (_13.0: &amp;T)
26:5-26:56: @0[25]: _17 = &amp;(*_15)
26:5-26:56: @0[27]: _18 = &lt;T as Debug&gt;::fmt as for&lt;&#39;r, &#39;s, &#39;t0&gt; fn(&amp;&#39;r T, &amp;&#39;s mut std::fmt::Formatter&lt;&#39;t0&gt;) -&gt; std::result::Result&lt;(), std::fmt::Error&gt; (Pointer(ReifyFnPointer))
26:5-26:56: @0.Call: _16 = ArgumentV1::new::&lt;T&gt;(move _17, move _18) -&gt; [return: bb1, unwind: bb5]
26:5-26:56: @1[2]: _12 = [move _16]
26:5-26:56: @1[5]: _11 = &amp;_12
26:5-26:56: @1[6]: _10 = &amp;(*_11)
26:5-26:56: @1[7]: _9 = move _10 as &amp;[std::fmt::ArgumentV1] (Pointer(Unsize))
26:5-26:56: @1.Call: _4 = Arguments::new_v1(move _5, move _9) -&gt; [return: bb2, unwind: bb5]
26:5-26:56: @2.Call: _3 = _print(move _4) -&gt; [return: bb3, unwind: bb5]
26:5-26:56: @3[6]: _2 = const ()
25:50-27:2: @3[8]: _0 = const ()
27:2-27:2: @4.Return: return"><span class="annotation">@0,1,2,3,4⦊</span>pub fn unused_generic_function&lt;T: Debug&gt;(arg: T) {</span></span>
<span class="line"><span class="code even" style="--layer: 1" title="26:14-26:49: @0[6]: _19 = const unused_generic_function::&lt;T&gt;::promoted[0]
26:14-26:49: @0[7]: _7 = &amp;(*_19)
26:14-26:49: @0[8]: _6 = &amp;(*_7)
26:14-26:49: @0[9]: _5 = move _6 as &amp;[&amp;str] (Pointer(Unsize))
26:51-26:54: @0[17]: _14 = &amp;_1
26:5-26:56: @0[18]: _13 = (move _14,)
26:5-26:56: @0[20]: FakeRead(ForMatchedPlace, _13)
26:5-26:56: @0[22]: _15 = (_13.0: &amp;T)
26:5-26:56: @0[25]: _17 = &amp;(*_15)
26:5-26:56: @0[27]: _18 = &lt;T as Debug&gt;::fmt as for&lt;&#39;r, &#39;s, &#39;t0&gt; fn(&amp;&#39;r T, &amp;&#39;s mut std::fmt::Formatter&lt;&#39;t0&gt;) -&gt; std::result::Result&lt;(), std::fmt::Error&gt; (Pointer(ReifyFnPointer))
26:5-26:56: @0.Call: _16 = ArgumentV1::new::&lt;T&gt;(move _17, move _18) -&gt; [return: bb1, unwind: bb5]
26:5-26:56: @1[2]: _12 = [move _16]
26:5-26:56: @1[5]: _11 = &amp;_12
26:5-26:56: @1[6]: _10 = &amp;(*_11)
26:5-26:56: @1[7]: _9 = move _10 as &amp;[std::fmt::ArgumentV1] (Pointer(Unsize))
26:5-26:56: @1.Call: _4 = Arguments::new_v1(move _5, move _9) -&gt; [return: bb2, unwind: bb5]
26:5-26:56: @2.Call: _3 = _print(move _4) -&gt; [return: bb3, unwind: bb5]
26:5-26:56: @3[6]: _2 = const ()
25:50-27:2: @3[8]: _0 = const ()
27:2-27:2: @4.Return: return"> println!("unused_generic_function with {:?}", arg);</span></span>
<span class="line"><span class="code even" style="--layer: 1" title="26:14-26:49: @0[6]: _19 = const unused_generic_function::&lt;T&gt;::promoted[0]
26:14-26:49: @0[7]: _7 = &amp;(*_19)
26:14-26:49: @0[8]: _6 = &amp;(*_7)
26:14-26:49: @0[9]: _5 = move _6 as &amp;[&amp;str] (Pointer(Unsize))
26:51-26:54: @0[17]: _14 = &amp;_1
26:5-26:56: @0[18]: _13 = (move _14,)
26:5-26:56: @0[20]: FakeRead(ForMatchedPlace, _13)
26:5-26:56: @0[22]: _15 = (_13.0: &amp;T)
26:5-26:56: @0[25]: _17 = &amp;(*_15)
26:5-26:56: @0[27]: _18 = &lt;T as Debug&gt;::fmt as for&lt;&#39;r, &#39;s, &#39;t0&gt; fn(&amp;&#39;r T, &amp;&#39;s mut std::fmt::Formatter&lt;&#39;t0&gt;) -&gt; std::result::Result&lt;(), std::fmt::Error&gt; (Pointer(ReifyFnPointer))
26:5-26:56: @0.Call: _16 = ArgumentV1::new::&lt;T&gt;(move _17, move _18) -&gt; [return: bb1, unwind: bb5]
26:5-26:56: @1[2]: _12 = [move _16]
26:5-26:56: @1[5]: _11 = &amp;_12
26:5-26:56: @1[6]: _10 = &amp;(*_11)
26:5-26:56: @1[7]: _9 = move _10 as &amp;[std::fmt::ArgumentV1] (Pointer(Unsize))
26:5-26:56: @1.Call: _4 = Arguments::new_v1(move _5, move _9) -&gt; [return: bb2, unwind: bb5]
26:5-26:56: @2.Call: _3 = _print(move _4) -&gt; [return: bb3, unwind: bb5]
26:5-26:56: @3[6]: _2 = const ()
25:50-27:2: @3[8]: _0 = const ()
27:2-27:2: @4.Return: return">}<span class="annotation">⦉@0,1,2,3,4</span></span></span></span></div>
</body>
</html>

View File

@ -0,0 +1,119 @@
<!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.uses_crate/uses_crate.used_crate-unused_private_function.-------.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>uses_crate.used_crate-unused_private_function - 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 36"><span class="line"><span><span class="code even" style="--layer: 1" title="38:19-38:35: @0.Call: _4 = args() -&gt; [return: bb1, unwind: bb9]
38:19-38:35: @1[0]: _3 = &amp;_4
38:19-38:41: @1.Call: _2 = &lt;Args as ExactSizeIterator&gt;::len(move _3) -&gt; [return: bb2, unwind: bb8]
38:19-38:46: @2[1]: _1 = Eq(move _2, const 1_usize)
38:9-38:16: @2[3]: FakeRead(ForLet, _1)
39:25-39:26: @3[2]: _5 = const 2_i32
39:9-39:22: @3[3]: FakeRead(ForLet, _5)
40:9-40:16: @3[6]: _7 = _1
40:8-40:16: @3[7]: _6 = Not(move _7)
40:8-40:16: @3[9]: FakeRead(ForMatchedPlace, _6)"><span class="annotation">@0,1,2,3⦊</span>fn unused_private_function() {</span></span>
<span class="line"><span class="code even" style="--layer: 1" title="38:19-38:35: @0.Call: _4 = args() -&gt; [return: bb1, unwind: bb9]
38:19-38:35: @1[0]: _3 = &amp;_4
38:19-38:41: @1.Call: _2 = &lt;Args as ExactSizeIterator&gt;::len(move _3) -&gt; [return: bb2, unwind: bb8]
38:19-38:46: @2[1]: _1 = Eq(move _2, const 1_usize)
38:9-38:16: @2[3]: FakeRead(ForLet, _1)
39:25-39:26: @3[2]: _5 = const 2_i32
39:9-39:22: @3[3]: FakeRead(ForLet, _5)
40:9-40:16: @3[6]: _7 = _1
40:8-40:16: @3[7]: _6 = Not(move _7)
40:8-40:16: @3[9]: FakeRead(ForMatchedPlace, _6)"> let is_true = std::env::args().len() == 1;</span></span>
<span class="line"><span class="code even" style="--layer: 1" title="38:19-38:35: @0.Call: _4 = args() -&gt; [return: bb1, unwind: bb9]
38:19-38:35: @1[0]: _3 = &amp;_4
38:19-38:41: @1.Call: _2 = &lt;Args as ExactSizeIterator&gt;::len(move _3) -&gt; [return: bb2, unwind: bb8]
38:19-38:46: @2[1]: _1 = Eq(move _2, const 1_usize)
38:9-38:16: @2[3]: FakeRead(ForLet, _1)
39:25-39:26: @3[2]: _5 = const 2_i32
39:9-39:22: @3[3]: FakeRead(ForLet, _5)
40:9-40:16: @3[6]: _7 = _1
40:8-40:16: @3[7]: _6 = Not(move _7)
40:8-40:16: @3[9]: FakeRead(ForMatchedPlace, _6)"> let mut countdown = 2;</span></span>
<span class="line"><span class="code even" style="--layer: 1" title="38:19-38:35: @0.Call: _4 = args() -&gt; [return: bb1, unwind: bb9]
38:19-38:35: @1[0]: _3 = &amp;_4
38:19-38:41: @1.Call: _2 = &lt;Args as ExactSizeIterator&gt;::len(move _3) -&gt; [return: bb2, unwind: bb8]
38:19-38:46: @2[1]: _1 = Eq(move _2, const 1_usize)
38:9-38:16: @2[3]: FakeRead(ForLet, _1)
39:25-39:26: @3[2]: _5 = const 2_i32
39:9-39:22: @3[3]: FakeRead(ForLet, _5)
40:9-40:16: @3[6]: _7 = _1
40:8-40:16: @3[7]: _6 = Not(move _7)
40:8-40:16: @3[9]: FakeRead(ForMatchedPlace, _6)"> 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="41:9-41:23: @6[0]: _5 = const 20_i32
40:17-42:6: @6[1]: _0 = const ()"><span class="annotation">@4,6⦊</span>{</span></span>
<span class="line"><span class="code odd" style="--layer: 1" title="41:9-41:23: @6[0]: _5 = const 20_i32
40:17-42:6: @6[1]: _0 = const ()"> countdown = 20;</span></span>
<span class="line"><span class="code odd" style="--layer: 1" title="41:9-41:23: @6[0]: _5 = const 20_i32
40:17-42:6: @6[1]: _0 = const ()"> }<span class="annotation">⦉@4,6</span></span></span><span><span class="code even" style="--layer: 1" title="42:6-42: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>
<span class="line"><span class="code" style="--layer: 0">}</span><span><span class="code odd" style="--layer: 1" title="43:2-43:2: @7.Return: return"><span class="annotation">@7⦊</span><span class="annotation">⦉@7</span></span></span></span></div>
</body>
</html>

View File

@ -0,0 +1,113 @@
<!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.uses_crate/uses_crate.used_crate-used_function.-------.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>uses_crate.used_crate-used_function - 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 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>
<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>
<span class="line"><span class="code" style="--layer: 0"> // rustc and LLVM cannot optimize out statements (or coverage counters) downstream from</span></span>
<span class="line"><span class="code" style="--layer: 0"> // dependent conditions.</span></span>
<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() -&gt; [return: bb1, unwind: bb10]
9:19-9:35: @1[0]: _3 = &amp;_4
9:19-9:41: @1.Call: _2 = &lt;Args as ExactSizeIterator&gt;::len(move _3) -&gt; [return: bb2, unwind: bb9]
9:19-9:46: @2[1]: _1 = Eq(move _2, const 1_usize)
9:9-9:16: @2[3]: FakeRead(ForLet, _1)
10:25-10:26: @3[2]: _5 = const 0_i32
10:9-10:22: @3[3]: FakeRead(ForLet, _5)
11:8-11:15: @3[6]: _7 = _1
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>
<span class="line"><span class="code even" style="--layer: 1" title="9:19-9:35: @0.Call: _4 = args() -&gt; [return: bb1, unwind: bb10]
9:19-9:35: @1[0]: _3 = &amp;_4
9:19-9:41: @1.Call: _2 = &lt;Args as ExactSizeIterator&gt;::len(move _3) -&gt; [return: bb2, unwind: bb9]
9:19-9:46: @2[1]: _1 = Eq(move _2, const 1_usize)
9:9-9:16: @2[3]: FakeRead(ForLet, _1)
10:25-10:26: @3[2]: _5 = const 0_i32
10:9-10:22: @3[3]: FakeRead(ForLet, _5)
11:8-11:15: @3[6]: _7 = _1
11:8-11:15: @3[7]: FakeRead(ForMatchedPlace, _7)"> let mut countdown = 0;</span></span>
<span class="line"><span class="code even" style="--layer: 1" title="9:19-9:35: @0.Call: _4 = args() -&gt; [return: bb1, unwind: bb10]
9:19-9:35: @1[0]: _3 = &amp;_4
9:19-9:41: @1.Call: _2 = &lt;Args as ExactSizeIterator&gt;::len(move _3) -&gt; [return: bb2, unwind: bb9]
9:19-9:46: @2[1]: _1 = Eq(move _2, const 1_usize)
9:9-9:16: @2[3]: FakeRead(ForLet, _1)
10:25-10:26: @3[2]: _5 = const 0_i32
10:9-10:22: @3[3]: FakeRead(ForLet, _5)
11:8-11:15: @3[6]: _7 = _1
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
11:16-13:6: @6[1]: _6 = const ()"><span class="annotation">@4,6⦊</span>{</span></span>
<span class="line"><span class="code odd" style="--layer: 1" title="12:9-12:23: @6[0]: _5 = const 10_i32
11:16-13:6: @6[1]: _6 = const ()"> countdown = 10;</span></span>
<span class="line"><span class="code odd" style="--layer: 1" title="12:9-12:23: @6[0]: _5 = const 10_i32
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>
<span class="line"><span class="code" style="--layer: 0"> </span><span><span class="code odd" style="--layer: 1" title="14:5-14:44: @7.Call: _8 = used_twice_generic_function::&lt;&amp;str&gt;(const &quot;some str&quot;) -&gt; [return: bb8, unwind: bb10]
15:2-15:2: @8.Return: return"><span class="annotation">@7,8⦊</span>used_twice_generic_function("some str");</span></span>
<span class="line"><span class="code odd" style="--layer: 1" title="14:5-14:44: @7.Call: _8 = used_twice_generic_function::&lt;&amp;str&gt;(const &quot;some str&quot;) -&gt; [return: bb8, unwind: bb10]
15:2-15:2: @8.Return: return">}<span class="annotation">⦉@7,8</span></span></span></span></div>
</body>
</html>

View File

@ -0,0 +1,133 @@
<!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.uses_crate/uses_crate.used_crate-used_generic_function.-------.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>uses_crate.used_crate-used_generic_function - 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 16"><span class="line"><span><span class="code even" style="--layer: 1" title="18:14-18:47: @0[6]: _19 = const used_generic_function::&lt;T&gt;::promoted[0]
18:14-18:47: @0[7]: _7 = &amp;(*_19)
18:14-18:47: @0[8]: _6 = &amp;(*_7)
18:14-18:47: @0[9]: _5 = move _6 as &amp;[&amp;str] (Pointer(Unsize))
18:49-18:52: @0[17]: _14 = &amp;_1
18:5-18:54: @0[18]: _13 = (move _14,)
18:5-18:54: @0[20]: FakeRead(ForMatchedPlace, _13)
18:5-18:54: @0[22]: _15 = (_13.0: &amp;T)
18:5-18:54: @0[25]: _17 = &amp;(*_15)
18:5-18:54: @0[27]: _18 = &lt;T as Debug&gt;::fmt as for&lt;&#39;r, &#39;s, &#39;t0&gt; fn(&amp;&#39;r T, &amp;&#39;s mut std::fmt::Formatter&lt;&#39;t0&gt;) -&gt; std::result::Result&lt;(), std::fmt::Error&gt; (Pointer(ReifyFnPointer))
18:5-18:54: @0.Call: _16 = ArgumentV1::new::&lt;T&gt;(move _17, move _18) -&gt; [return: bb1, unwind: bb5]
18:5-18:54: @1[2]: _12 = [move _16]
18:5-18:54: @1[5]: _11 = &amp;_12
18:5-18:54: @1[6]: _10 = &amp;(*_11)
18:5-18:54: @1[7]: _9 = move _10 as &amp;[std::fmt::ArgumentV1] (Pointer(Unsize))
18:5-18:54: @1.Call: _4 = Arguments::new_v1(move _5, move _9) -&gt; [return: bb2, unwind: bb5]
18:5-18:54: @2.Call: _3 = _print(move _4) -&gt; [return: bb3, unwind: bb5]
18:5-18:54: @3[6]: _2 = const ()
17:48-19:2: @3[8]: _0 = const ()
19:2-19:2: @4.Return: return"><span class="annotation">@0,1,2,3,4⦊</span>pub fn used_generic_function&lt;T: Debug&gt;(arg: T) {</span></span>
<span class="line"><span class="code even" style="--layer: 1" title="18:14-18:47: @0[6]: _19 = const used_generic_function::&lt;T&gt;::promoted[0]
18:14-18:47: @0[7]: _7 = &amp;(*_19)
18:14-18:47: @0[8]: _6 = &amp;(*_7)
18:14-18:47: @0[9]: _5 = move _6 as &amp;[&amp;str] (Pointer(Unsize))
18:49-18:52: @0[17]: _14 = &amp;_1
18:5-18:54: @0[18]: _13 = (move _14,)
18:5-18:54: @0[20]: FakeRead(ForMatchedPlace, _13)
18:5-18:54: @0[22]: _15 = (_13.0: &amp;T)
18:5-18:54: @0[25]: _17 = &amp;(*_15)
18:5-18:54: @0[27]: _18 = &lt;T as Debug&gt;::fmt as for&lt;&#39;r, &#39;s, &#39;t0&gt; fn(&amp;&#39;r T, &amp;&#39;s mut std::fmt::Formatter&lt;&#39;t0&gt;) -&gt; std::result::Result&lt;(), std::fmt::Error&gt; (Pointer(ReifyFnPointer))
18:5-18:54: @0.Call: _16 = ArgumentV1::new::&lt;T&gt;(move _17, move _18) -&gt; [return: bb1, unwind: bb5]
18:5-18:54: @1[2]: _12 = [move _16]
18:5-18:54: @1[5]: _11 = &amp;_12
18:5-18:54: @1[6]: _10 = &amp;(*_11)
18:5-18:54: @1[7]: _9 = move _10 as &amp;[std::fmt::ArgumentV1] (Pointer(Unsize))
18:5-18:54: @1.Call: _4 = Arguments::new_v1(move _5, move _9) -&gt; [return: bb2, unwind: bb5]
18:5-18:54: @2.Call: _3 = _print(move _4) -&gt; [return: bb3, unwind: bb5]
18:5-18:54: @3[6]: _2 = const ()
17:48-19:2: @3[8]: _0 = const ()
19:2-19:2: @4.Return: return"> println!("used_generic_function with {:?}", arg);</span></span>
<span class="line"><span class="code even" style="--layer: 1" title="18:14-18:47: @0[6]: _19 = const used_generic_function::&lt;T&gt;::promoted[0]
18:14-18:47: @0[7]: _7 = &amp;(*_19)
18:14-18:47: @0[8]: _6 = &amp;(*_7)
18:14-18:47: @0[9]: _5 = move _6 as &amp;[&amp;str] (Pointer(Unsize))
18:49-18:52: @0[17]: _14 = &amp;_1
18:5-18:54: @0[18]: _13 = (move _14,)
18:5-18:54: @0[20]: FakeRead(ForMatchedPlace, _13)
18:5-18:54: @0[22]: _15 = (_13.0: &amp;T)
18:5-18:54: @0[25]: _17 = &amp;(*_15)
18:5-18:54: @0[27]: _18 = &lt;T as Debug&gt;::fmt as for&lt;&#39;r, &#39;s, &#39;t0&gt; fn(&amp;&#39;r T, &amp;&#39;s mut std::fmt::Formatter&lt;&#39;t0&gt;) -&gt; std::result::Result&lt;(), std::fmt::Error&gt; (Pointer(ReifyFnPointer))
18:5-18:54: @0.Call: _16 = ArgumentV1::new::&lt;T&gt;(move _17, move _18) -&gt; [return: bb1, unwind: bb5]
18:5-18:54: @1[2]: _12 = [move _16]
18:5-18:54: @1[5]: _11 = &amp;_12
18:5-18:54: @1[6]: _10 = &amp;(*_11)
18:5-18:54: @1[7]: _9 = move _10 as &amp;[std::fmt::ArgumentV1] (Pointer(Unsize))
18:5-18:54: @1.Call: _4 = Arguments::new_v1(move _5, move _9) -&gt; [return: bb2, unwind: bb5]
18:5-18:54: @2.Call: _3 = _print(move _4) -&gt; [return: bb3, unwind: bb5]
18:5-18:54: @3[6]: _2 = const ()
17:48-19:2: @3[8]: _0 = const ()
19:2-19:2: @4.Return: return">}<span class="annotation">⦉@0,1,2,3,4</span></span></span></span></div>
</body>
</html>

View File

@ -0,0 +1,133 @@
<!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.uses_crate/uses_crate.used_crate-used_twice_generic_function.-------.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>uses_crate.used_crate-used_twice_generic_function - 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 20"><span class="line"><span><span class="code even" style="--layer: 1" title="22:14-22:53: @0[6]: _19 = const used_twice_generic_function::&lt;T&gt;::promoted[0]
22:14-22:53: @0[7]: _7 = &amp;(*_19)
22:14-22:53: @0[8]: _6 = &amp;(*_7)
22:14-22:53: @0[9]: _5 = move _6 as &amp;[&amp;str] (Pointer(Unsize))
22:55-22:58: @0[17]: _14 = &amp;_1
22:5-22:60: @0[18]: _13 = (move _14,)
22:5-22:60: @0[20]: FakeRead(ForMatchedPlace, _13)
22:5-22:60: @0[22]: _15 = (_13.0: &amp;T)
22:5-22:60: @0[25]: _17 = &amp;(*_15)
22:5-22:60: @0[27]: _18 = &lt;T as Debug&gt;::fmt as for&lt;&#39;r, &#39;s, &#39;t0&gt; fn(&amp;&#39;r T, &amp;&#39;s mut std::fmt::Formatter&lt;&#39;t0&gt;) -&gt; std::result::Result&lt;(), std::fmt::Error&gt; (Pointer(ReifyFnPointer))
22:5-22:60: @0.Call: _16 = ArgumentV1::new::&lt;T&gt;(move _17, move _18) -&gt; [return: bb1, unwind: bb5]
22:5-22:60: @1[2]: _12 = [move _16]
22:5-22:60: @1[5]: _11 = &amp;_12
22:5-22:60: @1[6]: _10 = &amp;(*_11)
22:5-22:60: @1[7]: _9 = move _10 as &amp;[std::fmt::ArgumentV1] (Pointer(Unsize))
22:5-22:60: @1.Call: _4 = Arguments::new_v1(move _5, move _9) -&gt; [return: bb2, unwind: bb5]
22:5-22:60: @2.Call: _3 = _print(move _4) -&gt; [return: bb3, unwind: bb5]
22:5-22:60: @3[6]: _2 = const ()
21:54-23:2: @3[8]: _0 = const ()
23:2-23:2: @4.Return: return"><span class="annotation">@0,1,2,3,4⦊</span>pub fn used_twice_generic_function&lt;T: Debug&gt;(arg: T) {</span></span>
<span class="line"><span class="code even" style="--layer: 1" title="22:14-22:53: @0[6]: _19 = const used_twice_generic_function::&lt;T&gt;::promoted[0]
22:14-22:53: @0[7]: _7 = &amp;(*_19)
22:14-22:53: @0[8]: _6 = &amp;(*_7)
22:14-22:53: @0[9]: _5 = move _6 as &amp;[&amp;str] (Pointer(Unsize))
22:55-22:58: @0[17]: _14 = &amp;_1
22:5-22:60: @0[18]: _13 = (move _14,)
22:5-22:60: @0[20]: FakeRead(ForMatchedPlace, _13)
22:5-22:60: @0[22]: _15 = (_13.0: &amp;T)
22:5-22:60: @0[25]: _17 = &amp;(*_15)
22:5-22:60: @0[27]: _18 = &lt;T as Debug&gt;::fmt as for&lt;&#39;r, &#39;s, &#39;t0&gt; fn(&amp;&#39;r T, &amp;&#39;s mut std::fmt::Formatter&lt;&#39;t0&gt;) -&gt; std::result::Result&lt;(), std::fmt::Error&gt; (Pointer(ReifyFnPointer))
22:5-22:60: @0.Call: _16 = ArgumentV1::new::&lt;T&gt;(move _17, move _18) -&gt; [return: bb1, unwind: bb5]
22:5-22:60: @1[2]: _12 = [move _16]
22:5-22:60: @1[5]: _11 = &amp;_12
22:5-22:60: @1[6]: _10 = &amp;(*_11)
22:5-22:60: @1[7]: _9 = move _10 as &amp;[std::fmt::ArgumentV1] (Pointer(Unsize))
22:5-22:60: @1.Call: _4 = Arguments::new_v1(move _5, move _9) -&gt; [return: bb2, unwind: bb5]
22:5-22:60: @2.Call: _3 = _print(move _4) -&gt; [return: bb3, unwind: bb5]
22:5-22:60: @3[6]: _2 = const ()
21:54-23:2: @3[8]: _0 = const ()
23:2-23:2: @4.Return: return"> println!("used_twice_generic_function with {:?}", arg);</span></span>
<span class="line"><span class="code even" style="--layer: 1" title="22:14-22:53: @0[6]: _19 = const used_twice_generic_function::&lt;T&gt;::promoted[0]
22:14-22:53: @0[7]: _7 = &amp;(*_19)
22:14-22:53: @0[8]: _6 = &amp;(*_7)
22:14-22:53: @0[9]: _5 = move _6 as &amp;[&amp;str] (Pointer(Unsize))
22:55-22:58: @0[17]: _14 = &amp;_1
22:5-22:60: @0[18]: _13 = (move _14,)
22:5-22:60: @0[20]: FakeRead(ForMatchedPlace, _13)
22:5-22:60: @0[22]: _15 = (_13.0: &amp;T)
22:5-22:60: @0[25]: _17 = &amp;(*_15)
22:5-22:60: @0[27]: _18 = &lt;T as Debug&gt;::fmt as for&lt;&#39;r, &#39;s, &#39;t0&gt; fn(&amp;&#39;r T, &amp;&#39;s mut std::fmt::Formatter&lt;&#39;t0&gt;) -&gt; std::result::Result&lt;(), std::fmt::Error&gt; (Pointer(ReifyFnPointer))
22:5-22:60: @0.Call: _16 = ArgumentV1::new::&lt;T&gt;(move _17, move _18) -&gt; [return: bb1, unwind: bb5]
22:5-22:60: @1[2]: _12 = [move _16]
22:5-22:60: @1[5]: _11 = &amp;_12
22:5-22:60: @1[6]: _10 = &amp;(*_11)
22:5-22:60: @1[7]: _9 = move _10 as &amp;[std::fmt::ArgumentV1] (Pointer(Unsize))
22:5-22:60: @1.Call: _4 = Arguments::new_v1(move _5, move _9) -&gt; [return: bb2, unwind: bb5]
22:5-22:60: @2.Call: _3 = _print(move _4) -&gt; [return: bb3, unwind: bb5]
22:5-22:60: @3[6]: _2 = const ()
21:54-23:2: @3[8]: _0 = const ()
23:2-23:2: @4.Return: return">}<span class="annotation">⦉@0,1,2,3,4</span></span></span></span></div>
</body>
</html>

View File

@ -88,12 +88,15 @@ fn l(x: u8) {
}
}
async fn m(x: u8) -> u8 { x - 1 }
fn main() {
let _ = g(10);
let _ = h(9);
let mut future = Box::pin(i(8));
j(7);
l(6);
let _ = m(5);
executor::block_on(future.as_mut());
}

View File

@ -44,3 +44,18 @@ one expression, which is allowed, but the `function_source_hash` was only passed
`function_source_hash` without a code region, if necessary.
*/
// FIXME(#79626): The derived traits get coverage, which is great, but some of the traits appear
// to get two coverage execution counts at different positions:
//
// ```text
// 4| 2|#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord)]
// ^0 ^0 ^0 ^0 ^1 ^0 ^0^0
// ```text
//
// `PartialEq`, `PartialOrd`, and `Ord` (and possibly `Eq`, if the trait name was longer than 2
// characters) have counts at their first and last characters.
//
// Why is this? Why does `PartialOrd` have two values (1 and 0)? This must mean we are checking
// distinct coverages, so maybe we don't want to eliminate one of them. Should we merge them?
// If merged, do we lose some information?

View File

@ -0,0 +1,43 @@
#![allow(unused_assignments, unused_variables)]
use std::fmt::Debug;
pub fn used_function() {
// Initialize test constants in a way that cannot be determined at compile time, to ensure
// rustc and LLVM cannot optimize out statements (or coverage counters) downstream from
// dependent conditions.
let is_true = std::env::args().len() == 1;
let mut countdown = 0;
if is_true {
countdown = 10;
}
used_twice_generic_function("some str");
}
pub fn used_generic_function<T: Debug>(arg: T) {
println!("used_generic_function with {:?}", arg);
}
pub fn used_twice_generic_function<T: Debug>(arg: T) {
println!("used_twice_generic_function with {:?}", arg);
}
pub fn unused_generic_function<T: Debug>(arg: T) {
println!("unused_generic_function with {:?}", arg);
}
pub fn unused_function() {
let is_true = std::env::args().len() == 1;
let mut countdown = 2;
if !is_true {
countdown = 20;
}
}
fn unused_private_function() {
let is_true = std::env::args().len() == 1;
let mut countdown = 2;
if !is_true {
countdown = 20;
}
}

View File

@ -0,0 +1,10 @@
#![allow(unused_assignments, unused_variables)]
mod used_crate;
fn main() {
used_crate::used_function();
let some_vec = vec![1, 2, 3, 4];
used_crate::used_generic_function(&some_vec);
used_crate::used_twice_generic_function(some_vec);
}