Make thir_tree and thir_flat into hooks
This commit is contained in:
@@ -102,4 +102,10 @@ declare_hooks! {
|
||||
/// turn a deserialized `DefPathHash` into its current `DefId`.
|
||||
/// Will fetch a DefId from a DefPathHash for a foreign crate.
|
||||
hook def_path_hash_to_def_id_extern(hash: DefPathHash, stable_crate_id: StableCrateId) -> DefId;
|
||||
|
||||
/// Create a THIR tree for debugging.
|
||||
hook thir_tree(key: LocalDefId) -> String;
|
||||
|
||||
/// Create a list-like THIR representation for debugging.
|
||||
hook thir_flat(key: LocalDefId) -> String;
|
||||
}
|
||||
|
||||
@@ -474,20 +474,6 @@ rustc_queries! {
|
||||
desc { |tcx| "building THIR for `{}`", tcx.def_path_str(key) }
|
||||
}
|
||||
|
||||
/// Create a THIR tree for debugging.
|
||||
query thir_tree(key: LocalDefId) -> &'tcx String {
|
||||
no_hash
|
||||
arena_cache
|
||||
desc { |tcx| "constructing THIR tree for `{}`", tcx.def_path_str(key) }
|
||||
}
|
||||
|
||||
/// Create a list-like THIR representation for debugging.
|
||||
query thir_flat(key: LocalDefId) -> &'tcx String {
|
||||
no_hash
|
||||
arena_cache
|
||||
desc { |tcx| "constructing flat THIR representation for `{}`", tcx.def_path_str(key) }
|
||||
}
|
||||
|
||||
/// Set of all the `DefId`s in this crate that have MIR associated with
|
||||
/// them. This includes all the body owners, but also things like struct
|
||||
/// constructors.
|
||||
|
||||
Reference in New Issue
Block a user