diff options
| author | Eduard-Mihai Burtescu <edy.burt@gmail.com> | 2019-06-14 00:48:52 +0300 |
|---|---|---|
| committer | Eduard-Mihai Burtescu <edy.burt@gmail.com> | 2019-06-14 18:58:23 +0300 |
| commit | f3f9d6dfd92dfaeb14df891ad27b2531809dd734 (patch) | |
| tree | cc6b503f85dcfa52dde1c95b52a35c3b94569a84 /src/librustc_codegen_utils/symbol_names | |
| parent | 0e4a56b4b04ea98bb16caada30cb2418dd06e250 (diff) | |
| download | rust-f3f9d6dfd92dfaeb14df891ad27b2531809dd734.tar.gz rust-f3f9d6dfd92dfaeb14df891ad27b2531809dd734.zip | |
Unify all uses of 'gcx and 'tcx.
Diffstat (limited to 'src/librustc_codegen_utils/symbol_names')
| -rw-r--r-- | src/librustc_codegen_utils/symbol_names/legacy.rs | 14 | ||||
| -rw-r--r-- | src/librustc_codegen_utils/symbol_names/v0.rs | 8 |
2 files changed, 11 insertions, 11 deletions
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 } |
