about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src/debuginfo/mod.rs
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2024-09-06 07:33:59 +0200
committerGitHub <noreply@github.com>2024-09-06 07:33:59 +0200
commit11d5614a74ba0da0aeba2848b1b13e9ab2fdee4c (patch)
treeb89acb130790e38a5958301b1b156c847912bd57 /compiler/rustc_codegen_llvm/src/debuginfo/mod.rs
parent6841e354200619db603a4ac1cc6f15b47cbb16df (diff)
parent25d183057edcf5d24ba0dcc8d5222a2a954aa80f (diff)
downloadrust-11d5614a74ba0da0aeba2848b1b13e9ab2fdee4c.tar.gz
rust-11d5614a74ba0da0aeba2848b1b13e9ab2fdee4c.zip
Rollup merge of #130013 - jonathan-conder:await_coverage, r=Zalathar
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
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/debuginfo/mod.rs')
0 files changed, 0 insertions, 0 deletions