diff options
| author | Stuart Cook <Zalathar@users.noreply.github.com> | 2025-04-02 13:10:39 +1100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-04-02 13:10:39 +1100 |
| commit | 1692ebd5b5e036cd2a934d53821391e619e7ef57 (patch) | |
| tree | fd544922f5fca51392ba560027df60cb97349e3f /src/doc/rustc-dev-guide/examples/rustc-interface-example.rs | |
| parent | 8420a55222e151c407e6a3a7f9a1569f4f5f8ad3 (diff) | |
| parent | 26cea8a2863a3aa0fd169d8561ce77036ef6983e (diff) | |
| download | rust-1692ebd5b5e036cd2a934d53821391e619e7ef57.tar.gz rust-1692ebd5b5e036cd2a934d53821391e619e7ef57.zip | |
Rollup merge of #139102 - Zalathar:no-split, r=oli-obk
coverage: Avoid splitting spans during span extraction/refinement This PR removes or simplifies some of the steps involved in extracting coverage-relevant spans from MIR, and preparing them for use in coverage instrumentation metadata. A common theme is that we now try harder to avoid modifying or combining spans in non-trivial ways, because those modifications present the most risk for weird behaviour or ICEs. The main changes are: - When extracting spans from MIR call terminators, try to restrict them to just the function name. - Instead of splitting spans around “holes”, just discard any span that overlaps with a hole. - Instead of splitting macro-invocation spans into two parts, truncate them to just the macro name and subsequent `!`. --- This results in a lot of tiny changes to the spans that end up in coverage metadata, and a few changes to coverage reports. Judging by test snapshots, these changes appear to be quite minor in practice.
Diffstat (limited to 'src/doc/rustc-dev-guide/examples/rustc-interface-example.rs')
0 files changed, 0 insertions, 0 deletions
