Skip to content

Commit 79e2324

Browse files
committed
Rename lifetimes.
1 parent 7e72b36 commit 79e2324

File tree

2 files changed

+22
-22
lines changed

2 files changed

+22
-22
lines changed

src/librustc_interface/passes.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -743,10 +743,10 @@ pub fn default_provide_extern(providers: &mut ty::query::Providers<'_>) {
743743

744744
pub struct BoxedGlobalCtxt<'tcx>(&'tcx GlobalCtxt<'tcx>);
745745

746-
impl<'gcx> BoxedGlobalCtxt<'gcx> {
746+
impl<'tcx> BoxedGlobalCtxt<'tcx> {
747747
pub fn enter<F, R>(&mut self, f: F) -> R
748748
where
749-
F: for<'tcx> FnOnce(TyCtxt<'tcx>) -> R,
749+
F: FnOnce(TyCtxt<'tcx>) -> R,
750750
{
751751
ty::tls::enter_global(self.0, |tcx| f(tcx))
752752
}
@@ -756,17 +756,17 @@ impl<'gcx> BoxedGlobalCtxt<'gcx> {
756756
}
757757
}
758758

759-
pub fn create_global_ctxt<'gcx>(
760-
compiler: &'gcx Compiler,
759+
pub fn create_global_ctxt<'tcx>(
760+
compiler: &'tcx Compiler,
761761
lint_store: Lrc<lint::LintStore>,
762-
hir_forest: &'gcx hir::map::Forest,
762+
hir_forest: &'tcx hir::map::Forest,
763763
mut resolver_outputs: ResolverOutputs,
764764
outputs: OutputFilenames,
765765
crate_name: &str,
766-
global_ctxt: &'gcx Once<GlobalCtxt<'gcx>>,
767-
arenas: &'gcx Once<AllArenas>,
768-
local_arena: &'gcx WorkerLocal<Arena<'gcx>>,
769-
) -> BoxedGlobalCtxt<'gcx> {
766+
global_ctxt: &'tcx Once<GlobalCtxt<'tcx>>,
767+
arenas: &'tcx Once<AllArenas>,
768+
local_arena: &'tcx WorkerLocal<Arena<'tcx>>,
769+
) -> BoxedGlobalCtxt<'tcx> {
770770
let sess = &compiler.session();
771771
let defs = mem::take(&mut resolver_outputs.definitions);
772772

src/librustc_interface/queries.rs

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -69,28 +69,28 @@ impl<T> Default for Query<T> {
6969
}
7070
}
7171

72-
pub struct Queries<'comp> {
73-
compiler: &'comp Compiler,
74-
gcx: Once<GlobalCtxt<'comp>>,
72+
pub struct Queries<'tcx> {
73+
compiler: &'tcx Compiler,
74+
gcx: Once<GlobalCtxt<'tcx>>,
7575
arenas: Once<AllArenas>,
7676
forest: Once<hir::map::Forest>,
7777

78-
local_arena: WorkerLocal<Arena<'comp>>,
78+
local_arena: WorkerLocal<Arena<'tcx>>,
7979

8080
dep_graph_future: Query<Option<DepGraphFuture>>,
8181
parse: Query<ast::Crate>,
8282
crate_name: Query<String>,
8383
register_plugins: Query<(ast::Crate, Lrc<LintStore>)>,
8484
expansion: Query<(ast::Crate, Steal<Rc<RefCell<BoxedResolver>>>, Lrc<LintStore>)>,
8585
dep_graph: Query<DepGraph>,
86-
lower_to_hir: Query<(&'comp hir::map::Forest, Steal<ResolverOutputs>)>,
86+
lower_to_hir: Query<(&'tcx hir::map::Forest, Steal<ResolverOutputs>)>,
8787
prepare_outputs: Query<OutputFilenames>,
88-
global_ctxt: Query<BoxedGlobalCtxt<'comp>>,
88+
global_ctxt: Query<BoxedGlobalCtxt<'tcx>>,
8989
ongoing_codegen: Query<Box<dyn Any>>,
9090
}
9191

92-
impl<'comp> Queries<'comp> {
93-
pub fn new(compiler: &'comp Compiler) -> Queries<'comp> {
92+
impl<'tcx> Queries<'tcx> {
93+
pub fn new(compiler: &'tcx Compiler) -> Queries<'tcx> {
9494
Queries {
9595
compiler,
9696
gcx: Once::new(),
@@ -219,8 +219,8 @@ impl<'comp> Queries<'comp> {
219219
}
220220

221221
pub fn lower_to_hir(
222-
&'comp self,
223-
) -> Result<&Query<(&'comp hir::map::Forest, Steal<ResolverOutputs>)>> {
222+
&'tcx self,
223+
) -> Result<&Query<(&'tcx hir::map::Forest, Steal<ResolverOutputs>)>> {
224224
self.lower_to_hir.compute(|| {
225225
let expansion_result = self.expansion()?;
226226
let peeked = expansion_result.peek();
@@ -253,7 +253,7 @@ impl<'comp> Queries<'comp> {
253253
})
254254
}
255255

256-
pub fn global_ctxt(&'comp self) -> Result<&Query<BoxedGlobalCtxt<'comp>>> {
256+
pub fn global_ctxt(&'tcx self) -> Result<&Query<BoxedGlobalCtxt<'tcx>>> {
257257
self.global_ctxt.compute(|| {
258258
let crate_name = self.crate_name()?.peek().clone();
259259
let outputs = self.prepare_outputs()?.peek().clone();
@@ -274,7 +274,7 @@ impl<'comp> Queries<'comp> {
274274
})
275275
}
276276

277-
pub fn ongoing_codegen(&'comp self) -> Result<&Query<Box<dyn Any>>> {
277+
pub fn ongoing_codegen(&'tcx self) -> Result<&Query<Box<dyn Any>>> {
278278
self.ongoing_codegen.compute(|| {
279279
let outputs = self.prepare_outputs()?;
280280
self.global_ctxt()?.peek_mut().enter(|tcx| {
@@ -292,7 +292,7 @@ impl<'comp> Queries<'comp> {
292292
})
293293
}
294294

295-
pub fn linker(&'comp self) -> Result<Linker> {
295+
pub fn linker(&'tcx self) -> Result<Linker> {
296296
let dep_graph = self.dep_graph()?;
297297
let prepare_outputs = self.prepare_outputs()?;
298298
let ongoing_codegen = self.ongoing_codegen()?;

0 commit comments

Comments
 (0)