mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-21 22:34:05 +00:00
11d5614a74
coverage: Count await when the Future is immediately ready Currently `await` is only counted towards coverage if the containing function is suspended and resumed at least once. This is because it expands to code which contains a branch on the discriminant of `Poll`. By treating it like a branching macro (e.g. `assert!`), these implementation details will be hidden from the coverage results. I added a test to ensure the fix works in simple cases, but the heuristic of picking only the first await-related covspan might be unreliable. I plan on testing more thoroughly with a real codebase over the next couple of weeks. closes #98712 |
||
---|---|---|
.. | ||
src | ||
Cargo.toml | ||
messages.ftl |