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

Rollup of 3 pull requests #124856

Closed
wants to merge 10 commits into from

Commits on Apr 30, 2024

  1. Configuration menu
    Copy the full SHA
    c9dd07d View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    7c87ad0 View commit details
    Browse the repository at this point in the history

Commits on May 6, 2024

  1. coverage: CoverageIdsInfo::mcdc_bitmap_bytes is never needed

    This code for recalculating `mcdc_bitmap_bytes` doesn't provide any benefit,
    because its result won't have changed from the value in `FunctionCoverageInfo`
    that was computed during the MIR instrumentation pass.
    Zalathar committed May 6, 2024
    Configuration menu
    Copy the full SHA
    a9b2f1b View commit details
    Browse the repository at this point in the history
  2. coverage: Remove confusing comments from CoverageKind

    These comments appear to be inspired by the similar comments on
    `CounterIncrement` and `ExpressionUsed`. But those comments refer to specific
    simplification steps performed during coverage codegen, and there is no
    corresponding step for the MC/DC coverage statements.
    Zalathar committed May 6, 2024
    Configuration menu
    Copy the full SHA
    0bd92bf View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    eb1b9e0 View commit details
    Browse the repository at this point in the history
  4. coverage: Rename conditions_num to num_conditions

    This field counts the number of conditions that contribute to a particular
    decision, but the name "conditions num" sounds like an ID instead of a count,
    so "num conditions" is clearer.
    Zalathar committed May 6, 2024
    Configuration menu
    Copy the full SHA
    1a701d4 View commit details
    Browse the repository at this point in the history

Commits on May 7, 2024

  1. Configuration menu
    Copy the full SHA
    776f182 View commit details
    Browse the repository at this point in the history
  2. Rollup merge of rust-lang#124223 - Zalathar:conditional-let, r=compil…

    …er-errors
    
    coverage: Branch coverage support for let-else and if-let
    
    This PR adds branch coverage instrumentation for let-else and if-let, including let-chains.
    
    This lifts two of the limitations listed at rust-lang#124118.
    matthiaskrgr authored May 7, 2024
    Configuration menu
    Copy the full SHA
    6f38e9d View commit details
    Browse the repository at this point in the history
  3. Rollup merge of rust-lang#124571 - Zalathar:num-conditions, r=compile…

    …r-errors
    
    coverage: Clean up `mcdc_bitmap_bytes` and `conditions_num`
    
    This is a combination of two mostly-separate MC/DC coverage cleanups that would conflict with each other, plus some extra tests that appeared along the way.
    
    The first change is to stop recomputing `mcdc_bitmap_bytes` in the query that produces `CoverageIdsInfo`. This appears to have been inspired by how we were already computing `max_counter_id`, but there's an important difference between the two cases.
    
    When computing `max_counter_id`, the highest counter ID seen might be less than the highest ID used during MIR instrumentation, because some counter-increment statements might have been removed by MIR optimizations.
    
    But for the recomputation used for `mcdc_bitmap_bytes`, that's impossible, because both computations are based on pre-optimization info. So there's no need to recompute the exact same value, when it can't have changed
    
    ---
    
    The second change is to rename `conditions_num` to `num_conditions`, to make it clearer that this refers to a *number of conditions*, not some kind of ID number.
    
    Because this change touched the compiler warning for a decision containing too many conditions, I also noticed that we didn't have any tests for that warning.
    
    (It now seems a bit strange to me that this is a compiler warning, not a lint, because it can't be silenced or denied by the usual mechanisms for controlling lints. But I consider that change to be beyond the scope of this PR.)
    matthiaskrgr authored May 7, 2024
    Configuration menu
    Copy the full SHA
    71d9c23 View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#124838 - RalfJung:next_power_of_two, r=scot…

    …tmcm
    
    next_power_of_two: add a doctest to show what happens on 0
    matthiaskrgr authored May 7, 2024
    Configuration menu
    Copy the full SHA
    ec9020d View commit details
    Browse the repository at this point in the history