Make thir_tree and thir_flat into hooks

This commit is contained in:
Michael Goulet
2024-04-15 20:08:21 -04:00
parent ccfcd950b3
commit 81bf9ae263
4 changed files with 14 additions and 21 deletions

View File

@@ -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;
}