diff --git a/src/librustc/query/mod.rs b/src/librustc/query/mod.rs index 866fe8c88a858..ff3a82e53639e 100644 --- a/src/librustc/query/mod.rs +++ b/src/librustc/query/mod.rs @@ -55,20 +55,33 @@ rustc_queries! { desc { "get the crate HIR" } } + // The indexed HIR. This can be conveniently accessed by `tcx.hir()`. + // Avoid calling this query directly. query index_hir(_: CrateNum) -> &'tcx map::IndexedHir<'tcx> { eval_always no_hash desc { "index HIR" } } + // 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: DefId) -> &'tcx hir::ModuleItems { eval_always } + // An HIR item with a `DefId` that can own other HIR items which do not themselves have + // a `DefId`. + // This can be conveniently accessed by methods on `tcx.hir()`. + // Avoid calling this query directly. query hir_owner(key: DefId) -> &'tcx HirOwner<'tcx> { eval_always } + // The HIR items which do not themselves have a `DefId` and are owned by another HIR item + // with a `DefId`. + // This can be conveniently accessed by methods on `tcx.hir()`. + // Avoid calling this query directly. query hir_owner_items(key: DefId) -> &'tcx HirOwnerItems<'tcx> { eval_always }