about summary refs log tree commit diff
path: root/src/librustc_codegen_utils
diff options
context:
space:
mode:
authorEduard-Mihai Burtescu <edy.burt@gmail.com>2019-06-14 00:48:52 +0300
committerEduard-Mihai Burtescu <edy.burt@gmail.com>2019-06-14 18:58:23 +0300
commitf3f9d6dfd92dfaeb14df891ad27b2531809dd734 (patch)
treecc6b503f85dcfa52dde1c95b52a35c3b94569a84 /src/librustc_codegen_utils
parent0e4a56b4b04ea98bb16caada30cb2418dd06e250 (diff)
downloadrust-f3f9d6dfd92dfaeb14df891ad27b2531809dd734.tar.gz
rust-f3f9d6dfd92dfaeb14df891ad27b2531809dd734.zip
Unify all uses of 'gcx and 'tcx.
Diffstat (limited to 'src/librustc_codegen_utils')
-rw-r--r--src/librustc_codegen_utils/codegen_backend.rs2
-rw-r--r--src/librustc_codegen_utils/lib.rs2
-rw-r--r--src/librustc_codegen_utils/symbol_names.rs2
-rw-r--r--src/librustc_codegen_utils/symbol_names/legacy.rs14
-rw-r--r--src/librustc_codegen_utils/symbol_names/v0.rs8
-rw-r--r--src/librustc_codegen_utils/symbol_names_test.rs4
6 files changed, 16 insertions, 16 deletions
diff --git a/src/librustc_codegen_utils/codegen_backend.rs b/src/librustc_codegen_utils/codegen_backend.rs
index 1bf03c0c45c..7a7a50a25fa 100644
--- a/src/librustc_codegen_utils/codegen_backend.rs
+++ b/src/librustc_codegen_utils/codegen_backend.rs
@@ -35,7 +35,7 @@ pub trait CodegenBackend {
     fn provide_extern(&self, _providers: &mut Providers<'_>);
     fn codegen_crate<'tcx>(
         &self,
-        tcx: TyCtxt<'tcx, 'tcx>,
+        tcx: TyCtxt<'tcx>,
         metadata: EncodedMetadata,
         need_metadata_module: bool,
         rx: mpsc::Receiver<Box<dyn Any + Send>>,
diff --git a/src/librustc_codegen_utils/lib.rs b/src/librustc_codegen_utils/lib.rs
index cc6e368f11b..942c2d13fac 100644
--- a/src/librustc_codegen_utils/lib.rs
+++ b/src/librustc_codegen_utils/lib.rs
@@ -36,7 +36,7 @@ pub mod symbol_names_test;
 /// error in codegen. This is used to write compile-fail tests
 /// that actually test that compilation succeeds without
 /// reporting an error.
-pub fn check_for_rustc_errors_attr(tcx: TyCtxt<'_, '_>) {
+pub fn check_for_rustc_errors_attr(tcx: TyCtxt<'_>) {
     if let Some((def_id, _)) = tcx.entry_fn(LOCAL_CRATE) {
         if tcx.has_attr(def_id, sym::rustc_error) {
             tcx.sess.span_fatal(tcx.def_span(def_id), "compilation successful");
diff --git a/src/librustc_codegen_utils/symbol_names.rs b/src/librustc_codegen_utils/symbol_names.rs
index 89b35b4cc61..ba74f79eba3 100644
--- a/src/librustc_codegen_utils/symbol_names.rs
+++ b/src/librustc_codegen_utils/symbol_names.rs
@@ -112,7 +112,7 @@ pub fn provide(providers: &mut Providers<'_>) {
     };
 }
 
-fn symbol_name(tcx: TyCtxt<'tcx, 'tcx>, instance: Instance<'tcx>) -> InternedString {
+fn symbol_name(tcx: TyCtxt<'tcx>, instance: Instance<'tcx>) -> InternedString {
     let def_id = instance.def_id();
     let substs = instance.substs;
 
diff --git a/src/librustc_codegen_utils/symbol_names/legacy.rs b/src/librustc_codegen_utils/symbol_names/legacy.rs
index 9645af5309e..72eb4969aa8 100644
--- a/src/librustc_codegen_utils/symbol_names/legacy.rs
+++ b/src/librustc_codegen_utils/symbol_names/legacy.rs
@@ -14,7 +14,7 @@ use std::fmt::{self, Write};
 use std::mem::{self, discriminant};
 
 pub(super) fn mangle(
-    tcx: TyCtxt<'tcx, 'tcx>,
+    tcx: TyCtxt<'tcx>,
     instance: Instance<'tcx>,
     instantiating_crate: Option<CrateNum>,
 ) -> String {
@@ -69,7 +69,7 @@ pub(super) fn mangle(
 }
 
 fn get_symbol_hash<'tcx>(
-    tcx: TyCtxt<'tcx, 'tcx>,
+    tcx: TyCtxt<'tcx>,
 
     // instance this name will be for
     instance: Instance<'tcx>,
@@ -180,7 +180,7 @@ impl SymbolPath {
 }
 
 struct SymbolPrinter<'tcx> {
-    tcx: TyCtxt<'tcx, 'tcx>,
+    tcx: TyCtxt<'tcx>,
     path: SymbolPath,
 
     // When `true`, `finalize_pending_component` isn't used.
@@ -194,7 +194,7 @@ struct SymbolPrinter<'tcx> {
 // `PrettyPrinter` aka pretty printing of e.g. types in paths,
 // symbol names should have their own printing machinery.
 
-impl Printer<'tcx, 'tcx> for SymbolPrinter<'tcx> {
+impl Printer<'tcx> for SymbolPrinter<'tcx> {
     type Error = fmt::Error;
 
     type Path = Self;
@@ -203,7 +203,7 @@ impl Printer<'tcx, 'tcx> for SymbolPrinter<'tcx> {
     type DynExistential = Self;
     type Const = Self;
 
-    fn tcx(&self) -> TyCtxt<'tcx, 'tcx> {
+    fn tcx(&self) -> TyCtxt<'tcx> {
         self.tcx
     }
 
@@ -360,7 +360,7 @@ impl Printer<'tcx, 'tcx> for SymbolPrinter<'tcx> {
     }
 }
 
-impl PrettyPrinter<'tcx, 'tcx> for SymbolPrinter<'tcx> {
+impl PrettyPrinter<'tcx> for SymbolPrinter<'tcx> {
     fn region_should_not_be_omitted(
         &self,
         _region: ty::Region<'_>,
@@ -371,7 +371,7 @@ impl PrettyPrinter<'tcx, 'tcx> for SymbolPrinter<'tcx> {
         mut self,
         mut elems: impl Iterator<Item = T>,
     ) -> Result<Self, Self::Error>
-        where T: Print<'tcx, 'tcx, Self, Output = Self, Error = Self::Error>
+        where T: Print<'tcx, Self, Output = Self, Error = Self::Error>
     {
         if let Some(first) = elems.next() {
             self = first.print(self)?;
diff --git a/src/librustc_codegen_utils/symbol_names/v0.rs b/src/librustc_codegen_utils/symbol_names/v0.rs
index 7e78b9ea887..8a54fb6bbc4 100644
--- a/src/librustc_codegen_utils/symbol_names/v0.rs
+++ b/src/librustc_codegen_utils/symbol_names/v0.rs
@@ -13,7 +13,7 @@ use std::fmt::Write;
 use std::ops::Range;
 
 pub(super) fn mangle(
-    tcx: TyCtxt<'tcx, 'tcx>,
+    tcx: TyCtxt<'tcx>,
     instance: Instance<'tcx>,
     instantiating_crate: Option<CrateNum>,
 ) -> String {
@@ -76,7 +76,7 @@ struct BinderLevel {
 }
 
 struct SymbolMangler<'tcx> {
-    tcx: TyCtxt<'tcx, 'tcx>,
+    tcx: TyCtxt<'tcx>,
     compress: Option<Box<CompressionCaches<'tcx>>>,
     binders: Vec<BinderLevel>,
     out: String,
@@ -214,7 +214,7 @@ impl SymbolMangler<'tcx> {
     }
 }
 
-impl Printer<'tcx, 'tcx> for SymbolMangler<'tcx> {
+impl Printer<'tcx> for SymbolMangler<'tcx> {
     type Error = !;
 
     type Path = Self;
@@ -223,7 +223,7 @@ impl Printer<'tcx, 'tcx> for SymbolMangler<'tcx> {
     type DynExistential = Self;
     type Const = Self;
 
-    fn tcx(&self) -> TyCtxt<'tcx, 'tcx> {
+    fn tcx(&self) -> TyCtxt<'tcx> {
         self.tcx
     }
 
diff --git a/src/librustc_codegen_utils/symbol_names_test.rs b/src/librustc_codegen_utils/symbol_names_test.rs
index 93b8a969d0b..f48d1f2853c 100644
--- a/src/librustc_codegen_utils/symbol_names_test.rs
+++ b/src/librustc_codegen_utils/symbol_names_test.rs
@@ -11,7 +11,7 @@ use syntax::symbol::{Symbol, sym};
 const SYMBOL_NAME: Symbol = sym::rustc_symbol_name;
 const DEF_PATH: Symbol = sym::rustc_def_path;
 
-pub fn report_symbol_names<'tcx>(tcx: TyCtxt<'tcx, 'tcx>) {
+pub fn report_symbol_names<'tcx>(tcx: TyCtxt<'tcx>) {
     // if the `rustc_attrs` feature is not enabled, then the
     // attributes we are interested in cannot be present anyway, so
     // skip the walk.
@@ -26,7 +26,7 @@ pub fn report_symbol_names<'tcx>(tcx: TyCtxt<'tcx, 'tcx>) {
 }
 
 struct SymbolNamesTest<'tcx> {
-    tcx: TyCtxt<'tcx, 'tcx>,
+    tcx: TyCtxt<'tcx>,
 }
 
 impl SymbolNamesTest<'tcx> {