rust/compiler/rustc_mir_transform
Matthias Krüger 72b70ec474
Rollup merge of #120292 - Zalathar:dismantle, r=oli-obk
coverage: Dismantle `Instrumentor` and flatten span refinement

This is a combination of two refactorings that are unrelated, but would otherwise have a merge conflict.

No functional changes, other than a small tweak to debug logging as part of rearranging some functions.

Ignoring whitespace is highly recommended, since most of the modified lines have just been reindented.

---

The first change is to dismantle `Instrumentor` into ordinary functions.

This is one of those cases where encapsulating several values into a struct ultimately hurts more than it helps. With everything stored as local variables in one main function, and passed explicitly into helper functions, it's easier to see what is used where, and make changes as necessary.

---

The second change is to flatten the functions for extracting/refining coverage spans.

Consolidating this code into flatter functions reduces the amount of pointer-chasing required to read and modify it.
2024-01-25 08:39:43 +01:00
..
src Rollup merge of #120292 - Zalathar:dismantle, r=oli-obk 2024-01-25 08:39:43 +01:00
Cargo.toml coverage: Avoid unnecessary macros in unit tests 2023-12-07 11:12:48 +11:00
messages.ftl Print list of missing target features when calling a function with target features outside an unsafe block 2023-11-27 19:13:11 +01:00