1
Fork 0

Make THIR building a stealable query

This commit is contained in:
LeSeulArtichaut 2021-04-04 18:42:17 +02:00
parent bd80018159
commit 6f64eb1fe6
20 changed files with 60 additions and 42 deletions

View file

@ -220,6 +220,11 @@ rustc_queries! {
desc { "checking if the crate is_panic_runtime" }
}
/// Fetch the THIR for a given body.
query thir_body(key: ty::WithOptConstParam<LocalDefId>) -> (&'tcx Steal<thir::Thir<'tcx>>, thir::ExprId) {
desc { |tcx| "building THIR for `{}`", tcx.def_path_str(key.did.to_def_id()) }
}
/// 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.