diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2023-12-20 16:29:55 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-12-20 16:29:55 +0100 |
| commit | 5906d8f0cfce5a52e4fa852de45215ec2f919dd7 (patch) | |
| tree | 9b64d8498a9d2ab1be0080d9a44104e40d2ba78e /compiler/rustc_codegen_llvm/src | |
| parent | 0bbcdb2aa34e444c69cbc3aab6bddb0865cdc12b (diff) | |
| parent | cf6dc7adb3b9e9fc67f947bfffb75f852883b050 (diff) | |
| download | rust-5906d8f0cfce5a52e4fa852de45215ec2f919dd7.tar.gz rust-5906d8f0cfce5a52e4fa852de45215ec2f919dd7.zip | |
Rollup merge of #119155 - Zalathar:async-fn, r=compiler-errors
coverage: Check for `async fn` explicitly, without needing a heuristic The old code used a heuristic to detect async functions and adjust their coverage spans to produce better output. But there's no need to resort to a heuristic when we can just look back at the original definition and check whether the current function is actually an `async fn`. In addition to being generally nicer, this also gets rid of the one piece of code that specifically cares about `CoverageSpan::is_closure` representing an actual closure. All remaining code that inspects that field just uses it as an indication that the span is a hole that should be carved out of other spans, and then discarded. That opens up the possibility of introducing other kinds of “hole” spans, e.g. for nested functions/types/macros, and having them all behave uniformly. --- `@rustbot` label +A-code-coverage
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
0 files changed, 0 insertions, 0 deletions
