rust/compiler/rustc_mir_transform/src/coverage
Nicholas Nethercote 661f99ba03 Overhaul the intravisit::Map trait.
First of all, note that `Map` has three different relevant meanings.
- The `intravisit::Map` trait.
- The `map::Map` struct.
- The `NestedFilter::Map` associated type.

The `intravisit::Map` trait is impl'd twice.
- For `!`, where the methods are all unreachable.
- For `map::Map`, which gets HIR stuff from the `TyCtxt`.

As part of getting rid of `map::Map`, this commit changes `impl
intravisit::Map for map::Map` to `impl intravisit::Map for TyCtxt`. It's
fairly straightforward except various things are renamed, because the
existing names would no longer have made sense.

- `trait intravisit::Map` becomes `trait intravisit::HirTyCtxt`, so named
  because it gets some HIR stuff from a `TyCtxt`.
- `NestedFilter::Map` assoc type becomes `NestedFilter::MaybeTyCtxt`,
  because it's always `!` or `TyCtxt`.
- `Visitor::nested_visit_map` becomes `Visitor::maybe_tcx`.

I deliberately made the new trait and associated type names different to
avoid the old `type Map: Map` situation, which I found confusing. We now
have `type MaybeTyCtxt: HirTyCtxt`.
2025-02-17 13:21:35 +11:00
..
counters Rollup merge of #136053 - Zalathar:defer-counters, r=saethlin 2025-02-10 00:51:49 -08:00
spans coverage: Defer part of counter-creation until codegen 2025-02-06 21:44:31 +11:00
counters.rs coverage: Eliminate more counters by giving them to unreachable nodes 2025-02-13 13:45:53 +11:00
graph.rs coverage: Store BCB node IDs in mappings, and resolve them in codegen 2025-02-06 21:44:29 +11:00
mappings.rs coverage: Defer part of counter-creation until codegen 2025-02-06 21:44:31 +11:00
mod.rs Overhaul the intravisit::Map trait. 2025-02-17 13:21:35 +11:00
query.rs coverage: Eliminate more counters by giving them to unreachable nodes 2025-02-13 13:45:53 +11:00
spans.rs coverage: Rename basic_coverage_blocks to just graph 2024-12-20 17:48:59 +11:00
tests.rs Rustfmt 2025-02-08 22:12:13 +00:00
unexpand.rs coverage: Treat await similar to a macro 2024-09-06 17:01:59 +12:00