rust/tests
Matthias Krüger 418ae3e9a0
Rollup merge of #118852 - Zalathar:no-spans, r=cjgillot
coverage: Skip instrumenting a function if no spans were extracted from MIR

The immediate symptoms of #118643 were fixed by #118666, but some users reported that their builds now encounter another coverage-related ICE:

```
error: internal compiler error: compiler/rustc_codegen_llvm/src/coverageinfo/mapgen.rs:98:17: A used function should have had coverage mapping data but did not: (...)
```

I was able to reproduce at least one cause of this error: if no relevant spans could be extracted from a function, but the function contains `CoverageKind::SpanMarker` statements, then codegen still thinks the function is instrumented and complains about the fact that it has no coverage spans.

This PR prevents that from happening in two ways:
- If we didn't extract any relevant spans from MIR, skip instrumenting the entire function and don't create a `FunctionCoverateInfo` for it.
- If coverage codegen sees a `CoverageKind::SpanMarker` statement, skip it early and avoid creating `func_coverage`.

---

Fixes #118850.
2023-12-18 08:08:22 +01:00
..
assembly Auto merge of #118491 - cuviper:aarch64-stack-probes, r=wesleywiser 2023-12-14 02:01:13 +00:00
auxiliary
codegen Adapt debug-accessibility tests for msvc-style enums 2023-12-15 11:45:03 +00:00
codegen-units
coverage Rollup merge of #118852 - Zalathar:no-spans, r=cjgillot 2023-12-18 08:08:22 +01:00
coverage-run-rustdoc
debuginfo
incremental tests: CGU tests require build-pass, not check-pass (remove FIXME) 2023-12-12 15:48:48 +01:00
mir-opt Avoid overflow in GVN constant indexing. 2023-12-17 19:50:38 +00:00
pretty Improve print_tts by changing tokenstream::Spacing. 2023-12-11 09:19:09 +11:00
run-make Improve print_tts by changing tokenstream::Spacing. 2023-12-11 09:19:09 +11:00
run-make-fulldeps
run-pass-valgrind
rustdoc Rollup merge of #113091 - GuillaumeGomez:prevent-cfg-merge-reexport, r=rustdoc 2023-12-15 11:51:23 +01:00
rustdoc-gui Rollup merge of #118988 - notriddle:notriddle/varconst, r=GuillaumeGomez 2023-12-15 20:19:56 +01:00
rustdoc-js rustdoc-search: remove parallel searchWords array 2023-12-15 16:26:35 -07:00
rustdoc-js-std
rustdoc-json
rustdoc-ui Auto merge of #118213 - Urgau:check-cfg-diagnostics-rustc-cargo, r=petrochenkov 2023-12-13 19:45:57 +00:00
ui Auto merge of #114962 - darklyspaced:debug, r=est31 2023-12-17 23:01:18 +00:00
ui-fulldeps Add a method to check if type is a CStr 2023-12-15 13:18:41 -08:00
COMPILER_TESTS.md