mirror of
https://github.com/rust-lang/rust.git
synced 2025-01-22 04:34:51 +00:00
Fixed cross-crate generic call test to compile lib and bin separately
The original test produced a single crate with two mods, which was not the goal of the test.
This commit is contained in:
parent
b0c140a55b
commit
f101fd8ff6
@ -67,7 +67,7 @@ DEBUG_FLAG=--debug
|
||||
endif
|
||||
|
||||
ifeq ($(LLVM_VERSION_11_PLUS),true)
|
||||
all: $(patsubst $(SOURCEDIR)/%.rs,%,$(wildcard $(SOURCEDIR)/*.rs))
|
||||
all: $(patsubst $(SOURCEDIR)/lib/%.rs,%,$(wildcard $(SOURCEDIR)/lib/*.rs)) $(patsubst $(SOURCEDIR)/%.rs,%,$(wildcard $(SOURCEDIR)/*.rs))
|
||||
else
|
||||
$(info Rust option `-Z instrument-coverage` requires LLVM 11 or higher. Test skipped.)
|
||||
all:
|
||||
@ -84,12 +84,22 @@ endif
|
||||
|
||||
-include clear_expected_if_blessed
|
||||
|
||||
%: $(SOURCEDIR)/lib/%.rs
|
||||
# Compile the test library with coverage instrumentation
|
||||
$(RUSTC) $(SOURCEDIR)/lib/$@.rs \
|
||||
$$( grep -q '^\/\/ require-rust-edition-2018' $(SOURCEDIR)/lib/$@.rs && \
|
||||
echo "--edition=2018" \
|
||||
) \
|
||||
--crate-type rlib \
|
||||
-Zinstrument-coverage
|
||||
|
||||
%: $(SOURCEDIR)/%.rs
|
||||
# Compile the test program with coverage instrumentation and generate relevant MIR.
|
||||
# Compile the test program with coverage instrumentation
|
||||
$(RUSTC) $(SOURCEDIR)/$@.rs \
|
||||
$$( grep -q '^\/\/ require-rust-edition-2018' $(SOURCEDIR)/$@.rs && \
|
||||
echo "--edition=2018" \
|
||||
) \
|
||||
-L "$(TMPDIR)" \
|
||||
-Zinstrument-coverage
|
||||
|
||||
# Run it in order to generate some profiling data,
|
||||
@ -142,8 +152,17 @@ else
|
||||
# Compare the show coverage output (`--bless` refreshes `typical` files)
|
||||
# Note `llvm-cov show` output for some programs can vary, but can be ignored
|
||||
# by inserting `// ignore-llvm-cov-show-diffs` at the top of the source file.
|
||||
#
|
||||
# FIXME(richkadel): It looks like most past variations seem to have been mitigated. None of the
|
||||
# Rust test source samples have the `// ignore-llvm-cov-show-diffs` anymore. The main variation
|
||||
# I had seen (and is still present in the new `coverage/lib/used_crate.rs`) is the `llvm-cov show`
|
||||
# reporting of multiple instantiations of a generic function with different type substitutions.
|
||||
# For some reason, `llvm-cov show` can report these in a non-deterministic order, breaking the
|
||||
# `diff` comparision. I was able to work around the problem with `diff --ignore-matching-lines=RE`
|
||||
# to ignore each line prefixing each generic instantiation coverage code region.
|
||||
|
||||
$(DIFF) expected_show_coverage.$@.txt "$(TMPDIR)"/actual_show_coverage.$@.txt || \
|
||||
$(DIFF) --ignore-matching-lines='::<.*>.*:$$' \
|
||||
expected_show_coverage.$@.txt "$(TMPDIR)"/actual_show_coverage.$@.txt || \
|
||||
( grep -q '^\/\/ ignore-llvm-cov-show-diffs' $(SOURCEDIR)/$@.rs && \
|
||||
>&2 echo 'diff failed, but suppressed with `// ignore-llvm-cov-show-diffs` in $(SOURCEDIR)/$@.rs' \
|
||||
) || \
|
||||
@ -177,6 +196,10 @@ endif
|
||||
$(call BIN,"$(TMPDIR)"/$@) \
|
||||
| "$(PYTHON)" $(BASEDIR)/prettify_json.py \
|
||||
> "$(TMPDIR)"/actual_export_coverage.$@.json
|
||||
# FIXME(richkadel): With the addition of `--ignore-matching-lines=RE` to ignore the
|
||||
# non-deterministically-ordered coverage results for multiple instantiations of generics with
|
||||
# differing type substitutions, I probably don't need the `.json` files anymore (and may not
|
||||
# need `prettify_json.py` either).
|
||||
|
||||
ifdef RUSTC_BLESS_TEST
|
||||
cp "$(TMPDIR)"/actual_export_coverage.$@.json expected_export_coverage.$@.json
|
||||
|
@ -3,53 +3,53 @@
|
||||
{
|
||||
"files": [
|
||||
{
|
||||
"filename": "../coverage/used_crate/mod.rs",
|
||||
"filename": "../coverage/lib/used_crate.rs",
|
||||
"summary": {
|
||||
"functions": {
|
||||
"count": 3,
|
||||
"covered": 3,
|
||||
"percent": 100
|
||||
"count": 6,
|
||||
"covered": 5,
|
||||
"percent": 83.33333333333334
|
||||
},
|
||||
"instantiations": {
|
||||
"count": 4,
|
||||
"covered": 4,
|
||||
"percent": 100
|
||||
"count": 10,
|
||||
"covered": 8,
|
||||
"percent": 80
|
||||
},
|
||||
"lines": {
|
||||
"count": 31,
|
||||
"covered": 14,
|
||||
"percent": 45.16129032258064
|
||||
"count": 46,
|
||||
"covered": 26,
|
||||
"percent": 56.52173913043478
|
||||
},
|
||||
"regions": {
|
||||
"count": 16,
|
||||
"covered": 6,
|
||||
"notcovered": 10,
|
||||
"percent": 37.5
|
||||
"count": 19,
|
||||
"covered": 8,
|
||||
"notcovered": 11,
|
||||
"percent": 42.10526315789473
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"totals": {
|
||||
"functions": {
|
||||
"count": 3,
|
||||
"covered": 3,
|
||||
"percent": 100
|
||||
"count": 6,
|
||||
"covered": 5,
|
||||
"percent": 83.33333333333334
|
||||
},
|
||||
"instantiations": {
|
||||
"count": 4,
|
||||
"covered": 4,
|
||||
"percent": 100
|
||||
"count": 10,
|
||||
"covered": 8,
|
||||
"percent": 80
|
||||
},
|
||||
"lines": {
|
||||
"count": 31,
|
||||
"covered": 14,
|
||||
"percent": 45.16129032258064
|
||||
"count": 46,
|
||||
"covered": 26,
|
||||
"percent": 56.52173913043478
|
||||
},
|
||||
"regions": {
|
||||
"count": 16,
|
||||
"covered": 6,
|
||||
"notcovered": 10,
|
||||
"percent": 37.5
|
||||
"count": 19,
|
||||
"covered": 8,
|
||||
"notcovered": 11,
|
||||
"percent": 42.10526315789473
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
1| |#![allow(unused_assignments)]
|
||||
1| |#![allow(unused_assignments, dead_code)]
|
||||
2| |
|
||||
3| |// require-rust-edition-2018
|
||||
4| |
|
||||
|
@ -1,4 +1,4 @@
|
||||
1| |#![allow(unused_assignments)]
|
||||
1| |#![allow(unused_assignments, unused_variables)]
|
||||
2| |
|
||||
3| 1|fn main() {
|
||||
4| 1| // Initialize test constants in a way that cannot be determined at compile time, to ensure
|
||||
|
@ -1,4 +1,4 @@
|
||||
1| |#![allow(unused_assignments, unused_variables)]
|
||||
1| |#![allow(unused_assignments, unused_variables, dead_code)]
|
||||
2| |
|
||||
3| 1|fn main() {
|
||||
4| | // Initialize test constants in a way that cannot be determined at compile time, to ensure
|
||||
|
@ -1,4 +1,4 @@
|
||||
1| |#![allow(unused_assignments)]
|
||||
1| |#![allow(unused_assignments, unused_variables)]
|
||||
2| |
|
||||
3| 1|fn main() {
|
||||
4| 1| let result
|
||||
|
@ -1,4 +1,4 @@
|
||||
1| |#![allow(unused_assignments)]
|
||||
1| |#![allow(unused_assignments, unused_variables, while_true)]
|
||||
2| |
|
||||
3| |// This test confirms an earlier problem was resolved, supporting the MIR graph generated by the
|
||||
4| |// structure of this `fmt` function.
|
||||
|
@ -1,4 +1,4 @@
|
||||
1| |#![allow(unused_assignments)]
|
||||
1| |#![allow(unused_assignments, unused_variables)]
|
||||
2| |
|
||||
3| 1|fn main() {
|
||||
4| 1| // Initialize test constants in a way that cannot be determined at compile time, to ensure
|
||||
|
@ -12,45 +12,131 @@
|
||||
12| 1| countdown = 10;
|
||||
13| 1| }
|
||||
^0
|
||||
14| 1| used_twice_generic_function("some str");
|
||||
14| 1| use_this_lib_crate();
|
||||
15| 1|}
|
||||
16| |
|
||||
17| 1|pub fn used_generic_function<T: Debug>(arg: T) {
|
||||
18| 1| println!("used_generic_function with {:?}", arg);
|
||||
19| 1|}
|
||||
17| 2|pub fn used_only_from_bin_crate_generic_function<T: Debug>(arg: T) {
|
||||
18| 2| println!("used_only_from_bin_crate_generic_function with {:?}", arg);
|
||||
19| 2|}
|
||||
------------------
|
||||
| used_crate::used_only_from_bin_crate_generic_function::<&str>:
|
||||
| 17| 1|pub fn used_only_from_bin_crate_generic_function<T: Debug>(arg: T) {
|
||||
| 18| 1| println!("used_only_from_bin_crate_generic_function with {:?}", arg);
|
||||
| 19| 1|}
|
||||
------------------
|
||||
| used_crate::used_only_from_bin_crate_generic_function::<&alloc::vec::Vec<i32>>:
|
||||
| 17| 1|pub fn used_only_from_bin_crate_generic_function<T: Debug>(arg: T) {
|
||||
| 18| 1| println!("used_only_from_bin_crate_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);
|
||||
21| 2|pub fn used_only_from_this_lib_crate_generic_function<T: Debug>(arg: T) {
|
||||
22| 2| println!("used_only_from_this_lib_crate_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);
|
||||
| used_crate::used_only_from_this_lib_crate_generic_function::<alloc::vec::Vec<i32>>:
|
||||
| 21| 1|pub fn used_only_from_this_lib_crate_generic_function<T: Debug>(arg: T) {
|
||||
| 22| 1| println!("used_only_from_this_lib_crate_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);
|
||||
| used_crate::used_only_from_this_lib_crate_generic_function::<&str>:
|
||||
| 21| 1|pub fn used_only_from_this_lib_crate_generic_function<T: Debug>(arg: T) {
|
||||
| 22| 1| println!("used_only_from_this_lib_crate_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|}
|
||||
25| 2|pub fn used_from_bin_crate_and_lib_crate_generic_function<T: Debug>(arg: T) {
|
||||
26| 2| println!("used_from_bin_crate_and_lib_crate_generic_function with {:?}", arg);
|
||||
27| 2|}
|
||||
------------------
|
||||
| used_crate::used_from_bin_crate_and_lib_crate_generic_function::<alloc::vec::Vec<i32>>:
|
||||
| 25| 1|pub fn used_from_bin_crate_and_lib_crate_generic_function<T: Debug>(arg: T) {
|
||||
| 26| 1| println!("used_from_bin_crate_and_lib_crate_generic_function with {:?}", arg);
|
||||
| 27| 1|}
|
||||
------------------
|
||||
| used_crate::used_from_bin_crate_and_lib_crate_generic_function::<&str>:
|
||||
| 25| 1|pub fn used_from_bin_crate_and_lib_crate_generic_function<T: Debug>(arg: T) {
|
||||
| 26| 1| println!("used_from_bin_crate_and_lib_crate_generic_function with {:?}", arg);
|
||||
| 27| 1|}
|
||||
------------------
|
||||
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| }
|
||||
29| 2|pub fn used_with_same_type_from_bin_crate_and_lib_crate_generic_function<T: Debug>(arg: T) {
|
||||
30| 2| println!("used_with_same_type_from_bin_crate_and_lib_crate_generic_function with {:?}", arg);
|
||||
31| 2|}
|
||||
32| |
|
||||
33| 0|pub fn unused_generic_function<T: Debug>(arg: T) {
|
||||
34| 0| println!("unused_generic_function with {:?}", arg);
|
||||
35| 0|}
|
||||
36| |
|
||||
37| 0|fn unused_private_function() {
|
||||
37| 0|pub fn unused_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|}
|
||||
44| |
|
||||
45| 0|fn unused_private_function() {
|
||||
46| 0| let is_true = std::env::args().len() == 1;
|
||||
47| 0| let mut countdown = 2;
|
||||
48| 0| if !is_true {
|
||||
49| 0| countdown = 20;
|
||||
50| 0| }
|
||||
51| 0|}
|
||||
52| |
|
||||
53| 1|fn use_this_lib_crate() {
|
||||
54| 1| used_from_bin_crate_and_lib_crate_generic_function("used from library used_crate.rs");
|
||||
55| 1| used_with_same_type_from_bin_crate_and_lib_crate_generic_function(
|
||||
56| 1| "used from library used_crate.rs",
|
||||
57| 1| );
|
||||
58| 1| let some_vec = vec![5, 6, 7, 8];
|
||||
59| 1| used_only_from_this_lib_crate_generic_function(some_vec);
|
||||
60| 1| used_only_from_this_lib_crate_generic_function("used ONLY from library used_crate.rs");
|
||||
61| 1|}
|
||||
------------------
|
||||
| Unexecuted instantiation: used_crate::use_this_lib_crate
|
||||
------------------
|
||||
62| |
|
||||
63| |// FIXME(#79651): `used_from_bin_crate_and_lib_crate_generic_function()` is covered and executed
|
||||
64| |// `2` times, but the coverage output also shows (at the bottom of the coverage report):
|
||||
65| |// ------------------
|
||||
66| |// | Unexecuted instantiation: <some function name here>
|
||||
67| |// ------------------
|
||||
68| |//
|
||||
69| |// Note, the function name shown in the error seems to change depending on the structure of the
|
||||
70| |// code, for some reason, including:
|
||||
71| |//
|
||||
72| |// * used_crate::used_from_bin_crate_and_lib_crate_generic_function::<&str>
|
||||
73| |// * used_crate::use_this_lib_crate
|
||||
74| |//
|
||||
75| |// The `Unexecuted instantiation` error may be related to more than one generic function. Since the
|
||||
76| |// reporting is not consistent, it may not be obvious if there are multiple problems here; however,
|
||||
77| |// `used_crate::used_from_bin_crate_and_lib_crate_generic_function::<&str>` (which I have seen
|
||||
78| |// with this error) is the only generic function missing instantiaion coverage counts.
|
||||
79| |//
|
||||
80| |// The `&str` variant was called from within this `lib` crate, and the `bin` crate also calls this
|
||||
81| |// function, but with `T` type `&Vec<i32>`.
|
||||
82| |//
|
||||
83| |// I believe the reason is that one or both crates are generating `Zero` counters for what it
|
||||
84| |// believes are "Unreachable" instantiations, but those instantiations are counted from the
|
||||
85| |// coverage map in the other crate.
|
||||
86| |//
|
||||
87| |// See `add_unreachable_coverage()` in `mapgen.rs` for more on how these `Zero` counters are added
|
||||
88| |// for what the funciton believes are `DefId`s that did not get codegenned. I suspect the issue
|
||||
89| |// may be related to this process, but this needs to be confirmed. It may not be possible to know
|
||||
90| |// for sure if a function is truly unused and should be reported with `Zero` coverage if it may
|
||||
91| |// still get used from an external crate. (Something to look at: If the `DefId` in MIR corresponds
|
||||
92| |// _only_ to the generic function without type parameters, is the `DefId` in the codegenned set,
|
||||
93| |// instantiated with one of the type parameters (in either or both crates) a *different* `DefId`?
|
||||
94| |// If so, `add_unreachable_coverage()` would assume the MIR `DefId` was uncovered, and would add
|
||||
95| |// unreachable coverage.
|
||||
96| |//
|
||||
97| |// I didn't think they could be different, but if they can, we would need to find the `DefId` for
|
||||
98| |// the generic function MIR and include it in the set of "codegenned" DefIds if any instantiation
|
||||
99| |// of that generic function does exist.
|
||||
100| |//
|
||||
101| |// Note, however, for `used_with_same_type_from_bin_crate_and_lib_crate_generic_function()` both
|
||||
102| |// crates use this function with the same type variant. The function does not have multiple
|
||||
103| |// instantiations, so the coverage analysis is not confused. No "Unexecuted instantiations" errors
|
||||
104| |// are reported.
|
||||
|
||||
|
@ -28,16 +28,18 @@ 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 93:1 -> 101:2, #1
|
||||
Counter in file 0 91:1 -> 91:25, #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,7 +55,6 @@ 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)
|
||||
@ -69,7 +70,6 @@ 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 17:9 -> 17:10, #1
|
||||
Counter in file 0 17:9 -> 17:10, #1
|
||||
|
@ -1,39 +1,48 @@
|
||||
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 25:1 -> 27:2, #1
|
||||
Counter in file 0 17:1 -> 19:2, #1
|
||||
Counter in file 0 5:1 -> 12:2, #1
|
||||
Counter in file 0 17:1 -> 19:2, 0
|
||||
Counter in file 0 33:1 -> 35:2, 0
|
||||
Counter in file 0 45:1 -> 48:16, 0
|
||||
Counter in file 0 48:17 -> 50:6, 0
|
||||
Counter in file 0 50:6 -> 50:7, 0
|
||||
Counter in file 0 51:1 -> 51:2, 0
|
||||
Counter in file 0 53:1 -> 61:2, #1
|
||||
Counter in file 0 25:1 -> 27:2, #1
|
||||
Counter in file 0 29:1 -> 31:2, #1
|
||||
Counter in file 0 21:1 -> 23:2, #1
|
||||
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
|
||||
Counter in file 0 37:1 -> 40:16, #1
|
||||
Counter in file 0 40:17 -> 42:6, #2
|
||||
Counter in file 0 42:6 -> 42:7, (#1 - #2)
|
||||
Counter in file 0 43:1 -> 43:2, (#2 + (#1 - #2))
|
||||
Emitting segments for file: ../coverage/lib/used_crate.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)
|
||||
17:1 -> 19:2 (count=2)
|
||||
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)
|
||||
25:1 -> 27:2 (count=2)
|
||||
29:1 -> 31:2 (count=2)
|
||||
33: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)
|
||||
45:1 -> 48:16 (count=0)
|
||||
48:17 -> 50:6 (count=0)
|
||||
50:6 -> 50:7 (count=0)
|
||||
51:1 -> 51:2 (count=0)
|
||||
53:1 -> 61:2 (count=1)
|
||||
Segment at 5:1 (count = 1), RegionEntry
|
||||
Segment at 5:24 (count = 0), Skipped
|
||||
Segment at 9:9 (count = 1), RegionEntry
|
||||
@ -43,18 +52,15 @@ 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 17:1 (count = 2), 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 25:1 (count = 2), 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 29:1 (count = 2), RegionEntry
|
||||
Segment at 31:2 (count = 0), Skipped
|
||||
Segment at 33: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
|
||||
@ -63,13 +69,42 @@ 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_
|
||||
Segment at 45:1 (count = 0), RegionEntry
|
||||
Segment at 48:16 (count = 0), Skipped
|
||||
Segment at 48:17 (count = 0), RegionEntry
|
||||
Segment at 50:6 (count = 0), RegionEntry
|
||||
Segment at 50:7 (count = 0), Skipped
|
||||
Segment at 51:1 (count = 0), RegionEntry
|
||||
Segment at 51:2 (count = 0), Skipped
|
||||
Segment at 53:1 (count = 1), RegionEntry
|
||||
Segment at 61:2 (count = 0), Skipped
|
||||
Emitting segments for function: _RINvCsbDqzXfLQacH_10used_crate41used_only_from_bin_crate_generic_functionReECs4fqI2P2rA04_10uses_crate
|
||||
Combined regions:
|
||||
17:1 -> 19:2 (count=1)
|
||||
Segment at 17:1 (count = 1), RegionEntry
|
||||
Segment at 19:2 (count = 0), Skipped
|
||||
Emitting segments for function: _RINvCsbDqzXfLQacH_10used_crate41used_only_from_bin_crate_generic_functionRINtNtCs3QflaznQylx_5alloc3vec3VeclEECs4fqI2P2rA04_10uses_crate
|
||||
Combined regions:
|
||||
17:1 -> 19:2 (count=1)
|
||||
Segment at 17:1 (count = 1), RegionEntry
|
||||
Segment at 19:2 (count = 0), Skipped
|
||||
Emitting segments for function: _RINvCsbDqzXfLQacH_10used_crate46used_only_from_this_lib_crate_generic_functionINtNtCs3QflaznQylx_5alloc3vec3VeclEEB2_
|
||||
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_
|
||||
Emitting segments for function: _RINvCsbDqzXfLQacH_10used_crate46used_only_from_this_lib_crate_generic_functionReEB2_
|
||||
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: _RINvCsbDqzXfLQacH_10used_crate50used_from_bin_crate_and_lib_crate_generic_functionINtNtCs3QflaznQylx_5alloc3vec3VeclEECs4fqI2P2rA04_10uses_crate
|
||||
Combined regions:
|
||||
25:1 -> 27:2 (count=1)
|
||||
Segment at 25:1 (count = 1), RegionEntry
|
||||
Segment at 27:2 (count = 0), Skipped
|
||||
Emitting segments for function: _RINvCsbDqzXfLQacH_10used_crate50used_from_bin_crate_and_lib_crate_generic_functionReEB2_
|
||||
Combined regions:
|
||||
25:1 -> 27:2 (count=1)
|
||||
Segment at 25:1 (count = 1), RegionEntry
|
||||
Segment at 27:2 (count = 0), Skipped
|
||||
|
@ -21,7 +21,7 @@ endef
|
||||
export SPANVIEW_HEADER
|
||||
|
||||
ifeq ($(LLVM_VERSION_11_PLUS),true)
|
||||
all: $(patsubst $(SOURCEDIR)/%.rs,%,$(wildcard $(SOURCEDIR)/*.rs))
|
||||
all: $(patsubst $(SOURCEDIR)/lib/%.rs,%,$(wildcard $(SOURCEDIR)/lib/*.rs)) $(patsubst $(SOURCEDIR)/%.rs,%,$(wildcard $(SOURCEDIR)/*.rs))
|
||||
else
|
||||
$(info Rust option `-Z instrument-coverage` requires LLVM 11 or higher. Test skipped.)
|
||||
all:
|
||||
@ -36,12 +36,47 @@ endif
|
||||
|
||||
-include clear_expected_if_blessed
|
||||
|
||||
%: $(SOURCEDIR)/%.rs
|
||||
# Compile the test program with coverage instrumentation and generate relevant MIR.
|
||||
$(RUSTC) $(SOURCEDIR)/$@.rs \
|
||||
$$( grep -q '^\/\/ require-rust-edition-2018' $(SOURCEDIR)/$@.rs && \
|
||||
# FIXME(richkadel): The actions for these two types of targets (libraries and binaries) should be
|
||||
# combined.
|
||||
|
||||
%: $(SOURCEDIR)/lib/%.rs
|
||||
# Compile the test library with coverage instrumentation
|
||||
$(RUSTC) $(SOURCEDIR)/lib/$@.rs \
|
||||
$$( grep -q '^\/\/ require-rust-edition-2018' $(SOURCEDIR)/lib/$@.rs && \
|
||||
echo "--edition=2018" \
|
||||
) \
|
||||
--crate-type rlib \
|
||||
-Zinstrument-coverage \
|
||||
-Zdump-mir=InstrumentCoverage \
|
||||
-Zdump-mir-spanview \
|
||||
-Zdump-mir-dir="$(TMPDIR)"/mir_dump.$@
|
||||
|
||||
for path in "$(TMPDIR)"/mir_dump.$@/*; do \
|
||||
file="$$(basename "$$path")"; \
|
||||
urlescaped="$$("$(PYTHON)" $(BASEDIR)/escape_url.py $$file)" || exit $$?; \
|
||||
printf "$$SPANVIEW_HEADER\n" "$@" "$$urlescaped" > "$$path".modified; \
|
||||
tail -n +2 "$$path" >> "$$path".modified; \
|
||||
mv "$$path".modified "$$path"; \
|
||||
done && true # for/done ends in non-zero status
|
||||
|
||||
ifdef RUSTC_BLESS_TEST
|
||||
mkdir -p expected_mir_dump.$@
|
||||
cp "$(TMPDIR)"/mir_dump.$@/*InstrumentCoverage.0.html expected_mir_dump.$@/
|
||||
else
|
||||
# Check that the selected `mir_dump` files match what we expect (`--bless` refreshes `expected`)
|
||||
mkdir -p "$(TMPDIR)"/actual_mir_dump.$@
|
||||
rm -f "$(TMPDIR)"/actual_mir_dump.$@/*
|
||||
cp "$(TMPDIR)"/mir_dump.$@/*InstrumentCoverage.0.html "$(TMPDIR)"/actual_mir_dump.$@/
|
||||
$(DIFF) -r expected_mir_dump.$@/ "$(TMPDIR)"/actual_mir_dump.$@/
|
||||
endif
|
||||
|
||||
%: $(SOURCEDIR)/%.rs
|
||||
# Compile the test program with coverage instrumentation
|
||||
$(RUSTC) $(SOURCEDIR)/$@.rs \
|
||||
$$( grep -q '^\/\/ require-rust-edition-2018' $(SOURCEDIR)/$@.rs && \
|
||||
echo "--edition=2018" \
|
||||
) \
|
||||
-L "$(TMPDIR)" \
|
||||
-Zinstrument-coverage \
|
||||
-Zdump-mir=InstrumentCoverage \
|
||||
-Zdump-mir-spanview \
|
||||
|
@ -2,7 +2,7 @@
|
||||
<!--
|
||||
|
||||
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
|
||||
https://htmlpreview.github.io/?https://github.com/rust-lang/rust/blob/master/src/test/run-make-fulldeps/coverage-spanview/expected_mir_dump.used_crate/used_crate.unused_function.-------.InstrumentCoverage.0.html
|
||||
|
||||
For revisions in Pull Requests (PR):
|
||||
* Replace "rust-lang" with the github PR author
|
||||
@ -11,7 +11,7 @@ For revisions in Pull Requests (PR):
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<title>uses_crate.used_crate-unused_private_function - Coverage Spans</title>
|
||||
<title>used_crate.unused_function - Coverage Spans</title>
|
||||
<style>
|
||||
.line {
|
||||
counter-increment: line;
|
||||
@ -78,7 +78,7 @@ For revisions in Pull Requests (PR):
|
||||
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>
|
||||
40:8-40: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="38:19-38:35: @0.Call: _4 = args() -> [return: bb1, unwind: bb9]
|
||||
38:19-38:35: @1[0]: _3 = &_4
|
||||
38:19-38:41: @1.Call: _2 = <Args as ExactSizeIterator>::len(move _3) -> [return: bb2, unwind: bb8]
|
@ -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.used_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>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 32"><span class="line"><span><span class="code even" style="--layer: 1" title="34:14-34:49: @0[6]: _19 = const unused_generic_function::<T>::promoted[0]
|
||||
34:14-34:49: @0[7]: _7 = &(*_19)
|
||||
34:14-34:49: @0[8]: _6 = &(*_7)
|
||||
34:14-34:49: @0[9]: _5 = move _6 as &[&str] (Pointer(Unsize))
|
||||
34:51-34:54: @0[17]: _14 = &_1
|
||||
34:5-34:56: @0[18]: _13 = (move _14,)
|
||||
34:5-34:56: @0[20]: FakeRead(ForMatchedPlace, _13)
|
||||
34:5-34:56: @0[22]: _15 = (_13.0: &T)
|
||||
34:5-34:56: @0[25]: _17 = &(*_15)
|
||||
34:5-34:56: @0[27]: _18 = <T as Debug>::fmt as for<'r, 's, 't0> fn(&'r T, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error> (Pointer(ReifyFnPointer))
|
||||
34:5-34:56: @0.Call: _16 = ArgumentV1::new::<T>(move _17, move _18) -> [return: bb1, unwind: bb5]
|
||||
34:5-34:56: @1[2]: _12 = [move _16]
|
||||
34:5-34:56: @1[5]: _11 = &_12
|
||||
34:5-34:56: @1[6]: _10 = &(*_11)
|
||||
34:5-34:56: @1[7]: _9 = move _10 as &[std::fmt::ArgumentV1] (Pointer(Unsize))
|
||||
34:5-34:56: @1.Call: _4 = Arguments::new_v1(move _5, move _9) -> [return: bb2, unwind: bb5]
|
||||
34:5-34:56: @2.Call: _3 = _print(move _4) -> [return: bb3, unwind: bb5]
|
||||
34:5-34:56: @3[6]: _2 = const ()
|
||||
33:50-35:2: @3[8]: _0 = const ()
|
||||
35:2-35:2: @4.Return: return"><span class="annotation">@0,1,2,3,4⦊</span>pub fn unused_generic_function<T: Debug>(arg: T) {</span></span>
|
||||
<span class="line"><span class="code even" style="--layer: 1" title="34:14-34:49: @0[6]: _19 = const unused_generic_function::<T>::promoted[0]
|
||||
34:14-34:49: @0[7]: _7 = &(*_19)
|
||||
34:14-34:49: @0[8]: _6 = &(*_7)
|
||||
34:14-34:49: @0[9]: _5 = move _6 as &[&str] (Pointer(Unsize))
|
||||
34:51-34:54: @0[17]: _14 = &_1
|
||||
34:5-34:56: @0[18]: _13 = (move _14,)
|
||||
34:5-34:56: @0[20]: FakeRead(ForMatchedPlace, _13)
|
||||
34:5-34:56: @0[22]: _15 = (_13.0: &T)
|
||||
34:5-34:56: @0[25]: _17 = &(*_15)
|
||||
34:5-34:56: @0[27]: _18 = <T as Debug>::fmt as for<'r, 's, 't0> fn(&'r T, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error> (Pointer(ReifyFnPointer))
|
||||
34:5-34:56: @0.Call: _16 = ArgumentV1::new::<T>(move _17, move _18) -> [return: bb1, unwind: bb5]
|
||||
34:5-34:56: @1[2]: _12 = [move _16]
|
||||
34:5-34:56: @1[5]: _11 = &_12
|
||||
34:5-34:56: @1[6]: _10 = &(*_11)
|
||||
34:5-34:56: @1[7]: _9 = move _10 as &[std::fmt::ArgumentV1] (Pointer(Unsize))
|
||||
34:5-34:56: @1.Call: _4 = Arguments::new_v1(move _5, move _9) -> [return: bb2, unwind: bb5]
|
||||
34:5-34:56: @2.Call: _3 = _print(move _4) -> [return: bb3, unwind: bb5]
|
||||
34:5-34:56: @3[6]: _2 = const ()
|
||||
33:50-35:2: @3[8]: _0 = const ()
|
||||
35:2-35:2: @4.Return: return"> println!("unused_generic_function with {:?}", arg);</span></span>
|
||||
<span class="line"><span class="code even" style="--layer: 1" title="34:14-34:49: @0[6]: _19 = const unused_generic_function::<T>::promoted[0]
|
||||
34:14-34:49: @0[7]: _7 = &(*_19)
|
||||
34:14-34:49: @0[8]: _6 = &(*_7)
|
||||
34:14-34:49: @0[9]: _5 = move _6 as &[&str] (Pointer(Unsize))
|
||||
34:51-34:54: @0[17]: _14 = &_1
|
||||
34:5-34:56: @0[18]: _13 = (move _14,)
|
||||
34:5-34:56: @0[20]: FakeRead(ForMatchedPlace, _13)
|
||||
34:5-34:56: @0[22]: _15 = (_13.0: &T)
|
||||
34:5-34:56: @0[25]: _17 = &(*_15)
|
||||
34:5-34:56: @0[27]: _18 = <T as Debug>::fmt as for<'r, 's, 't0> fn(&'r T, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error> (Pointer(ReifyFnPointer))
|
||||
34:5-34:56: @0.Call: _16 = ArgumentV1::new::<T>(move _17, move _18) -> [return: bb1, unwind: bb5]
|
||||
34:5-34:56: @1[2]: _12 = [move _16]
|
||||
34:5-34:56: @1[5]: _11 = &_12
|
||||
34:5-34:56: @1[6]: _10 = &(*_11)
|
||||
34:5-34:56: @1[7]: _9 = move _10 as &[std::fmt::ArgumentV1] (Pointer(Unsize))
|
||||
34:5-34:56: @1.Call: _4 = Arguments::new_v1(move _5, move _9) -> [return: bb2, unwind: bb5]
|
||||
34:5-34:56: @2.Call: _3 = _print(move _4) -> [return: bb3, unwind: bb5]
|
||||
34:5-34:56: @3[6]: _2 = const ()
|
||||
33:50-35:2: @3[8]: _0 = const ()
|
||||
35:2-35:2: @4.Return: return">}<span class="annotation">⦉@0,1,2,3,4</span></span></span></span></div>
|
||||
</body>
|
||||
</html>
|
@ -2,7 +2,7 @@
|
||||
<!--
|
||||
|
||||
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
|
||||
https://htmlpreview.github.io/?https://github.com/rust-lang/rust/blob/master/src/test/run-make-fulldeps/coverage-spanview/expected_mir_dump.used_crate/used_crate.unused_private_function.-------.InstrumentCoverage.0.html
|
||||
|
||||
For revisions in Pull Requests (PR):
|
||||
* Replace "rust-lang" with the github PR author
|
||||
@ -11,7 +11,7 @@ For revisions in Pull Requests (PR):
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<title>uses_crate.used_crate-unused_function - Coverage Spans</title>
|
||||
<title>used_crate.unused_private_function - Coverage Spans</title>
|
||||
<style>
|
||||
.line {
|
||||
counter-increment: line;
|
||||
@ -69,51 +69,51 @@ For revisions in Pull Requests (PR):
|
||||
</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() -> [return: bb1, unwind: bb9]
|
||||
30:19-30:35: @1[0]: _3 = &_4
|
||||
30:19-30:41: @1.Call: _2 = <Args as ExactSizeIterator>::len(move _3) -> [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() -> [return: bb1, unwind: bb9]
|
||||
30:19-30:35: @1[0]: _3 = &_4
|
||||
30:19-30:41: @1.Call: _2 = <Args as ExactSizeIterator>::len(move _3) -> [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() -> [return: bb1, unwind: bb9]
|
||||
30:19-30:35: @1[0]: _3 = &_4
|
||||
30:19-30:41: @1.Call: _2 = <Args as ExactSizeIterator>::len(move _3) -> [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() -> [return: bb1, unwind: bb9]
|
||||
30:19-30:35: @1[0]: _3 = &_4
|
||||
30:19-30:41: @1.Call: _2 = <Args as ExactSizeIterator>::len(move _3) -> [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>
|
||||
<div class="code" style="counter-reset: line 44"><span class="line"><span><span class="code even" style="--layer: 1" title="46:19-46:35: @0.Call: _4 = args() -> [return: bb1, unwind: bb9]
|
||||
46:19-46:35: @1[0]: _3 = &_4
|
||||
46:19-46:41: @1.Call: _2 = <Args as ExactSizeIterator>::len(move _3) -> [return: bb2, unwind: bb8]
|
||||
46:19-46:46: @2[1]: _1 = Eq(move _2, const 1_usize)
|
||||
46:9-46:16: @2[3]: FakeRead(ForLet, _1)
|
||||
47:25-47:26: @3[2]: _5 = const 2_i32
|
||||
47:9-47:22: @3[3]: FakeRead(ForLet, _5)
|
||||
48:9-48:16: @3[6]: _7 = _1
|
||||
48:8-48:16: @3[7]: _6 = Not(move _7)
|
||||
48:8-48: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="46:19-46:35: @0.Call: _4 = args() -> [return: bb1, unwind: bb9]
|
||||
46:19-46:35: @1[0]: _3 = &_4
|
||||
46:19-46:41: @1.Call: _2 = <Args as ExactSizeIterator>::len(move _3) -> [return: bb2, unwind: bb8]
|
||||
46:19-46:46: @2[1]: _1 = Eq(move _2, const 1_usize)
|
||||
46:9-46:16: @2[3]: FakeRead(ForLet, _1)
|
||||
47:25-47:26: @3[2]: _5 = const 2_i32
|
||||
47:9-47:22: @3[3]: FakeRead(ForLet, _5)
|
||||
48:9-48:16: @3[6]: _7 = _1
|
||||
48:8-48:16: @3[7]: _6 = Not(move _7)
|
||||
48:8-48: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="46:19-46:35: @0.Call: _4 = args() -> [return: bb1, unwind: bb9]
|
||||
46:19-46:35: @1[0]: _3 = &_4
|
||||
46:19-46:41: @1.Call: _2 = <Args as ExactSizeIterator>::len(move _3) -> [return: bb2, unwind: bb8]
|
||||
46:19-46:46: @2[1]: _1 = Eq(move _2, const 1_usize)
|
||||
46:9-46:16: @2[3]: FakeRead(ForLet, _1)
|
||||
47:25-47:26: @3[2]: _5 = const 2_i32
|
||||
47:9-47:22: @3[3]: FakeRead(ForLet, _5)
|
||||
48:9-48:16: @3[6]: _7 = _1
|
||||
48:8-48:16: @3[7]: _6 = Not(move _7)
|
||||
48:8-48:16: @3[9]: FakeRead(ForMatchedPlace, _6)"> let mut countdown = 2;</span></span>
|
||||
<span class="line"><span class="code even" style="--layer: 1" title="46:19-46:35: @0.Call: _4 = args() -> [return: bb1, unwind: bb9]
|
||||
46:19-46:35: @1[0]: _3 = &_4
|
||||
46:19-46:41: @1.Call: _2 = <Args as ExactSizeIterator>::len(move _3) -> [return: bb2, unwind: bb8]
|
||||
46:19-46:46: @2[1]: _1 = Eq(move _2, const 1_usize)
|
||||
46:9-46:16: @2[3]: FakeRead(ForLet, _1)
|
||||
47:25-47:26: @3[2]: _5 = const 2_i32
|
||||
47:9-47:22: @3[3]: FakeRead(ForLet, _5)
|
||||
48:9-48:16: @3[6]: _7 = _1
|
||||
48:8-48:16: @3[7]: _6 = Not(move _7)
|
||||
48:8-48: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="49:9-49:23: @6[0]: _5 = const 20_i32
|
||||
48:17-50:6: @6[1]: _0 = const ()"><span class="annotation">@4,6⦊</span>{</span></span>
|
||||
<span class="line"><span class="code odd" style="--layer: 1" title="49:9-49:23: @6[0]: _5 = const 20_i32
|
||||
48:17-50:6: @6[1]: _0 = const ()"> countdown = 20;</span></span>
|
||||
<span class="line"><span class="code odd" style="--layer: 1" title="49:9-49:23: @6[0]: _5 = const 20_i32
|
||||
48:17-50:6: @6[1]: _0 = const ()"> }<span class="annotation">⦉@4,6</span></span></span><span><span class="code even" style="--layer: 1" title="50:6-50: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="51:2-51:2: @7.Return: return"><span class="annotation">@7⦊</span>‸<span class="annotation">⦉@7</span></span></span></span></div>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,190 @@
|
||||
<!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.used_crate/used_crate.use_this_lib_crate.-------.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>used_crate.use_this_lib_crate - 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 52"><span class="line"><span><span class="code even" style="--layer: 1" title="54:5-54:90: @0.Call: _1 = used_from_bin_crate_and_lib_crate_generic_function::<&str>(const "used from library used_crate.rs") -> [return: bb1, unwind: bb13]
|
||||
55:5-57:6: @1.Call: _2 = used_with_same_type_from_bin_crate_and_lib_crate_generic_function::<&str>(const "used from library used_crate.rs") -> [return: bb2, unwind: bb13]
|
||||
58:20-58:36: @2[5]: _6 = Box([i32; 4])
|
||||
58:20-58:36: @2[6]: (*_6) = [const 5_i32, const 6_i32, const 7_i32, const 8_i32]
|
||||
58:20-58:36: @2[7]: _5 = move _6
|
||||
58:20-58:36: @2[8]: _4 = move _5 as std::boxed::Box<[i32]> (Pointer(Unsize))
|
||||
58:20-58:36: @4.Call: _3 = slice::<impl [i32]>::into_vec::<std::alloc::Global>(move _4) -> [return: bb5, unwind: bb12]
|
||||
58:9-58:17: @5[1]: FakeRead(ForLet, _3)
|
||||
59:52-59:60: @5[4]: _8 = move _3
|
||||
59:5-59:61: @5.Call: _7 = used_only_from_this_lib_crate_generic_function::<Vec<i32>>(move _8) -> [return: bb6, unwind: bb9]
|
||||
60:5-60:91: @6.Call: _9 = used_only_from_this_lib_crate_generic_function::<&str>(const "used ONLY from library used_crate.rs") -> [return: bb7, unwind: bb10]
|
||||
53:25-61:2: @7[1]: _0 = const ()
|
||||
61:2-61:2: @8.Return: return"><span class="annotation">@0,1,2,3,4,5,6,7,8⦊</span>fn use_this_lib_crate() {</span></span>
|
||||
<span class="line"><span class="code even" style="--layer: 1" title="54:5-54:90: @0.Call: _1 = used_from_bin_crate_and_lib_crate_generic_function::<&str>(const "used from library used_crate.rs") -> [return: bb1, unwind: bb13]
|
||||
55:5-57:6: @1.Call: _2 = used_with_same_type_from_bin_crate_and_lib_crate_generic_function::<&str>(const "used from library used_crate.rs") -> [return: bb2, unwind: bb13]
|
||||
58:20-58:36: @2[5]: _6 = Box([i32; 4])
|
||||
58:20-58:36: @2[6]: (*_6) = [const 5_i32, const 6_i32, const 7_i32, const 8_i32]
|
||||
58:20-58:36: @2[7]: _5 = move _6
|
||||
58:20-58:36: @2[8]: _4 = move _5 as std::boxed::Box<[i32]> (Pointer(Unsize))
|
||||
58:20-58:36: @4.Call: _3 = slice::<impl [i32]>::into_vec::<std::alloc::Global>(move _4) -> [return: bb5, unwind: bb12]
|
||||
58:9-58:17: @5[1]: FakeRead(ForLet, _3)
|
||||
59:52-59:60: @5[4]: _8 = move _3
|
||||
59:5-59:61: @5.Call: _7 = used_only_from_this_lib_crate_generic_function::<Vec<i32>>(move _8) -> [return: bb6, unwind: bb9]
|
||||
60:5-60:91: @6.Call: _9 = used_only_from_this_lib_crate_generic_function::<&str>(const "used ONLY from library used_crate.rs") -> [return: bb7, unwind: bb10]
|
||||
53:25-61:2: @7[1]: _0 = const ()
|
||||
61:2-61:2: @8.Return: return"> used_from_bin_crate_and_lib_crate_generic_function("used from library used_crate.rs");</span></span>
|
||||
<span class="line"><span class="code even" style="--layer: 1" title="54:5-54:90: @0.Call: _1 = used_from_bin_crate_and_lib_crate_generic_function::<&str>(const "used from library used_crate.rs") -> [return: bb1, unwind: bb13]
|
||||
55:5-57:6: @1.Call: _2 = used_with_same_type_from_bin_crate_and_lib_crate_generic_function::<&str>(const "used from library used_crate.rs") -> [return: bb2, unwind: bb13]
|
||||
58:20-58:36: @2[5]: _6 = Box([i32; 4])
|
||||
58:20-58:36: @2[6]: (*_6) = [const 5_i32, const 6_i32, const 7_i32, const 8_i32]
|
||||
58:20-58:36: @2[7]: _5 = move _6
|
||||
58:20-58:36: @2[8]: _4 = move _5 as std::boxed::Box<[i32]> (Pointer(Unsize))
|
||||
58:20-58:36: @4.Call: _3 = slice::<impl [i32]>::into_vec::<std::alloc::Global>(move _4) -> [return: bb5, unwind: bb12]
|
||||
58:9-58:17: @5[1]: FakeRead(ForLet, _3)
|
||||
59:52-59:60: @5[4]: _8 = move _3
|
||||
59:5-59:61: @5.Call: _7 = used_only_from_this_lib_crate_generic_function::<Vec<i32>>(move _8) -> [return: bb6, unwind: bb9]
|
||||
60:5-60:91: @6.Call: _9 = used_only_from_this_lib_crate_generic_function::<&str>(const "used ONLY from library used_crate.rs") -> [return: bb7, unwind: bb10]
|
||||
53:25-61:2: @7[1]: _0 = const ()
|
||||
61:2-61:2: @8.Return: return"> used_with_same_type_from_bin_crate_and_lib_crate_generic_function(</span></span>
|
||||
<span class="line"><span class="code even" style="--layer: 1" title="54:5-54:90: @0.Call: _1 = used_from_bin_crate_and_lib_crate_generic_function::<&str>(const "used from library used_crate.rs") -> [return: bb1, unwind: bb13]
|
||||
55:5-57:6: @1.Call: _2 = used_with_same_type_from_bin_crate_and_lib_crate_generic_function::<&str>(const "used from library used_crate.rs") -> [return: bb2, unwind: bb13]
|
||||
58:20-58:36: @2[5]: _6 = Box([i32; 4])
|
||||
58:20-58:36: @2[6]: (*_6) = [const 5_i32, const 6_i32, const 7_i32, const 8_i32]
|
||||
58:20-58:36: @2[7]: _5 = move _6
|
||||
58:20-58:36: @2[8]: _4 = move _5 as std::boxed::Box<[i32]> (Pointer(Unsize))
|
||||
58:20-58:36: @4.Call: _3 = slice::<impl [i32]>::into_vec::<std::alloc::Global>(move _4) -> [return: bb5, unwind: bb12]
|
||||
58:9-58:17: @5[1]: FakeRead(ForLet, _3)
|
||||
59:52-59:60: @5[4]: _8 = move _3
|
||||
59:5-59:61: @5.Call: _7 = used_only_from_this_lib_crate_generic_function::<Vec<i32>>(move _8) -> [return: bb6, unwind: bb9]
|
||||
60:5-60:91: @6.Call: _9 = used_only_from_this_lib_crate_generic_function::<&str>(const "used ONLY from library used_crate.rs") -> [return: bb7, unwind: bb10]
|
||||
53:25-61:2: @7[1]: _0 = const ()
|
||||
61:2-61:2: @8.Return: return"> "used from library used_crate.rs",</span></span>
|
||||
<span class="line"><span class="code even" style="--layer: 1" title="54:5-54:90: @0.Call: _1 = used_from_bin_crate_and_lib_crate_generic_function::<&str>(const "used from library used_crate.rs") -> [return: bb1, unwind: bb13]
|
||||
55:5-57:6: @1.Call: _2 = used_with_same_type_from_bin_crate_and_lib_crate_generic_function::<&str>(const "used from library used_crate.rs") -> [return: bb2, unwind: bb13]
|
||||
58:20-58:36: @2[5]: _6 = Box([i32; 4])
|
||||
58:20-58:36: @2[6]: (*_6) = [const 5_i32, const 6_i32, const 7_i32, const 8_i32]
|
||||
58:20-58:36: @2[7]: _5 = move _6
|
||||
58:20-58:36: @2[8]: _4 = move _5 as std::boxed::Box<[i32]> (Pointer(Unsize))
|
||||
58:20-58:36: @4.Call: _3 = slice::<impl [i32]>::into_vec::<std::alloc::Global>(move _4) -> [return: bb5, unwind: bb12]
|
||||
58:9-58:17: @5[1]: FakeRead(ForLet, _3)
|
||||
59:52-59:60: @5[4]: _8 = move _3
|
||||
59:5-59:61: @5.Call: _7 = used_only_from_this_lib_crate_generic_function::<Vec<i32>>(move _8) -> [return: bb6, unwind: bb9]
|
||||
60:5-60:91: @6.Call: _9 = used_only_from_this_lib_crate_generic_function::<&str>(const "used ONLY from library used_crate.rs") -> [return: bb7, unwind: bb10]
|
||||
53:25-61:2: @7[1]: _0 = const ()
|
||||
61:2-61:2: @8.Return: return"> );</span></span>
|
||||
<span class="line"><span class="code even" style="--layer: 1" title="54:5-54:90: @0.Call: _1 = used_from_bin_crate_and_lib_crate_generic_function::<&str>(const "used from library used_crate.rs") -> [return: bb1, unwind: bb13]
|
||||
55:5-57:6: @1.Call: _2 = used_with_same_type_from_bin_crate_and_lib_crate_generic_function::<&str>(const "used from library used_crate.rs") -> [return: bb2, unwind: bb13]
|
||||
58:20-58:36: @2[5]: _6 = Box([i32; 4])
|
||||
58:20-58:36: @2[6]: (*_6) = [const 5_i32, const 6_i32, const 7_i32, const 8_i32]
|
||||
58:20-58:36: @2[7]: _5 = move _6
|
||||
58:20-58:36: @2[8]: _4 = move _5 as std::boxed::Box<[i32]> (Pointer(Unsize))
|
||||
58:20-58:36: @4.Call: _3 = slice::<impl [i32]>::into_vec::<std::alloc::Global>(move _4) -> [return: bb5, unwind: bb12]
|
||||
58:9-58:17: @5[1]: FakeRead(ForLet, _3)
|
||||
59:52-59:60: @5[4]: _8 = move _3
|
||||
59:5-59:61: @5.Call: _7 = used_only_from_this_lib_crate_generic_function::<Vec<i32>>(move _8) -> [return: bb6, unwind: bb9]
|
||||
60:5-60:91: @6.Call: _9 = used_only_from_this_lib_crate_generic_function::<&str>(const "used ONLY from library used_crate.rs") -> [return: bb7, unwind: bb10]
|
||||
53:25-61:2: @7[1]: _0 = const ()
|
||||
61:2-61:2: @8.Return: return"> let some_vec = vec![5, 6, 7, 8];</span></span>
|
||||
<span class="line"><span class="code even" style="--layer: 1" title="54:5-54:90: @0.Call: _1 = used_from_bin_crate_and_lib_crate_generic_function::<&str>(const "used from library used_crate.rs") -> [return: bb1, unwind: bb13]
|
||||
55:5-57:6: @1.Call: _2 = used_with_same_type_from_bin_crate_and_lib_crate_generic_function::<&str>(const "used from library used_crate.rs") -> [return: bb2, unwind: bb13]
|
||||
58:20-58:36: @2[5]: _6 = Box([i32; 4])
|
||||
58:20-58:36: @2[6]: (*_6) = [const 5_i32, const 6_i32, const 7_i32, const 8_i32]
|
||||
58:20-58:36: @2[7]: _5 = move _6
|
||||
58:20-58:36: @2[8]: _4 = move _5 as std::boxed::Box<[i32]> (Pointer(Unsize))
|
||||
58:20-58:36: @4.Call: _3 = slice::<impl [i32]>::into_vec::<std::alloc::Global>(move _4) -> [return: bb5, unwind: bb12]
|
||||
58:9-58:17: @5[1]: FakeRead(ForLet, _3)
|
||||
59:52-59:60: @5[4]: _8 = move _3
|
||||
59:5-59:61: @5.Call: _7 = used_only_from_this_lib_crate_generic_function::<Vec<i32>>(move _8) -> [return: bb6, unwind: bb9]
|
||||
60:5-60:91: @6.Call: _9 = used_only_from_this_lib_crate_generic_function::<&str>(const "used ONLY from library used_crate.rs") -> [return: bb7, unwind: bb10]
|
||||
53:25-61:2: @7[1]: _0 = const ()
|
||||
61:2-61:2: @8.Return: return"> used_only_from_this_lib_crate_generic_function(some_vec);</span></span>
|
||||
<span class="line"><span class="code even" style="--layer: 1" title="54:5-54:90: @0.Call: _1 = used_from_bin_crate_and_lib_crate_generic_function::<&str>(const "used from library used_crate.rs") -> [return: bb1, unwind: bb13]
|
||||
55:5-57:6: @1.Call: _2 = used_with_same_type_from_bin_crate_and_lib_crate_generic_function::<&str>(const "used from library used_crate.rs") -> [return: bb2, unwind: bb13]
|
||||
58:20-58:36: @2[5]: _6 = Box([i32; 4])
|
||||
58:20-58:36: @2[6]: (*_6) = [const 5_i32, const 6_i32, const 7_i32, const 8_i32]
|
||||
58:20-58:36: @2[7]: _5 = move _6
|
||||
58:20-58:36: @2[8]: _4 = move _5 as std::boxed::Box<[i32]> (Pointer(Unsize))
|
||||
58:20-58:36: @4.Call: _3 = slice::<impl [i32]>::into_vec::<std::alloc::Global>(move _4) -> [return: bb5, unwind: bb12]
|
||||
58:9-58:17: @5[1]: FakeRead(ForLet, _3)
|
||||
59:52-59:60: @5[4]: _8 = move _3
|
||||
59:5-59:61: @5.Call: _7 = used_only_from_this_lib_crate_generic_function::<Vec<i32>>(move _8) -> [return: bb6, unwind: bb9]
|
||||
60:5-60:91: @6.Call: _9 = used_only_from_this_lib_crate_generic_function::<&str>(const "used ONLY from library used_crate.rs") -> [return: bb7, unwind: bb10]
|
||||
53:25-61:2: @7[1]: _0 = const ()
|
||||
61:2-61:2: @8.Return: return"> used_only_from_this_lib_crate_generic_function("used ONLY from library used_crate.rs");</span></span>
|
||||
<span class="line"><span class="code even" style="--layer: 1" title="54:5-54:90: @0.Call: _1 = used_from_bin_crate_and_lib_crate_generic_function::<&str>(const "used from library used_crate.rs") -> [return: bb1, unwind: bb13]
|
||||
55:5-57:6: @1.Call: _2 = used_with_same_type_from_bin_crate_and_lib_crate_generic_function::<&str>(const "used from library used_crate.rs") -> [return: bb2, unwind: bb13]
|
||||
58:20-58:36: @2[5]: _6 = Box([i32; 4])
|
||||
58:20-58:36: @2[6]: (*_6) = [const 5_i32, const 6_i32, const 7_i32, const 8_i32]
|
||||
58:20-58:36: @2[7]: _5 = move _6
|
||||
58:20-58:36: @2[8]: _4 = move _5 as std::boxed::Box<[i32]> (Pointer(Unsize))
|
||||
58:20-58:36: @4.Call: _3 = slice::<impl [i32]>::into_vec::<std::alloc::Global>(move _4) -> [return: bb5, unwind: bb12]
|
||||
58:9-58:17: @5[1]: FakeRead(ForLet, _3)
|
||||
59:52-59:60: @5[4]: _8 = move _3
|
||||
59:5-59:61: @5.Call: _7 = used_only_from_this_lib_crate_generic_function::<Vec<i32>>(move _8) -> [return: bb6, unwind: bb9]
|
||||
60:5-60:91: @6.Call: _9 = used_only_from_this_lib_crate_generic_function::<&str>(const "used ONLY from library used_crate.rs") -> [return: bb7, unwind: bb10]
|
||||
53:25-61:2: @7[1]: _0 = const ()
|
||||
61:2-61:2: @8.Return: return">}<span class="annotation">⦉@0,1,2,3,4,5,6,7,8</span></span></span></span></div>
|
||||
</body>
|
||||
</html>
|
@ -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.used_crate/used_crate.used_from_bin_crate_and_lib_crate_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>used_crate.used_from_bin_crate_and_lib_crate_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:76: @0[6]: _19 = const used_from_bin_crate_and_lib_crate_generic_function::<T>::promoted[0]
|
||||
26:14-26:76: @0[7]: _7 = &(*_19)
|
||||
26:14-26:76: @0[8]: _6 = &(*_7)
|
||||
26:14-26:76: @0[9]: _5 = move _6 as &[&str] (Pointer(Unsize))
|
||||
26:78-26:81: @0[17]: _14 = &_1
|
||||
26:5-26:83: @0[18]: _13 = (move _14,)
|
||||
26:5-26:83: @0[20]: FakeRead(ForMatchedPlace, _13)
|
||||
26:5-26:83: @0[22]: _15 = (_13.0: &T)
|
||||
26:5-26:83: @0[25]: _17 = &(*_15)
|
||||
26:5-26:83: @0[27]: _18 = <T as Debug>::fmt as for<'r, 's, 't0> fn(&'r T, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error> (Pointer(ReifyFnPointer))
|
||||
26:5-26:83: @0.Call: _16 = ArgumentV1::new::<T>(move _17, move _18) -> [return: bb1, unwind: bb5]
|
||||
26:5-26:83: @1[2]: _12 = [move _16]
|
||||
26:5-26:83: @1[5]: _11 = &_12
|
||||
26:5-26:83: @1[6]: _10 = &(*_11)
|
||||
26:5-26:83: @1[7]: _9 = move _10 as &[std::fmt::ArgumentV1] (Pointer(Unsize))
|
||||
26:5-26:83: @1.Call: _4 = Arguments::new_v1(move _5, move _9) -> [return: bb2, unwind: bb5]
|
||||
26:5-26:83: @2.Call: _3 = _print(move _4) -> [return: bb3, unwind: bb5]
|
||||
26:5-26:83: @3[6]: _2 = const ()
|
||||
25:77-27:2: @3[8]: _0 = const ()
|
||||
27:2-27:2: @4.Return: return"><span class="annotation">@0,1,2,3,4⦊</span>pub fn used_from_bin_crate_and_lib_crate_generic_function<T: Debug>(arg: T) {</span></span>
|
||||
<span class="line"><span class="code even" style="--layer: 1" title="26:14-26:76: @0[6]: _19 = const used_from_bin_crate_and_lib_crate_generic_function::<T>::promoted[0]
|
||||
26:14-26:76: @0[7]: _7 = &(*_19)
|
||||
26:14-26:76: @0[8]: _6 = &(*_7)
|
||||
26:14-26:76: @0[9]: _5 = move _6 as &[&str] (Pointer(Unsize))
|
||||
26:78-26:81: @0[17]: _14 = &_1
|
||||
26:5-26:83: @0[18]: _13 = (move _14,)
|
||||
26:5-26:83: @0[20]: FakeRead(ForMatchedPlace, _13)
|
||||
26:5-26:83: @0[22]: _15 = (_13.0: &T)
|
||||
26:5-26:83: @0[25]: _17 = &(*_15)
|
||||
26:5-26:83: @0[27]: _18 = <T as Debug>::fmt as for<'r, 's, 't0> fn(&'r T, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error> (Pointer(ReifyFnPointer))
|
||||
26:5-26:83: @0.Call: _16 = ArgumentV1::new::<T>(move _17, move _18) -> [return: bb1, unwind: bb5]
|
||||
26:5-26:83: @1[2]: _12 = [move _16]
|
||||
26:5-26:83: @1[5]: _11 = &_12
|
||||
26:5-26:83: @1[6]: _10 = &(*_11)
|
||||
26:5-26:83: @1[7]: _9 = move _10 as &[std::fmt::ArgumentV1] (Pointer(Unsize))
|
||||
26:5-26:83: @1.Call: _4 = Arguments::new_v1(move _5, move _9) -> [return: bb2, unwind: bb5]
|
||||
26:5-26:83: @2.Call: _3 = _print(move _4) -> [return: bb3, unwind: bb5]
|
||||
26:5-26:83: @3[6]: _2 = const ()
|
||||
25:77-27:2: @3[8]: _0 = const ()
|
||||
27:2-27:2: @4.Return: return"> println!("used_from_bin_crate_and_lib_crate_generic_function with {:?}", arg);</span></span>
|
||||
<span class="line"><span class="code even" style="--layer: 1" title="26:14-26:76: @0[6]: _19 = const used_from_bin_crate_and_lib_crate_generic_function::<T>::promoted[0]
|
||||
26:14-26:76: @0[7]: _7 = &(*_19)
|
||||
26:14-26:76: @0[8]: _6 = &(*_7)
|
||||
26:14-26:76: @0[9]: _5 = move _6 as &[&str] (Pointer(Unsize))
|
||||
26:78-26:81: @0[17]: _14 = &_1
|
||||
26:5-26:83: @0[18]: _13 = (move _14,)
|
||||
26:5-26:83: @0[20]: FakeRead(ForMatchedPlace, _13)
|
||||
26:5-26:83: @0[22]: _15 = (_13.0: &T)
|
||||
26:5-26:83: @0[25]: _17 = &(*_15)
|
||||
26:5-26:83: @0[27]: _18 = <T as Debug>::fmt as for<'r, 's, 't0> fn(&'r T, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error> (Pointer(ReifyFnPointer))
|
||||
26:5-26:83: @0.Call: _16 = ArgumentV1::new::<T>(move _17, move _18) -> [return: bb1, unwind: bb5]
|
||||
26:5-26:83: @1[2]: _12 = [move _16]
|
||||
26:5-26:83: @1[5]: _11 = &_12
|
||||
26:5-26:83: @1[6]: _10 = &(*_11)
|
||||
26:5-26:83: @1[7]: _9 = move _10 as &[std::fmt::ArgumentV1] (Pointer(Unsize))
|
||||
26:5-26:83: @1.Call: _4 = Arguments::new_v1(move _5, move _9) -> [return: bb2, unwind: bb5]
|
||||
26:5-26:83: @2.Call: _3 = _print(move _4) -> [return: bb3, unwind: bb5]
|
||||
26:5-26:83: @3[6]: _2 = const ()
|
||||
25:77-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>
|
@ -2,7 +2,7 @@
|
||||
<!--
|
||||
|
||||
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
|
||||
https://htmlpreview.github.io/?https://github.com/rust-lang/rust/blob/master/src/test/run-make-fulldeps/coverage-spanview/expected_mir_dump.used_crate/used_crate.used_function.-------.InstrumentCoverage.0.html
|
||||
|
||||
For revisions in Pull Requests (PR):
|
||||
* Replace "rust-lang" with the github PR author
|
||||
@ -11,7 +11,7 @@ For revisions in Pull Requests (PR):
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<title>uses_crate.used_crate-used_function - Coverage Spans</title>
|
||||
<title>used_crate.used_function - Coverage Spans</title>
|
||||
<style>
|
||||
.line {
|
||||
counter-increment: line;
|
||||
@ -105,9 +105,9 @@ For revisions in Pull Requests (PR):
|
||||
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::<&str>(const "some str") -> [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::<&str>(const "some str") -> [return: bb8, unwind: bb10]
|
||||
<span class="line"><span class="code" style="--layer: 0"> </span><span><span class="code odd" style="--layer: 1" title="14:5-14:25: @7.Call: _8 = use_this_lib_crate() -> [return: bb8, unwind: bb10]
|
||||
15:2-15:2: @8.Return: return"><span class="annotation">@7,8⦊</span>use_this_lib_crate();</span></span>
|
||||
<span class="line"><span class="code odd" style="--layer: 1" title="14:5-14:25: @7.Call: _8 = use_this_lib_crate() -> [return: bb8, unwind: bb10]
|
||||
15:2-15:2: @8.Return: return">}<span class="annotation">⦉@7,8</span></span></span></span></div>
|
||||
</body>
|
||||
</html>
|
@ -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.used_crate/used_crate.used_only_from_bin_crate_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>used_crate.used_only_from_bin_crate_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:67: @0[6]: _19 = const used_only_from_bin_crate_generic_function::<T>::promoted[0]
|
||||
18:14-18:67: @0[7]: _7 = &(*_19)
|
||||
18:14-18:67: @0[8]: _6 = &(*_7)
|
||||
18:14-18:67: @0[9]: _5 = move _6 as &[&str] (Pointer(Unsize))
|
||||
18:69-18:72: @0[17]: _14 = &_1
|
||||
18:5-18:74: @0[18]: _13 = (move _14,)
|
||||
18:5-18:74: @0[20]: FakeRead(ForMatchedPlace, _13)
|
||||
18:5-18:74: @0[22]: _15 = (_13.0: &T)
|
||||
18:5-18:74: @0[25]: _17 = &(*_15)
|
||||
18:5-18:74: @0[27]: _18 = <T as Debug>::fmt as for<'r, 's, 't0> fn(&'r T, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error> (Pointer(ReifyFnPointer))
|
||||
18:5-18:74: @0.Call: _16 = ArgumentV1::new::<T>(move _17, move _18) -> [return: bb1, unwind: bb5]
|
||||
18:5-18:74: @1[2]: _12 = [move _16]
|
||||
18:5-18:74: @1[5]: _11 = &_12
|
||||
18:5-18:74: @1[6]: _10 = &(*_11)
|
||||
18:5-18:74: @1[7]: _9 = move _10 as &[std::fmt::ArgumentV1] (Pointer(Unsize))
|
||||
18:5-18:74: @1.Call: _4 = Arguments::new_v1(move _5, move _9) -> [return: bb2, unwind: bb5]
|
||||
18:5-18:74: @2.Call: _3 = _print(move _4) -> [return: bb3, unwind: bb5]
|
||||
18:5-18:74: @3[6]: _2 = const ()
|
||||
17:68-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_only_from_bin_crate_generic_function<T: Debug>(arg: T) {</span></span>
|
||||
<span class="line"><span class="code even" style="--layer: 1" title="18:14-18:67: @0[6]: _19 = const used_only_from_bin_crate_generic_function::<T>::promoted[0]
|
||||
18:14-18:67: @0[7]: _7 = &(*_19)
|
||||
18:14-18:67: @0[8]: _6 = &(*_7)
|
||||
18:14-18:67: @0[9]: _5 = move _6 as &[&str] (Pointer(Unsize))
|
||||
18:69-18:72: @0[17]: _14 = &_1
|
||||
18:5-18:74: @0[18]: _13 = (move _14,)
|
||||
18:5-18:74: @0[20]: FakeRead(ForMatchedPlace, _13)
|
||||
18:5-18:74: @0[22]: _15 = (_13.0: &T)
|
||||
18:5-18:74: @0[25]: _17 = &(*_15)
|
||||
18:5-18:74: @0[27]: _18 = <T as Debug>::fmt as for<'r, 's, 't0> fn(&'r T, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error> (Pointer(ReifyFnPointer))
|
||||
18:5-18:74: @0.Call: _16 = ArgumentV1::new::<T>(move _17, move _18) -> [return: bb1, unwind: bb5]
|
||||
18:5-18:74: @1[2]: _12 = [move _16]
|
||||
18:5-18:74: @1[5]: _11 = &_12
|
||||
18:5-18:74: @1[6]: _10 = &(*_11)
|
||||
18:5-18:74: @1[7]: _9 = move _10 as &[std::fmt::ArgumentV1] (Pointer(Unsize))
|
||||
18:5-18:74: @1.Call: _4 = Arguments::new_v1(move _5, move _9) -> [return: bb2, unwind: bb5]
|
||||
18:5-18:74: @2.Call: _3 = _print(move _4) -> [return: bb3, unwind: bb5]
|
||||
18:5-18:74: @3[6]: _2 = const ()
|
||||
17:68-19:2: @3[8]: _0 = const ()
|
||||
19:2-19:2: @4.Return: return"> println!("used_only_from_bin_crate_generic_function with {:?}", arg);</span></span>
|
||||
<span class="line"><span class="code even" style="--layer: 1" title="18:14-18:67: @0[6]: _19 = const used_only_from_bin_crate_generic_function::<T>::promoted[0]
|
||||
18:14-18:67: @0[7]: _7 = &(*_19)
|
||||
18:14-18:67: @0[8]: _6 = &(*_7)
|
||||
18:14-18:67: @0[9]: _5 = move _6 as &[&str] (Pointer(Unsize))
|
||||
18:69-18:72: @0[17]: _14 = &_1
|
||||
18:5-18:74: @0[18]: _13 = (move _14,)
|
||||
18:5-18:74: @0[20]: FakeRead(ForMatchedPlace, _13)
|
||||
18:5-18:74: @0[22]: _15 = (_13.0: &T)
|
||||
18:5-18:74: @0[25]: _17 = &(*_15)
|
||||
18:5-18:74: @0[27]: _18 = <T as Debug>::fmt as for<'r, 's, 't0> fn(&'r T, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error> (Pointer(ReifyFnPointer))
|
||||
18:5-18:74: @0.Call: _16 = ArgumentV1::new::<T>(move _17, move _18) -> [return: bb1, unwind: bb5]
|
||||
18:5-18:74: @1[2]: _12 = [move _16]
|
||||
18:5-18:74: @1[5]: _11 = &_12
|
||||
18:5-18:74: @1[6]: _10 = &(*_11)
|
||||
18:5-18:74: @1[7]: _9 = move _10 as &[std::fmt::ArgumentV1] (Pointer(Unsize))
|
||||
18:5-18:74: @1.Call: _4 = Arguments::new_v1(move _5, move _9) -> [return: bb2, unwind: bb5]
|
||||
18:5-18:74: @2.Call: _3 = _print(move _4) -> [return: bb3, unwind: bb5]
|
||||
18:5-18:74: @3[6]: _2 = const ()
|
||||
17:68-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>
|
@ -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.used_crate/used_crate.used_only_from_this_lib_crate_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>used_crate.used_only_from_this_lib_crate_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:72: @0[6]: _19 = const used_only_from_this_lib_crate_generic_function::<T>::promoted[0]
|
||||
22:14-22:72: @0[7]: _7 = &(*_19)
|
||||
22:14-22:72: @0[8]: _6 = &(*_7)
|
||||
22:14-22:72: @0[9]: _5 = move _6 as &[&str] (Pointer(Unsize))
|
||||
22:74-22:77: @0[17]: _14 = &_1
|
||||
22:5-22:79: @0[18]: _13 = (move _14,)
|
||||
22:5-22:79: @0[20]: FakeRead(ForMatchedPlace, _13)
|
||||
22:5-22:79: @0[22]: _15 = (_13.0: &T)
|
||||
22:5-22:79: @0[25]: _17 = &(*_15)
|
||||
22:5-22:79: @0[27]: _18 = <T as Debug>::fmt as for<'r, 's, 't0> fn(&'r T, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error> (Pointer(ReifyFnPointer))
|
||||
22:5-22:79: @0.Call: _16 = ArgumentV1::new::<T>(move _17, move _18) -> [return: bb1, unwind: bb5]
|
||||
22:5-22:79: @1[2]: _12 = [move _16]
|
||||
22:5-22:79: @1[5]: _11 = &_12
|
||||
22:5-22:79: @1[6]: _10 = &(*_11)
|
||||
22:5-22:79: @1[7]: _9 = move _10 as &[std::fmt::ArgumentV1] (Pointer(Unsize))
|
||||
22:5-22:79: @1.Call: _4 = Arguments::new_v1(move _5, move _9) -> [return: bb2, unwind: bb5]
|
||||
22:5-22:79: @2.Call: _3 = _print(move _4) -> [return: bb3, unwind: bb5]
|
||||
22:5-22:79: @3[6]: _2 = const ()
|
||||
21:73-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_only_from_this_lib_crate_generic_function<T: Debug>(arg: T) {</span></span>
|
||||
<span class="line"><span class="code even" style="--layer: 1" title="22:14-22:72: @0[6]: _19 = const used_only_from_this_lib_crate_generic_function::<T>::promoted[0]
|
||||
22:14-22:72: @0[7]: _7 = &(*_19)
|
||||
22:14-22:72: @0[8]: _6 = &(*_7)
|
||||
22:14-22:72: @0[9]: _5 = move _6 as &[&str] (Pointer(Unsize))
|
||||
22:74-22:77: @0[17]: _14 = &_1
|
||||
22:5-22:79: @0[18]: _13 = (move _14,)
|
||||
22:5-22:79: @0[20]: FakeRead(ForMatchedPlace, _13)
|
||||
22:5-22:79: @0[22]: _15 = (_13.0: &T)
|
||||
22:5-22:79: @0[25]: _17 = &(*_15)
|
||||
22:5-22:79: @0[27]: _18 = <T as Debug>::fmt as for<'r, 's, 't0> fn(&'r T, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error> (Pointer(ReifyFnPointer))
|
||||
22:5-22:79: @0.Call: _16 = ArgumentV1::new::<T>(move _17, move _18) -> [return: bb1, unwind: bb5]
|
||||
22:5-22:79: @1[2]: _12 = [move _16]
|
||||
22:5-22:79: @1[5]: _11 = &_12
|
||||
22:5-22:79: @1[6]: _10 = &(*_11)
|
||||
22:5-22:79: @1[7]: _9 = move _10 as &[std::fmt::ArgumentV1] (Pointer(Unsize))
|
||||
22:5-22:79: @1.Call: _4 = Arguments::new_v1(move _5, move _9) -> [return: bb2, unwind: bb5]
|
||||
22:5-22:79: @2.Call: _3 = _print(move _4) -> [return: bb3, unwind: bb5]
|
||||
22:5-22:79: @3[6]: _2 = const ()
|
||||
21:73-23:2: @3[8]: _0 = const ()
|
||||
23:2-23:2: @4.Return: return"> println!("used_only_from_this_lib_crate_generic_function with {:?}", arg);</span></span>
|
||||
<span class="line"><span class="code even" style="--layer: 1" title="22:14-22:72: @0[6]: _19 = const used_only_from_this_lib_crate_generic_function::<T>::promoted[0]
|
||||
22:14-22:72: @0[7]: _7 = &(*_19)
|
||||
22:14-22:72: @0[8]: _6 = &(*_7)
|
||||
22:14-22:72: @0[9]: _5 = move _6 as &[&str] (Pointer(Unsize))
|
||||
22:74-22:77: @0[17]: _14 = &_1
|
||||
22:5-22:79: @0[18]: _13 = (move _14,)
|
||||
22:5-22:79: @0[20]: FakeRead(ForMatchedPlace, _13)
|
||||
22:5-22:79: @0[22]: _15 = (_13.0: &T)
|
||||
22:5-22:79: @0[25]: _17 = &(*_15)
|
||||
22:5-22:79: @0[27]: _18 = <T as Debug>::fmt as for<'r, 's, 't0> fn(&'r T, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error> (Pointer(ReifyFnPointer))
|
||||
22:5-22:79: @0.Call: _16 = ArgumentV1::new::<T>(move _17, move _18) -> [return: bb1, unwind: bb5]
|
||||
22:5-22:79: @1[2]: _12 = [move _16]
|
||||
22:5-22:79: @1[5]: _11 = &_12
|
||||
22:5-22:79: @1[6]: _10 = &(*_11)
|
||||
22:5-22:79: @1[7]: _9 = move _10 as &[std::fmt::ArgumentV1] (Pointer(Unsize))
|
||||
22:5-22:79: @1.Call: _4 = Arguments::new_v1(move _5, move _9) -> [return: bb2, unwind: bb5]
|
||||
22:5-22:79: @2.Call: _3 = _print(move _4) -> [return: bb3, unwind: bb5]
|
||||
22:5-22:79: @3[6]: _2 = const ()
|
||||
21:73-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>
|
@ -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.used_crate/used_crate.used_with_same_type_from_bin_crate_and_lib_crate_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>used_crate.used_with_same_type_from_bin_crate_and_lib_crate_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 28"><span class="line"><span><span class="code even" style="--layer: 1" title="30:14-30:91: @0[6]: _19 = const used_with_same_type_from_bin_crate_and_lib_crate_generic_function::<T>::promoted[0]
|
||||
30:14-30:91: @0[7]: _7 = &(*_19)
|
||||
30:14-30:91: @0[8]: _6 = &(*_7)
|
||||
30:14-30:91: @0[9]: _5 = move _6 as &[&str] (Pointer(Unsize))
|
||||
30:93-30:96: @0[17]: _14 = &_1
|
||||
30:5-30:98: @0[18]: _13 = (move _14,)
|
||||
30:5-30:98: @0[20]: FakeRead(ForMatchedPlace, _13)
|
||||
30:5-30:98: @0[22]: _15 = (_13.0: &T)
|
||||
30:5-30:98: @0[25]: _17 = &(*_15)
|
||||
30:5-30:98: @0[27]: _18 = <T as Debug>::fmt as for<'r, 's, 't0> fn(&'r T, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error> (Pointer(ReifyFnPointer))
|
||||
30:5-30:98: @0.Call: _16 = ArgumentV1::new::<T>(move _17, move _18) -> [return: bb1, unwind: bb5]
|
||||
30:5-30:98: @1[2]: _12 = [move _16]
|
||||
30:5-30:98: @1[5]: _11 = &_12
|
||||
30:5-30:98: @1[6]: _10 = &(*_11)
|
||||
30:5-30:98: @1[7]: _9 = move _10 as &[std::fmt::ArgumentV1] (Pointer(Unsize))
|
||||
30:5-30:98: @1.Call: _4 = Arguments::new_v1(move _5, move _9) -> [return: bb2, unwind: bb5]
|
||||
30:5-30:98: @2.Call: _3 = _print(move _4) -> [return: bb3, unwind: bb5]
|
||||
30:5-30:98: @3[6]: _2 = const ()
|
||||
29:92-31:2: @3[8]: _0 = const ()
|
||||
31:2-31:2: @4.Return: return"><span class="annotation">@0,1,2,3,4⦊</span>pub fn used_with_same_type_from_bin_crate_and_lib_crate_generic_function<T: Debug>(arg: T) {</span></span>
|
||||
<span class="line"><span class="code even" style="--layer: 1" title="30:14-30:91: @0[6]: _19 = const used_with_same_type_from_bin_crate_and_lib_crate_generic_function::<T>::promoted[0]
|
||||
30:14-30:91: @0[7]: _7 = &(*_19)
|
||||
30:14-30:91: @0[8]: _6 = &(*_7)
|
||||
30:14-30:91: @0[9]: _5 = move _6 as &[&str] (Pointer(Unsize))
|
||||
30:93-30:96: @0[17]: _14 = &_1
|
||||
30:5-30:98: @0[18]: _13 = (move _14,)
|
||||
30:5-30:98: @0[20]: FakeRead(ForMatchedPlace, _13)
|
||||
30:5-30:98: @0[22]: _15 = (_13.0: &T)
|
||||
30:5-30:98: @0[25]: _17 = &(*_15)
|
||||
30:5-30:98: @0[27]: _18 = <T as Debug>::fmt as for<'r, 's, 't0> fn(&'r T, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error> (Pointer(ReifyFnPointer))
|
||||
30:5-30:98: @0.Call: _16 = ArgumentV1::new::<T>(move _17, move _18) -> [return: bb1, unwind: bb5]
|
||||
30:5-30:98: @1[2]: _12 = [move _16]
|
||||
30:5-30:98: @1[5]: _11 = &_12
|
||||
30:5-30:98: @1[6]: _10 = &(*_11)
|
||||
30:5-30:98: @1[7]: _9 = move _10 as &[std::fmt::ArgumentV1] (Pointer(Unsize))
|
||||
30:5-30:98: @1.Call: _4 = Arguments::new_v1(move _5, move _9) -> [return: bb2, unwind: bb5]
|
||||
30:5-30:98: @2.Call: _3 = _print(move _4) -> [return: bb3, unwind: bb5]
|
||||
30:5-30:98: @3[6]: _2 = const ()
|
||||
29:92-31:2: @3[8]: _0 = const ()
|
||||
31:2-31:2: @4.Return: return"> println!("used_with_same_type_from_bin_crate_and_lib_crate_generic_function with {:?}", arg);</span></span>
|
||||
<span class="line"><span class="code even" style="--layer: 1" title="30:14-30:91: @0[6]: _19 = const used_with_same_type_from_bin_crate_and_lib_crate_generic_function::<T>::promoted[0]
|
||||
30:14-30:91: @0[7]: _7 = &(*_19)
|
||||
30:14-30:91: @0[8]: _6 = &(*_7)
|
||||
30:14-30:91: @0[9]: _5 = move _6 as &[&str] (Pointer(Unsize))
|
||||
30:93-30:96: @0[17]: _14 = &_1
|
||||
30:5-30:98: @0[18]: _13 = (move _14,)
|
||||
30:5-30:98: @0[20]: FakeRead(ForMatchedPlace, _13)
|
||||
30:5-30:98: @0[22]: _15 = (_13.0: &T)
|
||||
30:5-30:98: @0[25]: _17 = &(*_15)
|
||||
30:5-30:98: @0[27]: _18 = <T as Debug>::fmt as for<'r, 's, 't0> fn(&'r T, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error> (Pointer(ReifyFnPointer))
|
||||
30:5-30:98: @0.Call: _16 = ArgumentV1::new::<T>(move _17, move _18) -> [return: bb1, unwind: bb5]
|
||||
30:5-30:98: @1[2]: _12 = [move _16]
|
||||
30:5-30:98: @1[5]: _11 = &_12
|
||||
30:5-30:98: @1[6]: _10 = &(*_11)
|
||||
30:5-30:98: @1[7]: _9 = move _10 as &[std::fmt::ArgumentV1] (Pointer(Unsize))
|
||||
30:5-30:98: @1.Call: _4 = Arguments::new_v1(move _5, move _9) -> [return: bb2, unwind: bb5]
|
||||
30:5-30:98: @2.Call: _3 = _print(move _4) -> [return: bb3, unwind: bb5]
|
||||
30:5-30:98: @3[6]: _2 = const ()
|
||||
29:92-31:2: @3[8]: _0 = const ()
|
||||
31:2-31:2: @4.Return: return">}<span class="annotation">⦉@0,1,2,3,4</span></span></span></span></div>
|
||||
</body>
|
||||
</html>
|
@ -69,83 +69,125 @@ For revisions in Pull Requests (PR):
|
||||
</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() -> [return: bb1, unwind: bb12]
|
||||
<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() -> [return: bb1, unwind: bb14]
|
||||
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<[i32]> (Pointer(Unsize))
|
||||
7:20-7:36: @3.Call: _2 = slice::<impl [i32]>::into_vec::<std::alloc::Global>(move _3) -> [return: bb4, unwind: bb11]
|
||||
7:20-7:36: @3.Call: _2 = slice::<impl [i32]>::into_vec::<std::alloc::Global>(move _3) -> [return: bb4, unwind: bb13]
|
||||
7:9-7:17: @4[1]: FakeRead(ForLet, _2)
|
||||
8:39-8:48: @4[4]: _7 = &_2
|
||||
8:5-8:49: @4.Call: _6 = used_generic_function::<&Vec<i32>>(move _7) -> [return: bb5, unwind: bb9]
|
||||
9:45-9:53: @5[4]: _9 = move _2
|
||||
9:5-9:54: @5.Call: _8 = used_twice_generic_function::<Vec<i32>>(move _9) -> [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() -> [return: bb1, unwind: bb12]
|
||||
8:59-8:68: @4[4]: _7 = &_2
|
||||
8:5-8:69: @4.Call: _6 = used_only_from_bin_crate_generic_function::<&Vec<i32>>(move _7) -> [return: bb5, unwind: bb11]
|
||||
9:5-9:89: @5.Call: _8 = used_only_from_bin_crate_generic_function::<&str>(const "used from bin uses_crate.rs") -> [return: bb6, unwind: bb11]
|
||||
10:68-10:76: @6[3]: _10 = move _2
|
||||
10:5-10:77: @6.Call: _9 = used_from_bin_crate_and_lib_crate_generic_function::<Vec<i32>>(move _10) -> [return: bb7, unwind: bb10]
|
||||
11:5-11:98: @7.Call: _11 = used_with_same_type_from_bin_crate_and_lib_crate_generic_function::<&str>(const "interesting?") -> [return: bb8, unwind: bb11]
|
||||
5:11-12:2: @8[1]: _0 = const ()
|
||||
12:2-12:2: @9.Return: return"><span class="annotation">@0,1,2,3,4,5,6,7,8,9⦊</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() -> [return: bb1, unwind: bb14]
|
||||
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<[i32]> (Pointer(Unsize))
|
||||
7:20-7:36: @3.Call: _2 = slice::<impl [i32]>::into_vec::<std::alloc::Global>(move _3) -> [return: bb4, unwind: bb11]
|
||||
7:20-7:36: @3.Call: _2 = slice::<impl [i32]>::into_vec::<std::alloc::Global>(move _3) -> [return: bb4, unwind: bb13]
|
||||
7:9-7:17: @4[1]: FakeRead(ForLet, _2)
|
||||
8:39-8:48: @4[4]: _7 = &_2
|
||||
8:5-8:49: @4.Call: _6 = used_generic_function::<&Vec<i32>>(move _7) -> [return: bb5, unwind: bb9]
|
||||
9:45-9:53: @5[4]: _9 = move _2
|
||||
9:5-9:54: @5.Call: _8 = used_twice_generic_function::<Vec<i32>>(move _9) -> [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() -> [return: bb1, unwind: bb12]
|
||||
8:59-8:68: @4[4]: _7 = &_2
|
||||
8:5-8:69: @4.Call: _6 = used_only_from_bin_crate_generic_function::<&Vec<i32>>(move _7) -> [return: bb5, unwind: bb11]
|
||||
9:5-9:89: @5.Call: _8 = used_only_from_bin_crate_generic_function::<&str>(const "used from bin uses_crate.rs") -> [return: bb6, unwind: bb11]
|
||||
10:68-10:76: @6[3]: _10 = move _2
|
||||
10:5-10:77: @6.Call: _9 = used_from_bin_crate_and_lib_crate_generic_function::<Vec<i32>>(move _10) -> [return: bb7, unwind: bb10]
|
||||
11:5-11:98: @7.Call: _11 = used_with_same_type_from_bin_crate_and_lib_crate_generic_function::<&str>(const "interesting?") -> [return: bb8, unwind: bb11]
|
||||
5:11-12:2: @8[1]: _0 = const ()
|
||||
12:2-12:2: @9.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() -> [return: bb1, unwind: bb14]
|
||||
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<[i32]> (Pointer(Unsize))
|
||||
7:20-7:36: @3.Call: _2 = slice::<impl [i32]>::into_vec::<std::alloc::Global>(move _3) -> [return: bb4, unwind: bb11]
|
||||
7:20-7:36: @3.Call: _2 = slice::<impl [i32]>::into_vec::<std::alloc::Global>(move _3) -> [return: bb4, unwind: bb13]
|
||||
7:9-7:17: @4[1]: FakeRead(ForLet, _2)
|
||||
8:39-8:48: @4[4]: _7 = &_2
|
||||
8:5-8:49: @4.Call: _6 = used_generic_function::<&Vec<i32>>(move _7) -> [return: bb5, unwind: bb9]
|
||||
9:45-9:53: @5[4]: _9 = move _2
|
||||
9:5-9:54: @5.Call: _8 = used_twice_generic_function::<Vec<i32>>(move _9) -> [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() -> [return: bb1, unwind: bb12]
|
||||
8:59-8:68: @4[4]: _7 = &_2
|
||||
8:5-8:69: @4.Call: _6 = used_only_from_bin_crate_generic_function::<&Vec<i32>>(move _7) -> [return: bb5, unwind: bb11]
|
||||
9:5-9:89: @5.Call: _8 = used_only_from_bin_crate_generic_function::<&str>(const "used from bin uses_crate.rs") -> [return: bb6, unwind: bb11]
|
||||
10:68-10:76: @6[3]: _10 = move _2
|
||||
10:5-10:77: @6.Call: _9 = used_from_bin_crate_and_lib_crate_generic_function::<Vec<i32>>(move _10) -> [return: bb7, unwind: bb10]
|
||||
11:5-11:98: @7.Call: _11 = used_with_same_type_from_bin_crate_and_lib_crate_generic_function::<&str>(const "interesting?") -> [return: bb8, unwind: bb11]
|
||||
5:11-12:2: @8[1]: _0 = const ()
|
||||
12:2-12:2: @9.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() -> [return: bb1, unwind: bb14]
|
||||
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<[i32]> (Pointer(Unsize))
|
||||
7:20-7:36: @3.Call: _2 = slice::<impl [i32]>::into_vec::<std::alloc::Global>(move _3) -> [return: bb4, unwind: bb11]
|
||||
7:20-7:36: @3.Call: _2 = slice::<impl [i32]>::into_vec::<std::alloc::Global>(move _3) -> [return: bb4, unwind: bb13]
|
||||
7:9-7:17: @4[1]: FakeRead(ForLet, _2)
|
||||
8:39-8:48: @4[4]: _7 = &_2
|
||||
8:5-8:49: @4.Call: _6 = used_generic_function::<&Vec<i32>>(move _7) -> [return: bb5, unwind: bb9]
|
||||
9:45-9:53: @5[4]: _9 = move _2
|
||||
9:5-9:54: @5.Call: _8 = used_twice_generic_function::<Vec<i32>>(move _9) -> [return: bb6, unwind: bb8]
|
||||
5:11-10:2: @6[2]: _0 = const ()
|
||||
10:2-10:2: @7.Return: return"> used_crate::used_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() -> [return: bb1, unwind: bb12]
|
||||
8:59-8:68: @4[4]: _7 = &_2
|
||||
8:5-8:69: @4.Call: _6 = used_only_from_bin_crate_generic_function::<&Vec<i32>>(move _7) -> [return: bb5, unwind: bb11]
|
||||
9:5-9:89: @5.Call: _8 = used_only_from_bin_crate_generic_function::<&str>(const "used from bin uses_crate.rs") -> [return: bb6, unwind: bb11]
|
||||
10:68-10:76: @6[3]: _10 = move _2
|
||||
10:5-10:77: @6.Call: _9 = used_from_bin_crate_and_lib_crate_generic_function::<Vec<i32>>(move _10) -> [return: bb7, unwind: bb10]
|
||||
11:5-11:98: @7.Call: _11 = used_with_same_type_from_bin_crate_and_lib_crate_generic_function::<&str>(const "interesting?") -> [return: bb8, unwind: bb11]
|
||||
5:11-12:2: @8[1]: _0 = const ()
|
||||
12:2-12:2: @9.Return: return"> used_crate::used_only_from_bin_crate_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() -> [return: bb1, unwind: bb14]
|
||||
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<[i32]> (Pointer(Unsize))
|
||||
7:20-7:36: @3.Call: _2 = slice::<impl [i32]>::into_vec::<std::alloc::Global>(move _3) -> [return: bb4, unwind: bb11]
|
||||
7:20-7:36: @3.Call: _2 = slice::<impl [i32]>::into_vec::<std::alloc::Global>(move _3) -> [return: bb4, unwind: bb13]
|
||||
7:9-7:17: @4[1]: FakeRead(ForLet, _2)
|
||||
8:39-8:48: @4[4]: _7 = &_2
|
||||
8:5-8:49: @4.Call: _6 = used_generic_function::<&Vec<i32>>(move _7) -> [return: bb5, unwind: bb9]
|
||||
9:45-9:53: @5[4]: _9 = move _2
|
||||
9:5-9:54: @5.Call: _8 = used_twice_generic_function::<Vec<i32>>(move _9) -> [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() -> [return: bb1, unwind: bb12]
|
||||
8:59-8:68: @4[4]: _7 = &_2
|
||||
8:5-8:69: @4.Call: _6 = used_only_from_bin_crate_generic_function::<&Vec<i32>>(move _7) -> [return: bb5, unwind: bb11]
|
||||
9:5-9:89: @5.Call: _8 = used_only_from_bin_crate_generic_function::<&str>(const "used from bin uses_crate.rs") -> [return: bb6, unwind: bb11]
|
||||
10:68-10:76: @6[3]: _10 = move _2
|
||||
10:5-10:77: @6.Call: _9 = used_from_bin_crate_and_lib_crate_generic_function::<Vec<i32>>(move _10) -> [return: bb7, unwind: bb10]
|
||||
11:5-11:98: @7.Call: _11 = used_with_same_type_from_bin_crate_and_lib_crate_generic_function::<&str>(const "interesting?") -> [return: bb8, unwind: bb11]
|
||||
5:11-12:2: @8[1]: _0 = const ()
|
||||
12:2-12:2: @9.Return: return"> used_crate::used_only_from_bin_crate_generic_function("used from bin uses_crate.rs");</span></span>
|
||||
<span class="line"><span class="code even" style="--layer: 1" title="6:5-6:32: @0.Call: _1 = used_function() -> [return: bb1, unwind: bb14]
|
||||
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<[i32]> (Pointer(Unsize))
|
||||
7:20-7:36: @3.Call: _2 = slice::<impl [i32]>::into_vec::<std::alloc::Global>(move _3) -> [return: bb4, unwind: bb11]
|
||||
7:20-7:36: @3.Call: _2 = slice::<impl [i32]>::into_vec::<std::alloc::Global>(move _3) -> [return: bb4, unwind: bb13]
|
||||
7:9-7:17: @4[1]: FakeRead(ForLet, _2)
|
||||
8:39-8:48: @4[4]: _7 = &_2
|
||||
8:5-8:49: @4.Call: _6 = used_generic_function::<&Vec<i32>>(move _7) -> [return: bb5, unwind: bb9]
|
||||
9:45-9:53: @5[4]: _9 = move _2
|
||||
9:5-9:54: @5.Call: _8 = used_twice_generic_function::<Vec<i32>>(move _9) -> [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>
|
||||
8:59-8:68: @4[4]: _7 = &_2
|
||||
8:5-8:69: @4.Call: _6 = used_only_from_bin_crate_generic_function::<&Vec<i32>>(move _7) -> [return: bb5, unwind: bb11]
|
||||
9:5-9:89: @5.Call: _8 = used_only_from_bin_crate_generic_function::<&str>(const "used from bin uses_crate.rs") -> [return: bb6, unwind: bb11]
|
||||
10:68-10:76: @6[3]: _10 = move _2
|
||||
10:5-10:77: @6.Call: _9 = used_from_bin_crate_and_lib_crate_generic_function::<Vec<i32>>(move _10) -> [return: bb7, unwind: bb10]
|
||||
11:5-11:98: @7.Call: _11 = used_with_same_type_from_bin_crate_and_lib_crate_generic_function::<&str>(const "interesting?") -> [return: bb8, unwind: bb11]
|
||||
5:11-12:2: @8[1]: _0 = const ()
|
||||
12:2-12:2: @9.Return: return"> used_crate::used_from_bin_crate_and_lib_crate_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() -> [return: bb1, unwind: bb14]
|
||||
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<[i32]> (Pointer(Unsize))
|
||||
7:20-7:36: @3.Call: _2 = slice::<impl [i32]>::into_vec::<std::alloc::Global>(move _3) -> [return: bb4, unwind: bb13]
|
||||
7:9-7:17: @4[1]: FakeRead(ForLet, _2)
|
||||
8:59-8:68: @4[4]: _7 = &_2
|
||||
8:5-8:69: @4.Call: _6 = used_only_from_bin_crate_generic_function::<&Vec<i32>>(move _7) -> [return: bb5, unwind: bb11]
|
||||
9:5-9:89: @5.Call: _8 = used_only_from_bin_crate_generic_function::<&str>(const "used from bin uses_crate.rs") -> [return: bb6, unwind: bb11]
|
||||
10:68-10:76: @6[3]: _10 = move _2
|
||||
10:5-10:77: @6.Call: _9 = used_from_bin_crate_and_lib_crate_generic_function::<Vec<i32>>(move _10) -> [return: bb7, unwind: bb10]
|
||||
11:5-11:98: @7.Call: _11 = used_with_same_type_from_bin_crate_and_lib_crate_generic_function::<&str>(const "interesting?") -> [return: bb8, unwind: bb11]
|
||||
5:11-12:2: @8[1]: _0 = const ()
|
||||
12:2-12:2: @9.Return: return"> used_crate::used_with_same_type_from_bin_crate_and_lib_crate_generic_function("interesting?");</span></span>
|
||||
<span class="line"><span class="code even" style="--layer: 1" title="6:5-6:32: @0.Call: _1 = used_function() -> [return: bb1, unwind: bb14]
|
||||
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<[i32]> (Pointer(Unsize))
|
||||
7:20-7:36: @3.Call: _2 = slice::<impl [i32]>::into_vec::<std::alloc::Global>(move _3) -> [return: bb4, unwind: bb13]
|
||||
7:9-7:17: @4[1]: FakeRead(ForLet, _2)
|
||||
8:59-8:68: @4[4]: _7 = &_2
|
||||
8:5-8:69: @4.Call: _6 = used_only_from_bin_crate_generic_function::<&Vec<i32>>(move _7) -> [return: bb5, unwind: bb11]
|
||||
9:5-9:89: @5.Call: _8 = used_only_from_bin_crate_generic_function::<&str>(const "used from bin uses_crate.rs") -> [return: bb6, unwind: bb11]
|
||||
10:68-10:76: @6[3]: _10 = move _2
|
||||
10:5-10:77: @6.Call: _9 = used_from_bin_crate_and_lib_crate_generic_function::<Vec<i32>>(move _10) -> [return: bb7, unwind: bb10]
|
||||
11:5-11:98: @7.Call: _11 = used_with_same_type_from_bin_crate_and_lib_crate_generic_function::<&str>(const "interesting?") -> [return: bb8, unwind: bb11]
|
||||
5:11-12:2: @8[1]: _0 = const ()
|
||||
12:2-12:2: @9.Return: return">}<span class="annotation">⦉@0,1,2,3,4,5,6,7,8,9</span></span></span></span></div>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -1,133 +0,0 @@
|
||||
<!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::<T>::promoted[0]
|
||||
26:14-26:49: @0[7]: _7 = &(*_19)
|
||||
26:14-26:49: @0[8]: _6 = &(*_7)
|
||||
26:14-26:49: @0[9]: _5 = move _6 as &[&str] (Pointer(Unsize))
|
||||
26:51-26:54: @0[17]: _14 = &_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: &T)
|
||||
26:5-26:56: @0[25]: _17 = &(*_15)
|
||||
26:5-26:56: @0[27]: _18 = <T as Debug>::fmt as for<'r, 's, 't0> fn(&'r T, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error> (Pointer(ReifyFnPointer))
|
||||
26:5-26:56: @0.Call: _16 = ArgumentV1::new::<T>(move _17, move _18) -> [return: bb1, unwind: bb5]
|
||||
26:5-26:56: @1[2]: _12 = [move _16]
|
||||
26:5-26:56: @1[5]: _11 = &_12
|
||||
26:5-26:56: @1[6]: _10 = &(*_11)
|
||||
26:5-26:56: @1[7]: _9 = move _10 as &[std::fmt::ArgumentV1] (Pointer(Unsize))
|
||||
26:5-26:56: @1.Call: _4 = Arguments::new_v1(move _5, move _9) -> [return: bb2, unwind: bb5]
|
||||
26:5-26:56: @2.Call: _3 = _print(move _4) -> [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<T: Debug>(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::<T>::promoted[0]
|
||||
26:14-26:49: @0[7]: _7 = &(*_19)
|
||||
26:14-26:49: @0[8]: _6 = &(*_7)
|
||||
26:14-26:49: @0[9]: _5 = move _6 as &[&str] (Pointer(Unsize))
|
||||
26:51-26:54: @0[17]: _14 = &_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: &T)
|
||||
26:5-26:56: @0[25]: _17 = &(*_15)
|
||||
26:5-26:56: @0[27]: _18 = <T as Debug>::fmt as for<'r, 's, 't0> fn(&'r T, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error> (Pointer(ReifyFnPointer))
|
||||
26:5-26:56: @0.Call: _16 = ArgumentV1::new::<T>(move _17, move _18) -> [return: bb1, unwind: bb5]
|
||||
26:5-26:56: @1[2]: _12 = [move _16]
|
||||
26:5-26:56: @1[5]: _11 = &_12
|
||||
26:5-26:56: @1[6]: _10 = &(*_11)
|
||||
26:5-26:56: @1[7]: _9 = move _10 as &[std::fmt::ArgumentV1] (Pointer(Unsize))
|
||||
26:5-26:56: @1.Call: _4 = Arguments::new_v1(move _5, move _9) -> [return: bb2, unwind: bb5]
|
||||
26:5-26:56: @2.Call: _3 = _print(move _4) -> [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::<T>::promoted[0]
|
||||
26:14-26:49: @0[7]: _7 = &(*_19)
|
||||
26:14-26:49: @0[8]: _6 = &(*_7)
|
||||
26:14-26:49: @0[9]: _5 = move _6 as &[&str] (Pointer(Unsize))
|
||||
26:51-26:54: @0[17]: _14 = &_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: &T)
|
||||
26:5-26:56: @0[25]: _17 = &(*_15)
|
||||
26:5-26:56: @0[27]: _18 = <T as Debug>::fmt as for<'r, 's, 't0> fn(&'r T, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error> (Pointer(ReifyFnPointer))
|
||||
26:5-26:56: @0.Call: _16 = ArgumentV1::new::<T>(move _17, move _18) -> [return: bb1, unwind: bb5]
|
||||
26:5-26:56: @1[2]: _12 = [move _16]
|
||||
26:5-26:56: @1[5]: _11 = &_12
|
||||
26:5-26:56: @1[6]: _10 = &(*_11)
|
||||
26:5-26:56: @1[7]: _9 = move _10 as &[std::fmt::ArgumentV1] (Pointer(Unsize))
|
||||
26:5-26:56: @1.Call: _4 = Arguments::new_v1(move _5, move _9) -> [return: bb2, unwind: bb5]
|
||||
26:5-26:56: @2.Call: _3 = _print(move _4) -> [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>
|
@ -1,133 +0,0 @@
|
||||
<!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::<T>::promoted[0]
|
||||
18:14-18:47: @0[7]: _7 = &(*_19)
|
||||
18:14-18:47: @0[8]: _6 = &(*_7)
|
||||
18:14-18:47: @0[9]: _5 = move _6 as &[&str] (Pointer(Unsize))
|
||||
18:49-18:52: @0[17]: _14 = &_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: &T)
|
||||
18:5-18:54: @0[25]: _17 = &(*_15)
|
||||
18:5-18:54: @0[27]: _18 = <T as Debug>::fmt as for<'r, 's, 't0> fn(&'r T, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error> (Pointer(ReifyFnPointer))
|
||||
18:5-18:54: @0.Call: _16 = ArgumentV1::new::<T>(move _17, move _18) -> [return: bb1, unwind: bb5]
|
||||
18:5-18:54: @1[2]: _12 = [move _16]
|
||||
18:5-18:54: @1[5]: _11 = &_12
|
||||
18:5-18:54: @1[6]: _10 = &(*_11)
|
||||
18:5-18:54: @1[7]: _9 = move _10 as &[std::fmt::ArgumentV1] (Pointer(Unsize))
|
||||
18:5-18:54: @1.Call: _4 = Arguments::new_v1(move _5, move _9) -> [return: bb2, unwind: bb5]
|
||||
18:5-18:54: @2.Call: _3 = _print(move _4) -> [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<T: Debug>(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::<T>::promoted[0]
|
||||
18:14-18:47: @0[7]: _7 = &(*_19)
|
||||
18:14-18:47: @0[8]: _6 = &(*_7)
|
||||
18:14-18:47: @0[9]: _5 = move _6 as &[&str] (Pointer(Unsize))
|
||||
18:49-18:52: @0[17]: _14 = &_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: &T)
|
||||
18:5-18:54: @0[25]: _17 = &(*_15)
|
||||
18:5-18:54: @0[27]: _18 = <T as Debug>::fmt as for<'r, 's, 't0> fn(&'r T, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error> (Pointer(ReifyFnPointer))
|
||||
18:5-18:54: @0.Call: _16 = ArgumentV1::new::<T>(move _17, move _18) -> [return: bb1, unwind: bb5]
|
||||
18:5-18:54: @1[2]: _12 = [move _16]
|
||||
18:5-18:54: @1[5]: _11 = &_12
|
||||
18:5-18:54: @1[6]: _10 = &(*_11)
|
||||
18:5-18:54: @1[7]: _9 = move _10 as &[std::fmt::ArgumentV1] (Pointer(Unsize))
|
||||
18:5-18:54: @1.Call: _4 = Arguments::new_v1(move _5, move _9) -> [return: bb2, unwind: bb5]
|
||||
18:5-18:54: @2.Call: _3 = _print(move _4) -> [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::<T>::promoted[0]
|
||||
18:14-18:47: @0[7]: _7 = &(*_19)
|
||||
18:14-18:47: @0[8]: _6 = &(*_7)
|
||||
18:14-18:47: @0[9]: _5 = move _6 as &[&str] (Pointer(Unsize))
|
||||
18:49-18:52: @0[17]: _14 = &_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: &T)
|
||||
18:5-18:54: @0[25]: _17 = &(*_15)
|
||||
18:5-18:54: @0[27]: _18 = <T as Debug>::fmt as for<'r, 's, 't0> fn(&'r T, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error> (Pointer(ReifyFnPointer))
|
||||
18:5-18:54: @0.Call: _16 = ArgumentV1::new::<T>(move _17, move _18) -> [return: bb1, unwind: bb5]
|
||||
18:5-18:54: @1[2]: _12 = [move _16]
|
||||
18:5-18:54: @1[5]: _11 = &_12
|
||||
18:5-18:54: @1[6]: _10 = &(*_11)
|
||||
18:5-18:54: @1[7]: _9 = move _10 as &[std::fmt::ArgumentV1] (Pointer(Unsize))
|
||||
18:5-18:54: @1.Call: _4 = Arguments::new_v1(move _5, move _9) -> [return: bb2, unwind: bb5]
|
||||
18:5-18:54: @2.Call: _3 = _print(move _4) -> [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>
|
@ -1,133 +0,0 @@
|
||||
<!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::<T>::promoted[0]
|
||||
22:14-22:53: @0[7]: _7 = &(*_19)
|
||||
22:14-22:53: @0[8]: _6 = &(*_7)
|
||||
22:14-22:53: @0[9]: _5 = move _6 as &[&str] (Pointer(Unsize))
|
||||
22:55-22:58: @0[17]: _14 = &_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: &T)
|
||||
22:5-22:60: @0[25]: _17 = &(*_15)
|
||||
22:5-22:60: @0[27]: _18 = <T as Debug>::fmt as for<'r, 's, 't0> fn(&'r T, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error> (Pointer(ReifyFnPointer))
|
||||
22:5-22:60: @0.Call: _16 = ArgumentV1::new::<T>(move _17, move _18) -> [return: bb1, unwind: bb5]
|
||||
22:5-22:60: @1[2]: _12 = [move _16]
|
||||
22:5-22:60: @1[5]: _11 = &_12
|
||||
22:5-22:60: @1[6]: _10 = &(*_11)
|
||||
22:5-22:60: @1[7]: _9 = move _10 as &[std::fmt::ArgumentV1] (Pointer(Unsize))
|
||||
22:5-22:60: @1.Call: _4 = Arguments::new_v1(move _5, move _9) -> [return: bb2, unwind: bb5]
|
||||
22:5-22:60: @2.Call: _3 = _print(move _4) -> [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<T: Debug>(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::<T>::promoted[0]
|
||||
22:14-22:53: @0[7]: _7 = &(*_19)
|
||||
22:14-22:53: @0[8]: _6 = &(*_7)
|
||||
22:14-22:53: @0[9]: _5 = move _6 as &[&str] (Pointer(Unsize))
|
||||
22:55-22:58: @0[17]: _14 = &_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: &T)
|
||||
22:5-22:60: @0[25]: _17 = &(*_15)
|
||||
22:5-22:60: @0[27]: _18 = <T as Debug>::fmt as for<'r, 's, 't0> fn(&'r T, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error> (Pointer(ReifyFnPointer))
|
||||
22:5-22:60: @0.Call: _16 = ArgumentV1::new::<T>(move _17, move _18) -> [return: bb1, unwind: bb5]
|
||||
22:5-22:60: @1[2]: _12 = [move _16]
|
||||
22:5-22:60: @1[5]: _11 = &_12
|
||||
22:5-22:60: @1[6]: _10 = &(*_11)
|
||||
22:5-22:60: @1[7]: _9 = move _10 as &[std::fmt::ArgumentV1] (Pointer(Unsize))
|
||||
22:5-22:60: @1.Call: _4 = Arguments::new_v1(move _5, move _9) -> [return: bb2, unwind: bb5]
|
||||
22:5-22:60: @2.Call: _3 = _print(move _4) -> [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::<T>::promoted[0]
|
||||
22:14-22:53: @0[7]: _7 = &(*_19)
|
||||
22:14-22:53: @0[8]: _6 = &(*_7)
|
||||
22:14-22:53: @0[9]: _5 = move _6 as &[&str] (Pointer(Unsize))
|
||||
22:55-22:58: @0[17]: _14 = &_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: &T)
|
||||
22:5-22:60: @0[25]: _17 = &(*_15)
|
||||
22:5-22:60: @0[27]: _18 = <T as Debug>::fmt as for<'r, 's, 't0> fn(&'r T, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error> (Pointer(ReifyFnPointer))
|
||||
22:5-22:60: @0.Call: _16 = ArgumentV1::new::<T>(move _17, move _18) -> [return: bb1, unwind: bb5]
|
||||
22:5-22:60: @1[2]: _12 = [move _16]
|
||||
22:5-22:60: @1[5]: _11 = &_12
|
||||
22:5-22:60: @1[6]: _10 = &(*_11)
|
||||
22:5-22:60: @1[7]: _9 = move _10 as &[std::fmt::ArgumentV1] (Pointer(Unsize))
|
||||
22:5-22:60: @1.Call: _4 = Arguments::new_v1(move _5, move _9) -> [return: bb2, unwind: bb5]
|
||||
22:5-22:60: @2.Call: _3 = _print(move _4) -> [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>
|
@ -1,4 +1,4 @@
|
||||
#![allow(unused_assignments)]
|
||||
#![allow(unused_assignments, dead_code)]
|
||||
|
||||
// require-rust-edition-2018
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
#![allow(unused_assignments)]
|
||||
#![allow(unused_assignments, unused_variables)]
|
||||
|
||||
fn main() {
|
||||
// Initialize test constants in a way that cannot be determined at compile time, to ensure
|
||||
|
@ -1,4 +1,4 @@
|
||||
#![allow(unused_assignments, unused_variables)]
|
||||
#![allow(unused_assignments, unused_variables, dead_code)]
|
||||
|
||||
fn main() {
|
||||
// Initialize test constants in a way that cannot be determined at compile time, to ensure
|
||||
|
104
src/test/run-make-fulldeps/coverage/lib/used_crate.rs
Normal file
104
src/test/run-make-fulldeps/coverage/lib/used_crate.rs
Normal file
@ -0,0 +1,104 @@
|
||||
#![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;
|
||||
}
|
||||
use_this_lib_crate();
|
||||
}
|
||||
|
||||
pub fn used_only_from_bin_crate_generic_function<T: Debug>(arg: T) {
|
||||
println!("used_only_from_bin_crate_generic_function with {:?}", arg);
|
||||
}
|
||||
|
||||
pub fn used_only_from_this_lib_crate_generic_function<T: Debug>(arg: T) {
|
||||
println!("used_only_from_this_lib_crate_generic_function with {:?}", arg);
|
||||
}
|
||||
|
||||
pub fn used_from_bin_crate_and_lib_crate_generic_function<T: Debug>(arg: T) {
|
||||
println!("used_from_bin_crate_and_lib_crate_generic_function with {:?}", arg);
|
||||
}
|
||||
|
||||
pub fn used_with_same_type_from_bin_crate_and_lib_crate_generic_function<T: Debug>(arg: T) {
|
||||
println!("used_with_same_type_from_bin_crate_and_lib_crate_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;
|
||||
}
|
||||
}
|
||||
|
||||
fn use_this_lib_crate() {
|
||||
used_from_bin_crate_and_lib_crate_generic_function("used from library used_crate.rs");
|
||||
used_with_same_type_from_bin_crate_and_lib_crate_generic_function(
|
||||
"used from library used_crate.rs",
|
||||
);
|
||||
let some_vec = vec![5, 6, 7, 8];
|
||||
used_only_from_this_lib_crate_generic_function(some_vec);
|
||||
used_only_from_this_lib_crate_generic_function("used ONLY from library used_crate.rs");
|
||||
}
|
||||
|
||||
// FIXME(#79651): `used_from_bin_crate_and_lib_crate_generic_function()` is covered and executed
|
||||
// `2` times, but the coverage output also shows (at the bottom of the coverage report):
|
||||
// ------------------
|
||||
// | Unexecuted instantiation: <some function name here>
|
||||
// ------------------
|
||||
//
|
||||
// Note, the function name shown in the error seems to change depending on the structure of the
|
||||
// code, for some reason, including:
|
||||
//
|
||||
// * used_crate::used_from_bin_crate_and_lib_crate_generic_function::<&str>
|
||||
// * used_crate::use_this_lib_crate
|
||||
//
|
||||
// The `Unexecuted instantiation` error may be related to more than one generic function. Since the
|
||||
// reporting is not consistent, it may not be obvious if there are multiple problems here; however,
|
||||
// `used_crate::used_from_bin_crate_and_lib_crate_generic_function::<&str>` (which I have seen
|
||||
// with this error) is the only generic function missing instantiaion coverage counts.
|
||||
//
|
||||
// The `&str` variant was called from within this `lib` crate, and the `bin` crate also calls this
|
||||
// function, but with `T` type `&Vec<i32>`.
|
||||
//
|
||||
// I believe the reason is that one or both crates are generating `Zero` counters for what it
|
||||
// believes are "Unreachable" instantiations, but those instantiations are counted from the
|
||||
// coverage map in the other crate.
|
||||
//
|
||||
// See `add_unreachable_coverage()` in `mapgen.rs` for more on how these `Zero` counters are added
|
||||
// for what the funciton believes are `DefId`s that did not get codegenned. I suspect the issue
|
||||
// may be related to this process, but this needs to be confirmed. It may not be possible to know
|
||||
// for sure if a function is truly unused and should be reported with `Zero` coverage if it may
|
||||
// still get used from an external crate. (Something to look at: If the `DefId` in MIR corresponds
|
||||
// _only_ to the generic function without type parameters, is the `DefId` in the codegenned set,
|
||||
// instantiated with one of the type parameters (in either or both crates) a *different* `DefId`?
|
||||
// If so, `add_unreachable_coverage()` would assume the MIR `DefId` was uncovered, and would add
|
||||
// unreachable coverage.
|
||||
//
|
||||
// I didn't think they could be different, but if they can, we would need to find the `DefId` for
|
||||
// the generic function MIR and include it in the set of "codegenned" DefIds if any instantiation
|
||||
// of that generic function does exist.
|
||||
//
|
||||
// Note, however, for `used_with_same_type_from_bin_crate_and_lib_crate_generic_function()` both
|
||||
// crates use this function with the same type variant. The function does not have multiple
|
||||
// instantiations, so the coverage analysis is not confused. No "Unexecuted instantiations" errors
|
||||
// are reported.
|
@ -1,4 +1,4 @@
|
||||
#![allow(unused_assignments)]
|
||||
#![allow(unused_assignments, unused_variables)]
|
||||
|
||||
fn main() {
|
||||
let result
|
||||
|
@ -1,4 +1,4 @@
|
||||
#![allow(unused_assignments)]
|
||||
#![allow(unused_assignments, unused_variables, while_true)]
|
||||
|
||||
// This test confirms an earlier problem was resolved, supporting the MIR graph generated by the
|
||||
// structure of this `fmt` function.
|
||||
|
@ -1,4 +1,4 @@
|
||||
#![allow(unused_assignments)]
|
||||
#![allow(unused_assignments, unused_variables)]
|
||||
|
||||
fn main() {
|
||||
// Initialize test constants in a way that cannot be determined at compile time, to ensure
|
||||
|
@ -1,43 +0,0 @@
|
||||
#![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;
|
||||
}
|
||||
}
|
@ -1,10 +1,12 @@
|
||||
#![allow(unused_assignments, unused_variables)]
|
||||
|
||||
mod used_crate;
|
||||
extern crate 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);
|
||||
used_crate::used_only_from_bin_crate_generic_function(&some_vec);
|
||||
used_crate::used_only_from_bin_crate_generic_function("used from bin uses_crate.rs");
|
||||
used_crate::used_from_bin_crate_and_lib_crate_generic_function(some_vec);
|
||||
used_crate::used_with_same_type_from_bin_crate_and_lib_crate_generic_function("interesting?");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user