Skip to content

Commit

Permalink
rustc/query: tweak comments on hir_owner{,_nodes}.
Browse files Browse the repository at this point in the history
  • Loading branch information
eddyb committed Mar 19, 2020
1 parent e8f1dfa commit be9679d
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/librustc/query/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,24 +64,25 @@ rustc_queries! {
}

// The items in a module.
//
// This can be conveniently accessed by `tcx.hir().visit_item_likes_in_module`.
// Avoid calling this query directly.
query hir_module_items(key: LocalDefId) -> &'tcx hir::ModuleItems {
eval_always
desc { |tcx| "HIR module items in `{}`", tcx.def_path_str(key.to_def_id()) }
}

// An HIR node with a `LocalDefId` that can own other HIR nodes which do
// not themselves have a `LocalDefId`.
// Gives access to the HIR node for the HIR owner `key`.
//
// This can be conveniently accessed by methods on `tcx.hir()`.
// Avoid calling this query directly.
query hir_owner(key: LocalDefId) -> &'tcx crate::hir::Owner<'tcx> {
eval_always
desc { |tcx| "HIR owner of `{}`", tcx.def_path_str(key.to_def_id()) }
}

// The HIR nodes which do not themselves have a `LocalDefId` and are
// owned by another HIR node with a `LocalDefId`.
// Gives access to the HIR nodes and bodies inside the HIR owner `key`.
//
// This can be conveniently accessed by methods on `tcx.hir()`.
// Avoid calling this query directly.
query hir_owner_nodes(key: LocalDefId) -> &'tcx crate::hir::OwnerNodes<'tcx> {
Expand Down

0 comments on commit be9679d

Please sign in to comment.