diff options
| author | Eduard-Mihai Burtescu <edy.burt@gmail.com> | 2020-03-18 22:46:57 +0200 |
|---|---|---|
| committer | Eduard-Mihai Burtescu <edy.burt@gmail.com> | 2020-03-19 19:05:41 +0200 |
| commit | be9679de5c91540f44ffd2e2500a45b29cd5b230 (patch) | |
| tree | ceec8d113a3b46a58d97ef868c49729803592657 | |
| parent | e8f1dfae64e302c0da846d215697b323bb1ee0a2 (diff) | |
| download | rust-be9679de5c91540f44ffd2e2500a45b29cd5b230.tar.gz rust-be9679de5c91540f44ffd2e2500a45b29cd5b230.zip | |
rustc/query: tweak comments on hir_owner{,_nodes}.
| -rw-r--r-- | src/librustc/query/mod.rs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/librustc/query/mod.rs b/src/librustc/query/mod.rs index d5f41aac43a..00e40faa95c 100644 --- a/src/librustc/query/mod.rs +++ b/src/librustc/query/mod.rs @@ -64,6 +64,7 @@ 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 { @@ -71,8 +72,8 @@ rustc_queries! { 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> { @@ -80,8 +81,8 @@ rustc_queries! { 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> { |
