@@ -168,7 +168,7 @@ rustc_queries! {
168
168
query predicates_defined_on( _: DefId )
169
169
-> Lrc <ty:: GenericPredicates <' tcx>> { }
170
170
171
- /// Returns the predicates written explicit by the user.
171
+ /// Returns the predicates written explicitly by the user.
172
172
query explicit_predicates_of( _: DefId )
173
173
-> Lrc <ty:: GenericPredicates <' tcx>> { }
174
174
@@ -216,17 +216,17 @@ rustc_queries! {
216
216
_: DefId
217
217
) -> Result <DtorckConstraint <' tcx>, NoSolution > { }
218
218
219
- /// True if this is a const fn, use the `is_const_fn` to know whether your crate actually
220
- /// sees it as const fn (e.g., the const-fn-ness might be unstable and you might not have
221
- /// the feature gate active)
219
+ /// Returns `true` if this is a const fn, use the `is_const_fn` to know whether your crate
220
+ /// actually sees it as const fn (e.g., the const-fn-ness might be unstable and you might
221
+ /// not have the feature gate active).
222
222
///
223
223
/// **Do not call this function manually.** It is only meant to cache the base data for the
224
224
/// `is_const_fn` function.
225
225
query is_const_fn_raw( key: DefId ) -> bool {
226
226
desc { |tcx| "checking if item is const fn: `{}`" , tcx. def_path_str( key) }
227
227
}
228
228
229
- /// Returns true if calls to the function may be promoted
229
+ /// Returns ` true` if calls to the function may be promoted.
230
230
///
231
231
/// This is either because the function is e.g., a tuple-struct or tuple-variant
232
232
/// constructor, or because it has the `#[rustc_promotable]` attribute. The attribute should
@@ -237,36 +237,34 @@ rustc_queries! {
237
237
238
238
query const_fn_is_allowed_fn_ptr( _: DefId ) -> bool { }
239
239
240
- /// True if this is a foreign item (i.e., linked via `extern { ... }`).
240
+ /// Returns `true` if this is a foreign item (i.e., linked via `extern { ... }`).
241
241
query is_foreign_item( _: DefId ) -> bool { }
242
242
243
243
/// Returns `Some(mutability)` if the node pointed to by `def_id` is a static item.
244
244
query static_mutability( _: DefId ) -> Option <hir:: Mutability > { }
245
245
246
- /// Get a map with the variance of every item; use `item_variance`
247
- /// instead.
246
+ /// Gets a map with the variance of every item; use `item_variance` instead.
248
247
query crate_variances( _: CrateNum ) -> Lrc <ty:: CrateVariancesMap <' tcx>> {
249
248
desc { "computing the variances for items in this crate" }
250
249
}
251
250
252
- /// Maps from def-id of a type or region parameter to its
253
- /// (inferred) variance.
251
+ /// Maps from the `DefId` of a type or region parameter to its (inferred) variance.
254
252
query variances_of( _: DefId ) -> & ' tcx [ ty:: Variance ] { }
255
253
}
256
254
257
255
TypeChecking {
258
- /// Maps from def-id of a type to its (inferred) outlives.
256
+ /// Maps from thee `DefId` of a type to its (inferred) outlives.
259
257
query inferred_outlives_crate( _: CrateNum )
260
258
-> Lrc <ty:: CratePredicatesMap <' tcx>> {
261
259
desc { "computing the inferred outlives predicates for items in this crate" }
262
260
}
263
261
}
264
262
265
263
Other {
266
- /// Maps from an impl/trait def-id to a list of the def-ids of its items
264
+ /// Maps from an impl/trait `DefId to a list of the `DefId`s of its items.
267
265
query associated_item_def_ids( _: DefId ) -> Lrc <Vec <DefId >> { }
268
266
269
- /// Maps from a trait item to the trait item "descriptor"
267
+ /// Maps from a trait item to the trait item "descriptor".
270
268
query associated_item( _: DefId ) -> ty:: AssociatedItem { }
271
269
272
270
query impl_trait_ref( _: DefId ) -> Option <ty:: TraitRef <' tcx>> { }
@@ -276,7 +274,7 @@ rustc_queries! {
276
274
}
277
275
278
276
TypeChecking {
279
- /// Maps a DefId of a type to a list of its inherent impls.
277
+ /// Maps a ` DefId` of a type to a list of its inherent impls.
280
278
/// Contains implementations of methods that are inherent to a type.
281
279
/// Methods in these implementations don't need to be exported.
282
280
query inherent_impls( _: DefId ) -> Lrc <Vec <DefId >> {
@@ -300,7 +298,7 @@ rustc_queries! {
300
298
desc { |tcx| "linting {}" , key. describe_as_module( tcx) }
301
299
}
302
300
303
- /// Checks the attributes in the module
301
+ /// Checks the attributes in the module.
304
302
query check_mod_attrs( key: DefId ) -> ( ) {
305
303
desc { |tcx| "checking attributes in {}" , key. describe_as_module( tcx) }
306
304
}
@@ -309,7 +307,7 @@ rustc_queries! {
309
307
desc { |tcx| "checking for unstable API usage in {}" , key. describe_as_module( tcx) }
310
308
}
311
309
312
- /// Checks the loops in the module
310
+ /// Checks the loops in the module.
313
311
query check_mod_loops( key: DefId ) -> ( ) {
314
312
desc { |tcx| "checking loops in {}" , key. describe_as_module( tcx) }
315
313
}
@@ -338,7 +336,7 @@ rustc_queries! {
338
336
desc { |tcx| "collecting item types in {}" , key. describe_as_module( tcx) }
339
337
}
340
338
341
- /// Caches CoerceUnsized kinds for impls on custom types.
339
+ /// Caches ` CoerceUnsized` kinds for impls on custom types.
342
340
query coerce_unsized_info( _: DefId )
343
341
-> ty:: adjustment:: CoerceUnsizedInfo { }
344
342
}
@@ -375,7 +373,7 @@ rustc_queries! {
375
373
BorrowChecking {
376
374
query borrowck( _: DefId ) -> Lrc <BorrowCheckResult > { }
377
375
378
- /// Borrow checks the function body. If this is a closure, returns
376
+ /// Borrow- checks the function body. If this is a closure, returns
379
377
/// additional requirements that the closure's creator must verify.
380
378
query mir_borrowck( _: DefId ) -> mir:: BorrowCheckResult <' tcx> { }
381
379
}
@@ -401,11 +399,11 @@ rustc_queries! {
401
399
}
402
400
403
401
Other {
404
- /// Evaluate a constant without running sanity checks
402
+ /// Evaluates a constant without running sanity checks.
405
403
///
406
404
/// **Do not use this** outside const eval. Const eval uses this to break query cycles
407
405
/// during validation. Please add a comment to every use site explaining why using
408
- /// `const_eval` isn't sufficient
406
+ /// `const_eval` isn't sufficient.
409
407
query const_eval_raw( key: ty:: ParamEnvAnd <' tcx, GlobalId <' tcx>>)
410
408
-> ConstEvalRawResult <' tcx> {
411
409
no_force
@@ -660,12 +658,12 @@ rustc_queries! {
660
658
}
661
659
662
660
Linking {
663
- // The DefIds of all non-generic functions and statics in the given crate
661
+ // The `DefId`s of all non-generic functions and statics in the given crate
664
662
// that can be reached from outside the crate.
665
663
//
666
664
// We expect this items to be available for being linked to.
667
665
//
668
- // This query can also be called for LOCAL_CRATE. In this case it will
666
+ // This query can also be called for ` LOCAL_CRATE` . In this case it will
669
667
// compute which items will be reachable to other crates, taking into account
670
668
// the kind of crate that is currently compiled. Crates with only a
671
669
// C interface have fewer reachable things.
0 commit comments