Move some Map methods onto TyCtxt.
The end goal is to eliminate `Map` altogether. I added a `hir_` prefix to all of them, that seemed simplest. The exceptions are `module_items` which became `hir_module_free_items` because there was already a `hir_module_items`, and `items` which became `hir_free_items` for consistency with `hir_module_free_items`.
This commit is contained in:
@@ -232,7 +232,7 @@ impl DocVisitor<'_> for CoverageCalculator<'_, '_> {
|
||||
.item_id
|
||||
.as_def_id()
|
||||
.and_then(|def_id| self.ctx.tcx.opt_parent(def_id))
|
||||
.and_then(|def_id| self.ctx.tcx.hir().get_if_local(def_id))
|
||||
.and_then(|def_id| self.ctx.tcx.hir_get_if_local(def_id))
|
||||
.map(|node| {
|
||||
matches!(
|
||||
node,
|
||||
|
||||
Reference in New Issue
Block a user