about summary refs log tree commit diff
path: root/compiler/rustc_driver_impl/src
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2023-10-11 08:58:27 +1100
committerNicholas Nethercote <n.nethercote@gmail.com>2023-10-13 06:35:19 +1100
commitba58e3213db9626381f5fd014e569f7d2335fa03 (patch)
tree47db0fea70f1e5b9ab88f932d5313c948f913abe /compiler/rustc_driver_impl/src
parent060851b7646dff523c25958930b2a7cbe6ce91a1 (diff)
downloadrust-ba58e3213db9626381f5fd014e569f7d2335fa03.tar.gz
rust-ba58e3213db9626381f5fd014e569f7d2335fa03.zip
Rename some `'hir` lifetimes as `'tcx`.
Because they all end up within a `TyCtxt`.
Diffstat (limited to 'compiler/rustc_driver_impl/src')
-rw-r--r--compiler/rustc_driver_impl/src/pretty.rs16
1 files changed, 8 insertions, 8 deletions
diff --git a/compiler/rustc_driver_impl/src/pretty.rs b/compiler/rustc_driver_impl/src/pretty.rs
index 4145b5baeb0..daba78612f5 100644
--- a/compiler/rustc_driver_impl/src/pretty.rs
+++ b/compiler/rustc_driver_impl/src/pretty.rs
@@ -19,12 +19,12 @@ pub use self::PpMode::*;
 pub use self::PpSourceMode::*;
 use crate::abort_on_err;
 
-struct NoAnn<'hir> {
-    tcx: Option<TyCtxt<'hir>>,
+struct NoAnn<'tcx> {
+    tcx: Option<TyCtxt<'tcx>>,
 }
 
-impl<'hir> pprust_ast::PpAnn for NoAnn<'hir> {}
-impl<'hir> pprust_hir::PpAnn for NoAnn<'hir> {
+impl<'tcx> pprust_ast::PpAnn for NoAnn<'tcx> {}
+impl<'tcx> pprust_hir::PpAnn for NoAnn<'tcx> {
     fn nested(&self, state: &mut pprust_hir::State<'_>, nested: pprust_hir::Nested) {
         if let Some(tcx) = self.tcx {
             pprust_hir::PpAnn::nested(&(&tcx.hir() as &dyn hir::intravisit::Map<'_>), state, nested)
@@ -32,11 +32,11 @@ impl<'hir> pprust_hir::PpAnn for NoAnn<'hir> {
     }
 }
 
-struct IdentifiedAnnotation<'hir> {
-    tcx: Option<TyCtxt<'hir>>,
+struct IdentifiedAnnotation<'tcx> {
+    tcx: Option<TyCtxt<'tcx>>,
 }
 
-impl<'hir> pprust_ast::PpAnn for IdentifiedAnnotation<'hir> {
+impl<'tcx> pprust_ast::PpAnn for IdentifiedAnnotation<'tcx> {
     fn pre(&self, s: &mut pprust_ast::State<'_>, node: pprust_ast::AnnNode<'_>) {
         if let pprust_ast::AnnNode::Expr(_) = node {
             s.popen();
@@ -74,7 +74,7 @@ impl<'hir> pprust_ast::PpAnn for IdentifiedAnnotation<'hir> {
     }
 }
 
-impl<'hir> pprust_hir::PpAnn for IdentifiedAnnotation<'hir> {
+impl<'tcx> pprust_hir::PpAnn for IdentifiedAnnotation<'tcx> {
     fn nested(&self, state: &mut pprust_hir::State<'_>, nested: pprust_hir::Nested) {
         if let Some(ref tcx) = self.tcx {
             pprust_hir::PpAnn::nested(&(&tcx.hir() as &dyn hir::intravisit::Map<'_>), state, nested)