Files
rust/compiler
Yuki Okushi 3c1eef2e91 Rollup merge of #99711 - tmiasko:coverage, r=wesleywiser
Remove reachable coverage without counters

Remove reachable coverage without counters to maintain invariant that
either there is no coverage at all or there is a live coverage counter
left that provides the function source hash.

The motivating example would be a following closure:

```rust
    let f = |x: bool| {
        debug_assert!(x);
    };
```

Which, with span changes from #93967, with disabled debug assertions,
after the final CFG simplifications but before removal of dead blocks,
gives rise to MIR:

```rust
fn main::{closure#0}(_1: &[closure@a.rs:2:13: 2:22], _2: bool) -> () {
    debug x => _2;
    let mut _0: ();

    bb0: {
        Coverage::Expression(4294967295) = 1 - 2;
        return;
    }

    ...
}
```

Which also makes the initial instrumentation quite suspect, although
this pull request doesn't attempt to address that aspect directly.

Fixes #98833.

r? ``@wesleywiser`` ``@richkadel``
2022-07-26 13:12:22 +09:00
..
2022-06-27 08:48:55 +10:00
2022-07-16 20:17:58 -03:00
2022-07-12 16:25:16 +04:00
2022-07-20 11:48:11 +02:00
2022-07-16 20:17:58 -03:00
2022-06-03 17:16:41 -04:00
2022-06-28 19:59:09 +05:30
2022-05-26 13:14:24 +02:00
2022-07-20 11:48:11 +02:00
2022-07-20 11:48:11 +02:00
2022-06-02 10:29:00 +00:00