mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-01 07:13:24 +03:00
cfd7cf5a0e
coverage: Extract hole spans from HIR instead of MIR This makes it possible to treat more kinds of nested item/code as holes, instead of being restricted to closures. (It also potentially opens up the possibility of using HIR holes to modify branch or MC/DC spans, though we currently don't actually do this.) Thus, this new implementation treats the following as holes: - Closures (as before, including `async` and coroutines) - All nested items - Inline `const` (because why not) This gives more accurate coverage reports, because lines occupied by holes don't show the execution count from the enclosing function. Fixes #126626.