Skip to content

Commit 503a840

Browse files
committed
Make query backtrace more useful.
1 parent a32d4a0 commit 503a840

File tree

1 file changed

+8
-8
lines changed
  • compiler/rustc_middle/src/query

1 file changed

+8
-8
lines changed

compiler/rustc_middle/src/query/mod.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1732,16 +1732,16 @@ rustc_queries! {
17321732
/// Does lifetime resolution on items. Importantly, we can't resolve
17331733
/// lifetimes directly on things like trait methods, because of trait params.
17341734
/// See `rustc_resolve::late::lifetimes` for details.
1735-
query resolve_bound_vars(_: hir::OwnerId) -> &'tcx ResolveBoundVars {
1735+
query resolve_bound_vars(def_id: hir::OwnerId) -> &'tcx ResolveBoundVars {
17361736
arena_cache
1737-
desc { "resolving lifetimes" }
1737+
desc { |tcx| "resolving lifetimes for `{}`", tcx.def_path_str(def_id) }
17381738
}
1739-
query named_variable_map(_: hir::OwnerId) ->
1739+
query named_variable_map(def_id: hir::OwnerId) ->
17401740
Option<&'tcx FxIndexMap<ItemLocalId, ResolvedArg>> {
1741-
desc { "looking up a named region" }
1741+
desc { |tcx| "looking up a named region inside `{}`", tcx.def_path_str(def_id) }
17421742
}
1743-
query is_late_bound_map(_: hir::OwnerId) -> Option<&'tcx FxIndexSet<ItemLocalId>> {
1744-
desc { "testing if a region is late bound" }
1743+
query is_late_bound_map(def_id: hir::OwnerId) -> Option<&'tcx FxIndexSet<ItemLocalId>> {
1744+
desc { |tcx| "testing if a region is late bound inside `{}`", tcx.def_path_str(def_id) }
17451745
}
17461746
/// For a given item's generic parameter, gets the default lifetimes to be used
17471747
/// for each parameter if a trait object were to be passed for that parameter.
@@ -1752,9 +1752,9 @@ rustc_queries! {
17521752
desc { "looking up lifetime defaults for generic parameter `{}`", tcx.def_path_str(key) }
17531753
separate_provide_extern
17541754
}
1755-
query late_bound_vars_map(_: hir::OwnerId)
1755+
query late_bound_vars_map(def_id: hir::OwnerId)
17561756
-> Option<&'tcx FxIndexMap<ItemLocalId, Vec<ty::BoundVariableKind>>> {
1757-
desc { "looking up late bound vars" }
1757+
desc { |tcx| "looking up late bound vars inside `{}`", tcx.def_path_str(def_id) }
17581758
}
17591759

17601760
/// Computes the visibility of the provided `def_id`.

0 commit comments

Comments
 (0)