Skip to content

Commit 435b924

Browse files
committed
Make query backtrace more useful.
1 parent 1a1cc05 commit 435b924

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
@@ -1737,16 +1737,16 @@ rustc_queries! {
17371737
/// Does lifetime resolution on items. Importantly, we can't resolve
17381738
/// lifetimes directly on things like trait methods, because of trait params.
17391739
/// See `rustc_resolve::late::lifetimes` for details.
1740-
query resolve_bound_vars(_: hir::OwnerId) -> &'tcx ResolveBoundVars {
1740+
query resolve_bound_vars(def_id: hir::OwnerId) -> &'tcx ResolveBoundVars {
17411741
arena_cache
1742-
desc { "resolving lifetimes" }
1742+
desc { |tcx| "resolving lifetimes for `{}`", tcx.def_path_str(def_id) }
17431743
}
1744-
query named_variable_map(_: hir::OwnerId) ->
1744+
query named_variable_map(def_id: hir::OwnerId) ->
17451745
Option<&'tcx FxIndexMap<ItemLocalId, ResolvedArg>> {
1746-
desc { "looking up a named region" }
1746+
desc { |tcx| "looking up a named region inside `{}`", tcx.def_path_str(def_id) }
17471747
}
1748-
query is_late_bound_map(_: hir::OwnerId) -> Option<&'tcx FxIndexSet<ItemLocalId>> {
1749-
desc { "testing if a region is late bound" }
1748+
query is_late_bound_map(def_id: hir::OwnerId) -> Option<&'tcx FxIndexSet<ItemLocalId>> {
1749+
desc { |tcx| "testing if a region is late bound inside `{}`", tcx.def_path_str(def_id) }
17501750
}
17511751
/// For a given item's generic parameter, gets the default lifetimes to be used
17521752
/// for each parameter if a trait object were to be passed for that parameter.
@@ -1757,9 +1757,9 @@ rustc_queries! {
17571757
desc { "looking up lifetime defaults for generic parameter `{}`", tcx.def_path_str(key) }
17581758
separate_provide_extern
17591759
}
1760-
query late_bound_vars_map(_: hir::OwnerId)
1760+
query late_bound_vars_map(def_id: hir::OwnerId)
17611761
-> Option<&'tcx FxIndexMap<ItemLocalId, Vec<ty::BoundVariableKind>>> {
1762-
desc { "looking up late bound vars" }
1762+
desc { |tcx| "looking up late bound vars inside `{}`", tcx.def_path_str(def_id) }
17631763
}
17641764

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

0 commit comments

Comments
 (0)