Skip to content

Commit e5ed101

Browse files
committed
Rename BoxedGlobalCtxt.
1 parent 79e2324 commit e5ed101

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/librustc_interface/passes.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -741,9 +741,9 @@ pub fn default_provide_extern(providers: &mut ty::query::Providers<'_>) {
741741
rustc_codegen_ssa::provide_extern(providers);
742742
}
743743

744-
pub struct BoxedGlobalCtxt<'tcx>(&'tcx GlobalCtxt<'tcx>);
744+
pub struct QueryContext<'tcx>(&'tcx GlobalCtxt<'tcx>);
745745

746-
impl<'tcx> BoxedGlobalCtxt<'tcx> {
746+
impl<'tcx> QueryContext<'tcx> {
747747
pub fn enter<F, R>(&mut self, f: F) -> R
748748
where
749749
F: FnOnce(TyCtxt<'tcx>) -> R,
@@ -766,7 +766,7 @@ pub fn create_global_ctxt<'tcx>(
766766
global_ctxt: &'tcx Once<GlobalCtxt<'tcx>>,
767767
arenas: &'tcx Once<AllArenas>,
768768
local_arena: &'tcx WorkerLocal<Arena<'tcx>>,
769-
) -> BoxedGlobalCtxt<'tcx> {
769+
) -> QueryContext<'tcx> {
770770
let sess = &compiler.session();
771771
let defs = mem::take(&mut resolver_outputs.definitions);
772772

@@ -813,7 +813,7 @@ pub fn create_global_ctxt<'tcx>(
813813
time(tcx.sess, "dep graph tcx init", || rustc_incremental::dep_graph_tcx_init(tcx));
814814
});
815815

816-
BoxedGlobalCtxt(gcx)
816+
QueryContext(gcx)
817817
}
818818

819819
/// Runs the resolution, type-checking, region checking and other

src/librustc_interface/queries.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use crate::interface::{Compiler, Result};
2-
use crate::passes::{self, BoxedResolver, BoxedGlobalCtxt};
2+
use crate::passes::{self, BoxedResolver, QueryContext};
33

44
use rustc_incremental::DepGraphFuture;
55
use rustc_data_structures::sync::{Lrc, Once, WorkerLocal};
@@ -85,7 +85,7 @@ pub struct Queries<'tcx> {
8585
dep_graph: Query<DepGraph>,
8686
lower_to_hir: Query<(&'tcx hir::map::Forest, Steal<ResolverOutputs>)>,
8787
prepare_outputs: Query<OutputFilenames>,
88-
global_ctxt: Query<BoxedGlobalCtxt<'tcx>>,
88+
global_ctxt: Query<QueryContext<'tcx>>,
8989
ongoing_codegen: Query<Box<dyn Any>>,
9090
}
9191

@@ -253,7 +253,7 @@ impl<'tcx> Queries<'tcx> {
253253
})
254254
}
255255

256-
pub fn global_ctxt(&'tcx self) -> Result<&Query<BoxedGlobalCtxt<'tcx>>> {
256+
pub fn global_ctxt(&'tcx self) -> Result<&Query<QueryContext<'tcx>>> {
257257
self.global_ctxt.compute(|| {
258258
let crate_name = self.crate_name()?.peek().clone();
259259
let outputs = self.prepare_outputs()?.peek().clone();

0 commit comments

Comments
 (0)