@@ -42,48 +42,48 @@ rustc_queries! {
42
42
}
43
43
44
44
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()`.
51
51
query hir_crate( key: CrateNum ) -> & ' tcx Crate <' tcx> {
52
52
eval_always
53
53
no_hash
54
54
desc { "get the crate HIR" }
55
55
}
56
56
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.
59
59
query index_hir( _: CrateNum ) -> & ' tcx map:: IndexedHir <' tcx> {
60
60
eval_always
61
61
no_hash
62
62
desc { "index HIR" }
63
63
}
64
64
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.
69
69
query hir_module_items( key: LocalDefId ) -> & ' tcx hir:: ModuleItems {
70
70
eval_always
71
71
desc { |tcx| "HIR module items in `{}`" , tcx. def_path_str( key. to_def_id( ) ) }
72
72
}
73
73
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.
78
78
query hir_owner( key: LocalDefId ) -> Option <& ' tcx crate :: hir:: Owner <' tcx>> {
79
79
eval_always
80
80
desc { |tcx| "HIR owner of `{}`" , tcx. def_path_str( key. to_def_id( ) ) }
81
81
}
82
82
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.
87
87
query hir_owner_nodes( key: LocalDefId ) -> Option <& ' tcx crate :: hir:: OwnerNodes <' tcx>> {
88
88
eval_always
89
89
desc { |tcx| "HIR owner items in `{}`" , tcx. def_path_str( key. to_def_id( ) ) }
@@ -334,9 +334,9 @@ rustc_queries! {
334
334
}
335
335
336
336
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.
340
340
query erase_regions_ty( ty: Ty <' tcx>) -> Ty <' tcx> {
341
341
// This query is not expected to have input -- as a result, it
342
342
// is not a good candidates for "replay" because it is essentially a
@@ -1538,7 +1538,7 @@ rustc_queries! {
1538
1538
desc { "looking up supported target features" }
1539
1539
}
1540
1540
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.
1542
1542
query instance_def_size_estimate( def: ty:: InstanceDef <' tcx>)
1543
1543
-> usize {
1544
1544
desc { |tcx| "estimating size for `{}`" , tcx. def_path_str( def. def_id( ) ) }
0 commit comments