diff options
| author | The Miri Cronjob Bot <miri@cron.bot> | 2024-03-14 05:01:33 +0000 |
|---|---|---|
| committer | The Miri Cronjob Bot <miri@cron.bot> | 2024-03-14 05:01:33 +0000 |
| commit | 06ca3abc5ab06894fd2e15f78140eacccca3a5e9 (patch) | |
| tree | ca240256a0323f4bbf16f86e7de5c1c78e47c98a /tests/coverage | |
| parent | f5bb34f4605bc83c02c2c0a7a128d706d6031f11 (diff) | |
| parent | ac1b8575c017b6cc99cf389ceffe853d7b53a694 (diff) | |
| download | rust-06ca3abc5ab06894fd2e15f78140eacccca3a5e9.tar.gz rust-06ca3abc5ab06894fd2e15f78140eacccca3a5e9.zip | |
Merge from rustc
Diffstat (limited to 'tests/coverage')
| -rw-r--r-- | tests/coverage/auxiliary/used_crate.rs | 15 | ||||
| -rw-r--r-- | tests/coverage/uses_crate.coverage | 15 |
2 files changed, 10 insertions, 20 deletions
diff --git a/tests/coverage/auxiliary/used_crate.rs b/tests/coverage/auxiliary/used_crate.rs index 22837ef6d3c..72d479c74a6 100644 --- a/tests/coverage/auxiliary/used_crate.rs +++ b/tests/coverage/auxiliary/used_crate.rs @@ -76,13 +76,8 @@ fn use_this_lib_crate() { // ``` // // The notice is triggered because the function is unused by the library itself, -// and when the library is compiled, a synthetic function is generated, so -// unused function coverage can be reported. Coverage can be skipped for unused -// generic functions with: -// -// ```shell -// $ `rustc -Zunstable-options -C instrument-coverage=except-unused-generics ...` -// ``` +// so when the library is compiled, an "unused" set of mappings for that function +// is included in the library's coverage metadata. // // Even though this function is used by `uses_crate.rs` (and // counted), with substitutions for `T`, those instantiations are only generated @@ -98,6 +93,6 @@ fn use_this_lib_crate() { // another binary that never used this generic function, then it would be valid // to show the unused generic, with unknown substitution (`_`). // -// The alternative is to exclude all generics from being included in the "unused -// functions" list, which would then omit coverage results for -// `unused_generic_function<T>()`, below. +// The alternative would be to exclude all generics from being included in the +// "unused functions" list, which would then omit coverage results for +// `unused_generic_function<T>()`. diff --git a/tests/coverage/uses_crate.coverage b/tests/coverage/uses_crate.coverage index 3ab47dbca79..a6a570a0850 100644 --- a/tests/coverage/uses_crate.coverage +++ b/tests/coverage/uses_crate.coverage @@ -124,13 +124,8 @@ $DIR/auxiliary/used_crate.rs: LL| |// ``` LL| |// LL| |// The notice is triggered because the function is unused by the library itself, - LL| |// and when the library is compiled, a synthetic function is generated, so - LL| |// unused function coverage can be reported. Coverage can be skipped for unused - LL| |// generic functions with: - LL| |// - LL| |// ```shell - LL| |// $ `rustc -Zunstable-options -C instrument-coverage=except-unused-generics ...` - LL| |// ``` + LL| |// so when the library is compiled, an "unused" set of mappings for that function + LL| |// is included in the library's coverage metadata. LL| |// LL| |// Even though this function is used by `uses_crate.rs` (and LL| |// counted), with substitutions for `T`, those instantiations are only generated @@ -146,9 +141,9 @@ $DIR/auxiliary/used_crate.rs: LL| |// another binary that never used this generic function, then it would be valid LL| |// to show the unused generic, with unknown substitution (`_`). LL| |// - LL| |// The alternative is to exclude all generics from being included in the "unused - LL| |// functions" list, which would then omit coverage results for - LL| |// `unused_generic_function<T>()`, below. + LL| |// The alternative would be to exclude all generics from being included in the + LL| |// "unused functions" list, which would then omit coverage results for + LL| |// `unused_generic_function<T>()`. $DIR/uses_crate.rs: LL| |// This test was failing on Linux for a while due to #110393 somehow making |
