Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 9914472

Browse files
committed
Make query backtrace more useful.
1 parent 14f303b commit 9914472

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
@@ -1738,16 +1738,16 @@ rustc_queries! {
17381738
/// Does lifetime resolution on items. Importantly, we can't resolve
17391739
/// lifetimes directly on things like trait methods, because of trait params.
17401740
/// See `rustc_resolve::late::lifetimes` for details.
1741-
query resolve_bound_vars(_: hir::OwnerId) -> &'tcx ResolveBoundVars {
1741+
query resolve_bound_vars(def_id: hir::OwnerId) -> &'tcx ResolveBoundVars {
17421742
arena_cache
1743-
desc { "resolving lifetimes" }
1743+
desc { |tcx| "resolving lifetimes for `{}`", tcx.def_path_str(def_id) }
17441744
}
1745-
query named_variable_map(_: hir::OwnerId) ->
1745+
query named_variable_map(def_id: hir::OwnerId) ->
17461746
Option<&'tcx FxIndexMap<ItemLocalId, ResolvedArg>> {
1747-
desc { "looking up a named region" }
1747+
desc { |tcx| "looking up a named region inside `{}`", tcx.def_path_str(def_id) }
17481748
}
1749-
query is_late_bound_map(_: hir::OwnerId) -> Option<&'tcx FxIndexSet<ItemLocalId>> {
1750-
desc { "testing if a region is late bound" }
1749+
query is_late_bound_map(def_id: hir::OwnerId) -> Option<&'tcx FxIndexSet<ItemLocalId>> {
1750+
desc { |tcx| "testing if a region is late bound inside `{}`", tcx.def_path_str(def_id) }
17511751
}
17521752
/// For a given item's generic parameter, gets the default lifetimes to be used
17531753
/// for each parameter if a trait object were to be passed for that parameter.
@@ -1758,9 +1758,9 @@ rustc_queries! {
17581758
desc { "looking up lifetime defaults for generic parameter `{}`", tcx.def_path_str(key) }
17591759
separate_provide_extern
17601760
}
1761-
query late_bound_vars_map(_: hir::OwnerId)
1761+
query late_bound_vars_map(def_id: hir::OwnerId)
17621762
-> Option<&'tcx FxIndexMap<ItemLocalId, Vec<ty::BoundVariableKind>>> {
1763-
desc { "looking up late bound vars" }
1763+
desc { |tcx| "looking up late bound vars inside `{}`", tcx.def_path_str(def_id) }
17641764
}
17651765

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

0 commit comments

Comments
 (0)