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

Adds feature-gated #[no_coverage] function attribute, to fix derived Eq 0 coverage issue #83601 #84562

Merged
merged 2 commits into from
Apr 28, 2021

Commits on Apr 27, 2021

  1. Derived Eq no longer shows uncovered

    The Eq trait has a special hidden function. MIR `InstrumentCoverage`
    would add this function to the coverage map, but it is never called, so
    the `Eq` trait would always appear uncovered.
    
    Fixes: rust-lang#83601
    
    The fix required creating a new function attribute `no_coverage` to mark
    functions that should be ignored by `InstrumentCoverage` and the
    coverage `mapgen` (during codegen).
    
    While testing, I also noticed two other issues:
    
    * spanview debug file output ICEd on a function with no body. The
    workaround for this is included in this PR.
    * `assert_*!()` macro coverage can appear covered if followed by another
    `assert_*!()` macro. Normally they appear uncovered. I submitted a new
    Issue rust-lang#84561, and added a coverage test to demonstrate this issue.
    richkadel committed Apr 27, 2021
    Configuration menu
    Copy the full SHA
    888d0b4 View commit details
    Browse the repository at this point in the history

Commits on Apr 28, 2021

  1. Configuration menu
    Copy the full SHA
    3a5df48 View commit details
    Browse the repository at this point in the history