diff options
| author | Camille GILLOT <gillot.camille@gmail.com> | 2019-11-27 13:13:57 +0100 |
|---|---|---|
| committer | Camille GILLOT <gillot.camille@gmail.com> | 2019-11-27 13:13:57 +0100 |
| commit | 79e232401e07c48020b327a947c9d98d0696f082 (patch) | |
| tree | 468f06b033aa2c36235d0870a02f611885694bcb | |
| parent | 7e72b36299d54eb3e39991c9b2a9cbaeacccda3e (diff) | |
| download | rust-79e232401e07c48020b327a947c9d98d0696f082.tar.gz rust-79e232401e07c48020b327a947c9d98d0696f082.zip | |
Rename lifetimes.
| -rw-r--r-- | src/librustc_interface/passes.rs | 18 | ||||
| -rw-r--r-- | src/librustc_interface/queries.rs | 26 |
2 files changed, 22 insertions, 22 deletions
diff --git a/src/librustc_interface/passes.rs b/src/librustc_interface/passes.rs index 963663e7d03..d3e29fa1111 100644 --- a/src/librustc_interface/passes.rs +++ b/src/librustc_interface/passes.rs @@ -743,10 +743,10 @@ pub fn default_provide_extern(providers: &mut ty::query::Providers<'_>) { pub struct BoxedGlobalCtxt<'tcx>(&'tcx GlobalCtxt<'tcx>); -impl<'gcx> BoxedGlobalCtxt<'gcx> { +impl<'tcx> BoxedGlobalCtxt<'tcx> { pub fn enter<F, R>(&mut self, f: F) -> R where - F: for<'tcx> FnOnce(TyCtxt<'tcx>) -> R, + F: FnOnce(TyCtxt<'tcx>) -> R, { ty::tls::enter_global(self.0, |tcx| f(tcx)) } @@ -756,17 +756,17 @@ impl<'gcx> BoxedGlobalCtxt<'gcx> { } } -pub fn create_global_ctxt<'gcx>( - compiler: &'gcx Compiler, +pub fn create_global_ctxt<'tcx>( + compiler: &'tcx Compiler, lint_store: Lrc<lint::LintStore>, - hir_forest: &'gcx hir::map::Forest, + hir_forest: &'tcx hir::map::Forest, mut resolver_outputs: ResolverOutputs, outputs: OutputFilenames, crate_name: &str, - global_ctxt: &'gcx Once<GlobalCtxt<'gcx>>, - arenas: &'gcx Once<AllArenas>, - local_arena: &'gcx WorkerLocal<Arena<'gcx>>, -) -> BoxedGlobalCtxt<'gcx> { + global_ctxt: &'tcx Once<GlobalCtxt<'tcx>>, + arenas: &'tcx Once<AllArenas>, + local_arena: &'tcx WorkerLocal<Arena<'tcx>>, +) -> BoxedGlobalCtxt<'tcx> { let sess = &compiler.session(); let defs = mem::take(&mut resolver_outputs.definitions); diff --git a/src/librustc_interface/queries.rs b/src/librustc_interface/queries.rs index 4e9e476c64b..04bf04189bd 100644 --- a/src/librustc_interface/queries.rs +++ b/src/librustc_interface/queries.rs @@ -69,13 +69,13 @@ impl<T> Default for Query<T> { } } -pub struct Queries<'comp> { - compiler: &'comp Compiler, - gcx: Once<GlobalCtxt<'comp>>, +pub struct Queries<'tcx> { + compiler: &'tcx Compiler, + gcx: Once<GlobalCtxt<'tcx>>, arenas: Once<AllArenas>, forest: Once<hir::map::Forest>, - local_arena: WorkerLocal<Arena<'comp>>, + local_arena: WorkerLocal<Arena<'tcx>>, dep_graph_future: Query<Option<DepGraphFuture>>, parse: Query<ast::Crate>, @@ -83,14 +83,14 @@ pub struct Queries<'comp> { register_plugins: Query<(ast::Crate, Lrc<LintStore>)>, expansion: Query<(ast::Crate, Steal<Rc<RefCell<BoxedResolver>>>, Lrc<LintStore>)>, dep_graph: Query<DepGraph>, - lower_to_hir: Query<(&'comp hir::map::Forest, Steal<ResolverOutputs>)>, + lower_to_hir: Query<(&'tcx hir::map::Forest, Steal<ResolverOutputs>)>, prepare_outputs: Query<OutputFilenames>, - global_ctxt: Query<BoxedGlobalCtxt<'comp>>, + global_ctxt: Query<BoxedGlobalCtxt<'tcx>>, ongoing_codegen: Query<Box<dyn Any>>, } -impl<'comp> Queries<'comp> { - pub fn new(compiler: &'comp Compiler) -> Queries<'comp> { +impl<'tcx> Queries<'tcx> { + pub fn new(compiler: &'tcx Compiler) -> Queries<'tcx> { Queries { compiler, gcx: Once::new(), @@ -219,8 +219,8 @@ impl<'comp> Queries<'comp> { } pub fn lower_to_hir( - &'comp self, - ) -> Result<&Query<(&'comp hir::map::Forest, Steal<ResolverOutputs>)>> { + &'tcx self, + ) -> Result<&Query<(&'tcx hir::map::Forest, Steal<ResolverOutputs>)>> { self.lower_to_hir.compute(|| { let expansion_result = self.expansion()?; let peeked = expansion_result.peek(); @@ -253,7 +253,7 @@ impl<'comp> Queries<'comp> { }) } - pub fn global_ctxt(&'comp self) -> Result<&Query<BoxedGlobalCtxt<'comp>>> { + pub fn global_ctxt(&'tcx self) -> Result<&Query<BoxedGlobalCtxt<'tcx>>> { self.global_ctxt.compute(|| { let crate_name = self.crate_name()?.peek().clone(); let outputs = self.prepare_outputs()?.peek().clone(); @@ -274,7 +274,7 @@ impl<'comp> Queries<'comp> { }) } - pub fn ongoing_codegen(&'comp self) -> Result<&Query<Box<dyn Any>>> { + pub fn ongoing_codegen(&'tcx self) -> Result<&Query<Box<dyn Any>>> { self.ongoing_codegen.compute(|| { let outputs = self.prepare_outputs()?; self.global_ctxt()?.peek_mut().enter(|tcx| { @@ -292,7 +292,7 @@ impl<'comp> Queries<'comp> { }) } - pub fn linker(&'comp self) -> Result<Linker> { + pub fn linker(&'tcx self) -> Result<Linker> { let dep_graph = self.dep_graph()?; let prepare_outputs = self.prepare_outputs()?; let ongoing_codegen = self.ongoing_codegen()?; |
