rust/compiler/rustc_mir/src
bors e5f83d24ae Auto merge of #84797 - richkadel:cover-unreachable-statements, r=tmandry
Report coverage `0` of dead blocks

Fixes: #84018

With `-Z instrument-coverage`, coverage reporting of dead blocks
(for example, blocks dropped because a conditional branch is dropped,
based on const evaluation) is now supported.

If `instrument-coverage` is enabled, `simplify::remove_dead_blocks()`
finds all dropped coverage `Statement`s and adds their `code_region`s as
`Unreachable` coverage `Statement`s to the `START_BLOCK`, so they are
still included in the coverage map.

Check out the resulting changes in the test coverage reports in this PR (in [commit 1](https://github.com/rust-lang/rust/pull/84797/commits/0b0d293c7c46bdadf80e5304a667e34c53c0cf7e)).

r? `@tmandry`
cc: `@wesleywiser`
2021-05-07 10:06:40 +00:00
..
borrow_check add docstrings and add issue to FIXMEs 2021-05-01 19:01:06 -04:00
const_eval remove now-unused 'is_min_const_fn' 2021-04-25 12:54:34 +02:00
dataflow fix few typos 2021-04-19 15:57:08 +03:00
interpret Rollup merge of #84972 - RalfJung:null-ptr-msg, r=oli-obk 2021-05-07 15:20:29 +09:00
monomorphize Implement RFC 1260 with feature_name imported_main. 2021-04-29 08:35:08 +08:00
transform Auto merge of #84797 - richkadel:cover-unreachable-statements, r=tmandry 2021-05-07 10:06:40 +00:00
util spanview debug output caused ICE when a function had no body 2021-04-28 20:27:27 -07:00
lib.rs fix feature use in rustc libs 2021-04-18 22:05:45 +02:00
shim.rs Prepare mir::Constant for ty::Const only supporting valtrees 2021-03-12 12:43:54 +00:00