rust/tests
Matthias Krüger b95232dabb
Rollup merge of #132675 - Zalathar:empty-spans, r=jieyouxu
coverage: Restrict empty-span expansion to only cover `{` and `}`

Coverage instrumentation has some tricky code for converting a coverage-relevant `Span` into a set of start/end line/byte-column coordinates that will be embedded in the CGU's coverage metadata.

A big part of this complexity is special code for handling empty spans, which are expanded into non-empty spans (if possible) because LLVM's coverage reporter does not handle empty spans well.

This PR simplifies that code by restricting it to only apply in two specific situations: when the character after the empty span is `{`, or the character before the empty span is `}`.

(As an added benefit, this means that the expanded spans no longer extend awkwardly beyond the end of a physical line, which was common under the previous implementation.)

Along the way, this PR also removes some unhelpful code for dealing with function source code spread across multiple files. Functions currently can't have coverage spans in multiple files, and if that ever changes (e.g. to properly support expansion regions) then this code will need to be completely overhauled anyway.
2024-11-10 17:43:07 +01:00
..
assembly Rollup merge of #131258 - taiki-e:s390x-stabilize-asm, r=Amanieu 2024-11-09 20:28:43 -08:00
auxiliary Fix typo in tests/auxiliary/minicore.rs 2024-11-03 17:32:33 +09:00
codegen Rollup merge of #131258 - taiki-e:s390x-stabilize-asm, r=Amanieu 2024-11-09 20:28:43 -08:00
codegen-units
coverage coverage: Restrict empty-span expansion to only cover { and } 2024-11-08 20:43:08 +11:00
coverage-run-rustdoc coverage: Restrict empty-span expansion to only cover { and } 2024-11-08 20:43:08 +11:00
crashes Auto merge of #132173 - veluca93:abi_checks, r=RalfJung,compiler-errors 2024-11-10 02:52:25 +00:00
debuginfo Auto merge of #123550 - GnomedDev:remove-initial-arc, r=Noratrieb 2024-10-24 13:35:50 +00:00
incremental Bless incremental tests. 2024-10-04 23:50:01 +00:00
mir-opt coverage: Restrict empty-span expansion to only cover { and } 2024-11-08 20:43:08 +11:00
pretty Add pretty, ui, and feature-gate tests for the enzyme/autodiff frontend 2024-10-11 20:38:43 +02:00
run-make Temporarily disable version-verbose-commit-hash to force revert through 2024-11-10 20:31:18 +08:00
rustdoc Rollup merge of #132744 - lolbinarycat:test-90781, r=aDotInTheVoid 2024-11-09 19:16:44 +01:00
rustdoc-gui Add GUI regression test for variant structfields margins 2024-10-28 11:16:38 +01:00
rustdoc-js allow type-based search on foreign functions 2024-10-25 12:19:04 -05:00
rustdoc-js-std Fix rustdoc-js-std path-ordering test due to API removal 2024-10-02 11:15:48 +02:00
rustdoc-json Rename Receiver -> LegacyReceiver 2024-10-22 12:55:16 +00:00
rustdoc-ui Add UI regressions tests for rustdoc --show-coverage option 2024-11-04 14:46:04 +01:00
ui Rollup merge of #132816 - compiler-errors:2024-apit, r=jieyouxu 2024-11-10 10:09:52 +01:00
ui-fulldeps Rollup merge of #132131 - celinval:smir-crate-defs, r=compiler-errors 2024-11-07 18:48:22 -08:00
COMPILER_TESTS.md