about summary refs log tree commit diff
path: root/compiler/rustc_pattern_analysis/src
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2024-01-25 08:39:43 +0100
committerGitHub <noreply@github.com>2024-01-25 08:39:43 +0100
commit72b70ec4746b6e1eb3ee8eabd84f31c61ad17ccf (patch)
tree7ec621081dd8ca2875ab61501104b894684042c2 /compiler/rustc_pattern_analysis/src
parent565961bbf0450153ff37fddbdea7ff1cba424355 (diff)
parent572d7e9e69ca85c7a11e8730d9e4921d59691800 (diff)
downloadrust-72b70ec4746b6e1eb3ee8eabd84f31c61ad17ccf.tar.gz
rust-72b70ec4746b6e1eb3ee8eabd84f31c61ad17ccf.zip
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.
Diffstat (limited to 'compiler/rustc_pattern_analysis/src')
0 files changed, 0 insertions, 0 deletions