diff options
| author | LeSeulArtichaut <leseulartichaut@gmail.com> | 2021-04-04 18:42:17 +0200 |
|---|---|---|
| committer | LeSeulArtichaut <leseulartichaut@gmail.com> | 2021-05-22 14:36:22 +0200 |
| commit | 6f64eb1fe65f37c3895375c03374cb8680bcd09e (patch) | |
| tree | 3f6ef973e4d64310ce07eecb7432d2ffde0f7e89 /compiler/rustc_middle/src/query | |
| parent | bd80018159f6d563131ab81105d319c15d024f07 (diff) | |
| download | rust-6f64eb1fe65f37c3895375c03374cb8680bcd09e.tar.gz rust-6f64eb1fe65f37c3895375c03374cb8680bcd09e.zip | |
Make THIR building a stealable query
Diffstat (limited to 'compiler/rustc_middle/src/query')
| -rw-r--r-- | compiler/rustc_middle/src/query/mod.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/compiler/rustc_middle/src/query/mod.rs b/compiler/rustc_middle/src/query/mod.rs index 70f70788bca..f940cb62d9e 100644 --- a/compiler/rustc_middle/src/query/mod.rs +++ b/compiler/rustc_middle/src/query/mod.rs @@ -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. |
