Skip to content

Commit ba58e32

Browse files
committed
Rename some 'hir lifetimes as 'tcx.
Because they all end up within a `TyCtxt`.
1 parent 060851b commit ba58e32

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

Diff for: compiler/rustc_driver_impl/src/pretty.rs

+8-8
Original file line numberDiff line numberDiff line change
@@ -19,24 +19,24 @@ pub use self::PpMode::*;
1919
pub use self::PpSourceMode::*;
2020
use crate::abort_on_err;
2121

22-
struct NoAnn<'hir> {
23-
tcx: Option<TyCtxt<'hir>>,
22+
struct NoAnn<'tcx> {
23+
tcx: Option<TyCtxt<'tcx>>,
2424
}
2525

26-
impl<'hir> pprust_ast::PpAnn for NoAnn<'hir> {}
27-
impl<'hir> pprust_hir::PpAnn for NoAnn<'hir> {
26+
impl<'tcx> pprust_ast::PpAnn for NoAnn<'tcx> {}
27+
impl<'tcx> pprust_hir::PpAnn for NoAnn<'tcx> {
2828
fn nested(&self, state: &mut pprust_hir::State<'_>, nested: pprust_hir::Nested) {
2929
if let Some(tcx) = self.tcx {
3030
pprust_hir::PpAnn::nested(&(&tcx.hir() as &dyn hir::intravisit::Map<'_>), state, nested)
3131
}
3232
}
3333
}
3434

35-
struct IdentifiedAnnotation<'hir> {
36-
tcx: Option<TyCtxt<'hir>>,
35+
struct IdentifiedAnnotation<'tcx> {
36+
tcx: Option<TyCtxt<'tcx>>,
3737
}
3838

39-
impl<'hir> pprust_ast::PpAnn for IdentifiedAnnotation<'hir> {
39+
impl<'tcx> pprust_ast::PpAnn for IdentifiedAnnotation<'tcx> {
4040
fn pre(&self, s: &mut pprust_ast::State<'_>, node: pprust_ast::AnnNode<'_>) {
4141
if let pprust_ast::AnnNode::Expr(_) = node {
4242
s.popen();
@@ -74,7 +74,7 @@ impl<'hir> pprust_ast::PpAnn for IdentifiedAnnotation<'hir> {
7474
}
7575
}
7676

77-
impl<'hir> pprust_hir::PpAnn for IdentifiedAnnotation<'hir> {
77+
impl<'tcx> pprust_hir::PpAnn for IdentifiedAnnotation<'tcx> {
7878
fn nested(&self, state: &mut pprust_hir::State<'_>, nested: pprust_hir::Nested) {
7979
if let Some(ref tcx) = self.tcx {
8080
pprust_hir::PpAnn::nested(&(&tcx.hir() as &dyn hir::intravisit::Map<'_>), state, nested)

0 commit comments

Comments
 (0)