about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2025-02-03 14:42:01 +1100
committerNicholas Nethercote <n.nethercote@gmail.com>2025-02-17 13:21:35 +1100
commit91481e3bcf4df9bee2a61c99894096864b9d7e83 (patch)
treeec9cb7331f68d6fc72b36ae146e0e185e178a23f /compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp
parent8cf9eea5b3640fc119db11a70107ef09b44a5082 (diff)
downloadrust-91481e3bcf4df9bee2a61c99894096864b9d7e83.tar.gz
rust-91481e3bcf4df9bee2a61c99894096864b9d7e83.zip
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`.
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp')
0 files changed, 0 insertions, 0 deletions