Skip to content

Commit 43dae91

Browse files
committed
Give some more queries descriptions
1 parent 60970be commit 43dae91

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/librustc/query/mod.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,9 @@ rustc_queries! {
125125

126126
/// Fetch the MIR for a given `DefId` right after it's built - this includes
127127
/// unreachable code.
128-
query mir_built(_: DefId) -> &'tcx Steal<mir::BodyAndCache<'tcx>> {}
128+
query mir_built(_: DefId) -> &'tcx Steal<mir::BodyAndCache<'tcx>> {
129+
desc { "building MIR for" }
130+
}
129131

130132
/// Fetch the MIR for a given `DefId` up till the point where it is
131133
/// ready for const evaluation.
@@ -345,6 +347,7 @@ rustc_queries! {
345347
TypeChecking {
346348
/// The result of unsafety-checking this `DefId`.
347349
query unsafety_check_result(key: DefId) -> mir::UnsafetyCheckResult {
350+
desc { |tcx| "unsafety-checking `{}`", tcx.def_path_str(key) }
348351
cache_on_disk_if { key.is_local() }
349352
}
350353

@@ -414,6 +417,7 @@ rustc_queries! {
414417
}
415418

416419
query typeck_tables_of(key: DefId) -> &'tcx ty::TypeckTables<'tcx> {
420+
desc { |tcx| "type-checking `{}`", tcx.def_path_str(key) }
417421
cache_on_disk_if { key.is_local() }
418422
load_cached(tcx, id) {
419423
let typeck_tables: Option<ty::TypeckTables<'tcx>> = tcx
@@ -453,6 +457,7 @@ rustc_queries! {
453457
/// Borrow-checks the function body. If this is a closure, returns
454458
/// additional requirements that the closure's creator must verify.
455459
query mir_borrowck(key: DefId) -> mir::BorrowCheckResult<'tcx> {
460+
desc { |tcx| "borrow-checking `{}`", tcx.def_path_str(key) }
456461
cache_on_disk_if(tcx, _) { key.is_local() && tcx.is_closure(key) }
457462
}
458463
}

0 commit comments

Comments
 (0)