about summary refs log tree commit diff
path: root/src/librustc_driver
diff options
context:
space:
mode:
authorJeremy Stucki <jeremy@myelin.ch>2019-06-21 20:27:44 +0200
committerJeremy Stucki <stucki.jeremy@gmail.com>2019-07-03 10:01:02 +0200
commitec711767a7ac6911faae85d4b9285d07d5ebf949 (patch)
tree0eef0150e8781741914dd5f0821d810f602160cc /src/librustc_driver
parentd50a3a7b8696975a2a1116f8c4eb4673271ae968 (diff)
downloadrust-ec711767a7ac6911faae85d4b9285d07d5ebf949.tar.gz
rust-ec711767a7ac6911faae85d4b9285d07d5ebf949.zip
Remove needless lifetimes
Diffstat (limited to 'src/librustc_driver')
-rw-r--r--src/librustc_driver/pretty.rs20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/librustc_driver/pretty.rs b/src/librustc_driver/pretty.rs
index d92f3aafa1c..ff0c4ff548b 100644
--- a/src/librustc_driver/pretty.rs
+++ b/src/librustc_driver/pretty.rs
@@ -188,7 +188,7 @@ impl PpSourceMode {
             _ => panic!("Should use call_with_pp_support_hir"),
         }
     }
-    fn call_with_pp_support_hir<'tcx, A, F>(&self, tcx: TyCtxt<'tcx>, f: F) -> A
+    fn call_with_pp_support_hir<A, F>(&self, tcx: TyCtxt<'_>, f: F) -> A
     where
         F: FnOnce(&dyn HirPrinterSupport<'_>, &hir::Crate) -> A,
     {
@@ -228,7 +228,7 @@ impl PpSourceMode {
 trait PrinterSupport: pprust::PpAnn {
     /// Provides a uniform interface for re-extracting a reference to a
     /// `Session` from a value that now owns it.
-    fn sess<'a>(&'a self) -> &'a Session;
+    fn sess(&self) -> &Session;
 
     /// Produces the pretty-print annotation object.
     ///
@@ -240,7 +240,7 @@ trait PrinterSupport: pprust::PpAnn {
 trait HirPrinterSupport<'hir>: pprust_hir::PpAnn {
     /// Provides a uniform interface for re-extracting a reference to a
     /// `Session` from a value that now owns it.
-    fn sess<'a>(&'a self) -> &'a Session;
+    fn sess(&self) -> &Session;
 
     /// Provides a uniform interface for re-extracting a reference to an
     /// `hir_map::Map` from a value that now owns it.
@@ -272,7 +272,7 @@ struct NoAnn<'hir> {
 }
 
 impl<'hir> PrinterSupport for NoAnn<'hir> {
-    fn sess<'a>(&'a self) -> &'a Session {
+    fn sess(&self) -> &Session {
         self.sess
     }
 
@@ -282,7 +282,7 @@ impl<'hir> PrinterSupport for NoAnn<'hir> {
 }
 
 impl<'hir> HirPrinterSupport<'hir> for NoAnn<'hir> {
-    fn sess<'a>(&'a self) -> &'a Session {
+    fn sess(&self) -> &Session {
         self.sess
     }
 
@@ -313,7 +313,7 @@ struct IdentifiedAnnotation<'hir> {
 }
 
 impl<'hir> PrinterSupport for IdentifiedAnnotation<'hir> {
-    fn sess<'a>(&'a self) -> &'a Session {
+    fn sess(&self) -> &Session {
         self.sess
     }
 
@@ -360,7 +360,7 @@ impl<'hir> pprust::PpAnn for IdentifiedAnnotation<'hir> {
 }
 
 impl<'hir> HirPrinterSupport<'hir> for IdentifiedAnnotation<'hir> {
-    fn sess<'a>(&'a self) -> &'a Session {
+    fn sess(&self) -> &Session {
         self.sess
     }
 
@@ -458,7 +458,7 @@ struct TypedAnnotation<'a, 'tcx> {
 }
 
 impl<'b, 'tcx> HirPrinterSupport<'tcx> for TypedAnnotation<'b, 'tcx> {
-    fn sess<'a>(&'a self) -> &'a Session {
+    fn sess(&self) -> &Session {
         &self.tcx.sess
     }
 
@@ -866,8 +866,8 @@ pub fn print_after_hir_lowering<'tcx>(
 // analysis is performed. However, we want to call `phase_3_run_analysis_passes`
 // with a different callback than the standard driver, so that isn't easy.
 // Instead, we call that function ourselves.
-fn print_with_analysis<'tcx>(
-    tcx: TyCtxt<'tcx>,
+fn print_with_analysis(
+    tcx: TyCtxt<'_>,
     ppm: PpMode,
     uii: Option<UserIdentifiedItem>,
     ofile: Option<&Path>,