Skip to content

Commit be9679d

Browse files
committed
rustc/query: tweak comments on hir_owner{,_nodes}.
1 parent e8f1dfa commit be9679d

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/librustc/query/mod.rs

+5-4
Original file line numberDiff line numberDiff line change
@@ -64,24 +64,25 @@ rustc_queries! {
6464
}
6565

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

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

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

0 commit comments

Comments
 (0)