]> git.lizzy.rs Git - rust.git/commitdiff
rustc/query: tweak comments on hir_owner{,_nodes}.
authorEduard-Mihai Burtescu <edy.burt@gmail.com>
Wed, 18 Mar 2020 20:46:57 +0000 (22:46 +0200)
committerEduard-Mihai Burtescu <edy.burt@gmail.com>
Thu, 19 Mar 2020 17:05:41 +0000 (19:05 +0200)
src/librustc/query/mod.rs

index d5f41aac43a5aedf43f08760448dd53da3602aef..00e40faa95c304fef90503e99be88ec9a4c0586e 100644 (file)
@@ -64,6 +64,7 @@ fn describe_as_module(def_id: DefId, tcx: TyCtxt<'_>) -> String {
         }
 
         // 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 @@ fn describe_as_module(def_id: DefId, tcx: TyCtxt<'_>) -> String {
             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 @@ fn describe_as_module(def_id: DefId, tcx: TyCtxt<'_>) -> String {
             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> {