Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removes unneeded check of #[no_coverage] in mapgen #84875

Merged
merged 1 commit into from
May 7, 2021

Conversation

richkadel
Copy link
Contributor

@richkadel richkadel commented May 3, 2021

There is an anticipated feature request to support a compiler flag that
only adds coverage for specific files (or perhaps mods). As I thought
about where that change would need to be supported, I realized that
checking the attribute in mapgen (for unused functions) was unnecessary.
The unused functions are only synthesized if they have MIR coverage, and
functions with the no_coverage attribute will not have been
instrumented with MIR coverage statements in the first place.

New tests confirm this.

Also, while adding tests, I updated resolved comments and FIXMEs in
other tests, and expanded comments and tests on one remaining issue that
is still not resolved.

r? @tmandry
cc: @wesleywiser

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label May 3, 2021
@richkadel
Copy link
Contributor Author

@tmandry - There is really only 1 new commit in this PR, but since the tests have moved, I made this dependent on #84797.

@richkadel richkadel force-pushed the no-coverage-dont-check-unused branch from 814c43c to 997fac2 Compare May 3, 2021 20:45
@rust-log-analyzer

This comment has been minimized.

@richkadel
Copy link
Contributor Author

, but since the tests have moved, I made this dependent on #84797.

this comment no longer applies

@richkadel richkadel force-pushed the no-coverage-dont-check-unused branch from bad6f9b to 34d2f6c Compare May 6, 2021 19:03
And adds tests to validate it still works.

There is an anticipated feature request to support a compiler flag that
only adds coverage for specific files (or perhaps mods). As I thought
about where that change would need to be supported, I realized that
checking the attribute in mapgen (for unused functions) was unnecessary.
The unused functions are only synthesized if they have MIR coverage, and
functions with the `no_coverage` attribute will not have been
instrumented with MIR coverage statements in the first place.

New tests confirm this.

Also, while adding tests, I updated resolved comments and FIXMEs in
other tests.
@richkadel richkadel force-pushed the no-coverage-dont-check-unused branch from 34d2f6c to cd3a8c1 Compare May 6, 2021 19:45
@tmandry
Copy link
Member

tmandry commented May 6, 2021

@bors r+

@bors
Copy link
Contributor

bors commented May 6, 2021

📌 Commit cd3a8c1 has been approved by tmandry

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 6, 2021
@tmandry
Copy link
Member

tmandry commented May 6, 2021

@bors rollup

bors added a commit to rust-lang-ci/rust that referenced this pull request May 7, 2021
Rollup of 9 pull requests

Successful merges:

 - rust-lang#84779 (Add support for --test-args to cargotest)
 - rust-lang#84781 (Don't check bootstrap artifacts by default)
 - rust-lang#84787 (bump deps)
 - rust-lang#84815 (Update coverage docs and command line help)
 - rust-lang#84875 (Removes unneeded check of `#[no_coverage]` in mapgen)
 - rust-lang#84897 (Coverage instruments closure bodies in macros (not the macro body))
 - rust-lang#84911 (Retry clang+llvm download)
 - rust-lang#84972 (CTFE inbounds-error-messages tweak)
 - rust-lang#84990 (Sort rustdoc-gui tests)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit b088318 into rust-lang:master May 7, 2021
@rustbot rustbot added this to the 1.54.0 milestone May 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants