@@ -42,48 +42,48 @@ rustc_queries! {
4242 }
4343
4444 Other {
45- // Represents crate as a whole (as distinct from the top-level crate module).
46- // If you call `hir_crate` (e.g., indirectly by calling `tcx.hir().krate()`),
47- // we will have to assume that any change means that you need to be recompiled.
48- // This is because the `hir_crate` query gives you access to all other items.
49- // To avoid this fate, do not call `tcx.hir().krate()`; instead,
50- // prefer wrappers like `tcx.visit_all_items_in_krate()`.
45+ /// Represents crate as a whole (as distinct from the top-level crate module).
46+ /// If you call `hir_crate` (e.g., indirectly by calling `tcx.hir().krate()`),
47+ /// we will have to assume that any change means that you need to be recompiled.
48+ /// This is because the `hir_crate` query gives you access to all other items.
49+ /// To avoid this fate, do not call `tcx.hir().krate()`; instead,
50+ /// prefer wrappers like `tcx.visit_all_items_in_krate()`.
5151 query hir_crate( key: CrateNum ) -> & ' tcx Crate <' tcx> {
5252 eval_always
5353 no_hash
5454 desc { "get the crate HIR" }
5555 }
5656
57- // The indexed HIR. This can be conveniently accessed by `tcx.hir()`.
58- // Avoid calling this query directly.
57+ /// The indexed HIR. This can be conveniently accessed by `tcx.hir()`.
58+ /// Avoid calling this query directly.
5959 query index_hir( _: CrateNum ) -> & ' tcx map:: IndexedHir <' tcx> {
6060 eval_always
6161 no_hash
6262 desc { "index HIR" }
6363 }
6464
65- // The items in a module.
66- //
67- // This can be conveniently accessed by `tcx.hir().visit_item_likes_in_module`.
68- // Avoid calling this query directly.
65+ /// The items in a module.
66+ ///
67+ /// This can be conveniently accessed by `tcx.hir().visit_item_likes_in_module`.
68+ /// Avoid calling this query directly.
6969 query hir_module_items( key: LocalDefId ) -> & ' tcx hir:: ModuleItems {
7070 eval_always
7171 desc { |tcx| "HIR module items in `{}`" , tcx. def_path_str( key. to_def_id( ) ) }
7272 }
7373
74- // Gives access to the HIR node for the HIR owner `key`.
75- //
76- // This can be conveniently accessed by methods on `tcx.hir()`.
77- // Avoid calling this query directly.
74+ /// Gives access to the HIR node for the HIR owner `key`.
75+ ///
76+ /// This can be conveniently accessed by methods on `tcx.hir()`.
77+ /// Avoid calling this query directly.
7878 query hir_owner( key: LocalDefId ) -> Option <& ' tcx crate :: hir:: Owner <' tcx>> {
7979 eval_always
8080 desc { |tcx| "HIR owner of `{}`" , tcx. def_path_str( key. to_def_id( ) ) }
8181 }
8282
83- // Gives access to the HIR nodes and bodies inside the HIR owner `key`.
84- //
85- // This can be conveniently accessed by methods on `tcx.hir()`.
86- // Avoid calling this query directly.
83+ /// Gives access to the HIR nodes and bodies inside the HIR owner `key`.
84+ ///
85+ /// This can be conveniently accessed by methods on `tcx.hir()`.
86+ /// Avoid calling this query directly.
8787 query hir_owner_nodes( key: LocalDefId ) -> Option <& ' tcx crate :: hir:: OwnerNodes <' tcx>> {
8888 eval_always
8989 desc { |tcx| "HIR owner items in `{}`" , tcx. def_path_str( key. to_def_id( ) ) }
@@ -334,9 +334,9 @@ rustc_queries! {
334334 }
335335
336336 TypeChecking {
337- // Erases regions from `ty` to yield a new type.
338- // Normally you would just use `tcx.erase_regions(&value)`,
339- // however, which uses this query as a kind of cache.
337+ /// Erases regions from `ty` to yield a new type.
338+ /// Normally you would just use `tcx.erase_regions(&value)`,
339+ /// however, which uses this query as a kind of cache.
340340 query erase_regions_ty( ty: Ty <' tcx>) -> Ty <' tcx> {
341341 // This query is not expected to have input -- as a result, it
342342 // is not a good candidates for "replay" because it is essentially a
@@ -1538,7 +1538,7 @@ rustc_queries! {
15381538 desc { "looking up supported target features" }
15391539 }
15401540
1541- // Get an estimate of the size of an InstanceDef based on its MIR for CGU partitioning.
1541+ /// Get an estimate of the size of an InstanceDef based on its MIR for CGU partitioning.
15421542 query instance_def_size_estimate( def: ty:: InstanceDef <' tcx>)
15431543 -> usize {
15441544 desc { |tcx| "estimating size for `{}`" , tcx. def_path_str( def. def_id( ) ) }
0 commit comments