diff options
| author | Camille GILLOT <gillot.camille@gmail.com> | 2021-07-13 18:45:20 +0200 |
|---|---|---|
| committer | Camille GILLOT <gillot.camille@gmail.com> | 2022-07-06 23:04:55 +0200 |
| commit | 250c71b85d0eed22982ef2b2db92fd5e63772c42 (patch) | |
| tree | 41f7151fba33e5fd0260b811358d4fde003d2270 /compiler/rustc_middle/src/query | |
| parent | 43bb31b9540a439dcca65f47b8644eafe4a42e2d (diff) | |
| download | rust-250c71b85d0eed22982ef2b2db92fd5e63772c42.tar.gz rust-250c71b85d0eed22982ef2b2db92fd5e63772c42.zip | |
Make AST lowering a query.
Diffstat (limited to 'compiler/rustc_middle/src/query')
| -rw-r--r-- | compiler/rustc_middle/src/query/mod.rs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/compiler/rustc_middle/src/query/mod.rs b/compiler/rustc_middle/src/query/mod.rs index abc639136d6..267395269e2 100644 --- a/compiler/rustc_middle/src/query/mod.rs +++ b/compiler/rustc_middle/src/query/mod.rs @@ -32,6 +32,12 @@ rustc_queries! { desc { "get the resolver outputs" } } + query resolver_for_lowering(_: ()) -> &'tcx Steal<ty::ResolverAstLowering> { + eval_always + no_hash + desc { "get the resolver for lowering" } + } + /// Return the span for a definition. /// Contrary to `def_span` below, this query returns the full absolute span of the definition. /// This span is meant for dep-tracking rather than diagnostics. It should not be used outside @@ -46,7 +52,8 @@ rustc_queries! { /// This is because the `hir_crate` query gives you access to all other items. /// To avoid this fate, do not call `tcx.hir().krate()`; instead, /// prefer wrappers like `tcx.visit_all_items_in_krate()`. - query hir_crate(key: ()) -> &'tcx Crate<'tcx> { + query hir_crate(key: ()) -> Crate<'tcx> { + storage(ArenaCacheSelector<'tcx>) eval_always desc { "get the crate HIR" } } |
