diff options
| author | Camille GILLOT <gillot.camille@gmail.com> | 2019-11-27 13:17:58 +0100 |
|---|---|---|
| committer | Camille GILLOT <gillot.camille@gmail.com> | 2019-11-27 13:17:58 +0100 |
| commit | e5ed1010987c21a4a5d4ea4e46aebf7adc872bfc (patch) | |
| tree | 509c9526db94750314ceabe1ed0216e7e017ac87 | |
| parent | 79e232401e07c48020b327a947c9d98d0696f082 (diff) | |
| download | rust-e5ed1010987c21a4a5d4ea4e46aebf7adc872bfc.tar.gz rust-e5ed1010987c21a4a5d4ea4e46aebf7adc872bfc.zip | |
Rename BoxedGlobalCtxt.
| -rw-r--r-- | src/librustc_interface/passes.rs | 8 | ||||
| -rw-r--r-- | src/librustc_interface/queries.rs | 6 |
2 files changed, 7 insertions, 7 deletions
diff --git a/src/librustc_interface/passes.rs b/src/librustc_interface/passes.rs index d3e29fa1111..d2bb2cdfaff 100644 --- a/src/librustc_interface/passes.rs +++ b/src/librustc_interface/passes.rs @@ -741,9 +741,9 @@ pub fn default_provide_extern(providers: &mut ty::query::Providers<'_>) { rustc_codegen_ssa::provide_extern(providers); } -pub struct BoxedGlobalCtxt<'tcx>(&'tcx GlobalCtxt<'tcx>); +pub struct QueryContext<'tcx>(&'tcx GlobalCtxt<'tcx>); -impl<'tcx> BoxedGlobalCtxt<'tcx> { +impl<'tcx> QueryContext<'tcx> { pub fn enter<F, R>(&mut self, f: F) -> R where F: FnOnce(TyCtxt<'tcx>) -> R, @@ -766,7 +766,7 @@ pub fn create_global_ctxt<'tcx>( global_ctxt: &'tcx Once<GlobalCtxt<'tcx>>, arenas: &'tcx Once<AllArenas>, local_arena: &'tcx WorkerLocal<Arena<'tcx>>, -) -> BoxedGlobalCtxt<'tcx> { +) -> QueryContext<'tcx> { let sess = &compiler.session(); let defs = mem::take(&mut resolver_outputs.definitions); @@ -813,7 +813,7 @@ pub fn create_global_ctxt<'tcx>( time(tcx.sess, "dep graph tcx init", || rustc_incremental::dep_graph_tcx_init(tcx)); }); - BoxedGlobalCtxt(gcx) + QueryContext(gcx) } /// Runs the resolution, type-checking, region checking and other diff --git a/src/librustc_interface/queries.rs b/src/librustc_interface/queries.rs index 04bf04189bd..581ebe9c00f 100644 --- a/src/librustc_interface/queries.rs +++ b/src/librustc_interface/queries.rs @@ -1,5 +1,5 @@ use crate::interface::{Compiler, Result}; -use crate::passes::{self, BoxedResolver, BoxedGlobalCtxt}; +use crate::passes::{self, BoxedResolver, QueryContext}; use rustc_incremental::DepGraphFuture; use rustc_data_structures::sync::{Lrc, Once, WorkerLocal}; @@ -85,7 +85,7 @@ pub struct Queries<'tcx> { dep_graph: Query<DepGraph>, lower_to_hir: Query<(&'tcx hir::map::Forest, Steal<ResolverOutputs>)>, prepare_outputs: Query<OutputFilenames>, - global_ctxt: Query<BoxedGlobalCtxt<'tcx>>, + global_ctxt: Query<QueryContext<'tcx>>, ongoing_codegen: Query<Box<dyn Any>>, } @@ -253,7 +253,7 @@ impl<'tcx> Queries<'tcx> { }) } - pub fn global_ctxt(&'tcx self) -> Result<&Query<BoxedGlobalCtxt<'tcx>>> { + pub fn global_ctxt(&'tcx self) -> Result<&Query<QueryContext<'tcx>>> { self.global_ctxt.compute(|| { let crate_name = self.crate_name()?.peek().clone(); let outputs = self.prepare_outputs()?.peek().clone(); |
