Files
rust/compiler
Guillaume Gomez 1159cb541c Rollup merge of #156970 - qaijuang:async_closure_coverage, r=Zalathar
coverage: Use original HIR info for synthetic by-move coroutine bodies

> This is a copy of #156952(because my git was acting weird)

Synthetic by-move coroutine bodies created for async closures don't have useful HIR of their own. Coverage was falling back to the parent async closure for HIR info, which means the executed `AsyncFnOnce` body could inherit hole spans from the wrong body and report the user-written closure body as uncovered.

This PR uses the synthetic body's coroutine type to recover the original coroutine body def-id, then extracts HIR info from that body instead. That keeps the coverage spans tied to the body the synthetic MIR was cloned from.

Fixes rust-lang/rust#151135.

r? Zalathar
2026-05-27 20:45:09 +02:00
..
2026-05-04 16:28:58 +00:00
2026-05-20 11:44:04 +02:00
2026-05-04 16:28:58 +00:00
2026-05-22 19:40:22 +09:00
2026-05-18 10:41:15 +03:00
2026-05-11 21:32:42 +02:00
2026-05-26 21:35:25 +08:00
2026-05-22 12:36:19 +03:00
2026-05-12 21:58:50 +02:00
2026-04-08 21:09:07 +02:00