Make resolutions a query.
This commit is contained in:
parent
b09dad3edd
commit
071a047dc7
13 changed files with 127 additions and 112 deletions
|
@ -14,6 +14,12 @@ rustc_queries! {
|
|||
desc { "trigger a delay span bug" }
|
||||
}
|
||||
|
||||
query resolutions(_: ()) -> &'tcx ty::ResolverOutputs {
|
||||
eval_always
|
||||
no_hash
|
||||
desc { "get the resolver outputs" }
|
||||
}
|
||||
|
||||
/// Represents crate as a whole (as distinct from the top-level crate module).
|
||||
/// If you call `hir_crate` (e.g., indirectly by calling `tcx.hir().krate()`),
|
||||
/// we will have to assume that any change means that you need to be recompiled.
|
||||
|
@ -207,7 +213,6 @@ rustc_queries! {
|
|||
}
|
||||
|
||||
query expn_that_defined(key: DefId) -> rustc_span::ExpnId {
|
||||
eval_always
|
||||
desc { |tcx| "expansion that defined `{}`", tcx.def_path_str(key) }
|
||||
}
|
||||
|
||||
|
@ -1129,7 +1134,6 @@ rustc_queries! {
|
|||
|
||||
query module_exports(def_id: LocalDefId) -> Option<&'tcx [Export<LocalDefId>]> {
|
||||
desc { |tcx| "looking up items exported by `{}`", tcx.def_path_str(def_id.to_def_id()) }
|
||||
eval_always
|
||||
}
|
||||
|
||||
query impl_defaultness(def_id: DefId) -> hir::Defaultness {
|
||||
|
@ -1319,7 +1323,6 @@ rustc_queries! {
|
|||
}
|
||||
|
||||
query visibility(def_id: DefId) -> ty::Visibility {
|
||||
eval_always
|
||||
desc { |tcx| "computing visibility of `{}`", tcx.def_path_str(def_id) }
|
||||
}
|
||||
|
||||
|
@ -1344,8 +1347,6 @@ rustc_queries! {
|
|||
desc { |tcx| "collecting child items of `{}`", tcx.def_path_str(def_id) }
|
||||
}
|
||||
query extern_mod_stmt_cnum(def_id: LocalDefId) -> Option<CrateNum> {
|
||||
// This depends on untracked global state (`tcx.extern_crate_map`)
|
||||
eval_always
|
||||
desc { |tcx| "computing crate imported by `{}`", tcx.def_path_str(def_id.to_def_id()) }
|
||||
}
|
||||
|
||||
|
@ -1422,16 +1423,12 @@ rustc_queries! {
|
|||
eval_always
|
||||
}
|
||||
query maybe_unused_trait_import(def_id: LocalDefId) -> bool {
|
||||
eval_always
|
||||
desc { |tcx| "maybe_unused_trait_import for `{}`", tcx.def_path_str(def_id.to_def_id()) }
|
||||
}
|
||||
query maybe_unused_extern_crates(_: ()) -> &'tcx [(LocalDefId, Span)] {
|
||||
eval_always
|
||||
desc { "looking up all possibly unused extern crates" }
|
||||
}
|
||||
query names_imported_by_glob_use(def_id: LocalDefId)
|
||||
-> &'tcx FxHashSet<Symbol> {
|
||||
eval_always
|
||||
query names_imported_by_glob_use(def_id: LocalDefId) -> &'tcx FxHashSet<Symbol> {
|
||||
desc { |tcx| "names_imported_by_glob_use for `{}`", tcx.def_path_str(def_id.to_def_id()) }
|
||||
}
|
||||
|
||||
|
@ -1441,7 +1438,6 @@ rustc_queries! {
|
|||
desc { "calculating the stability index for the local crate" }
|
||||
}
|
||||
query crates(_: ()) -> &'tcx [CrateNum] {
|
||||
eval_always
|
||||
desc { "fetching all foreign CrateNum instances" }
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue