diff options
| author | Eduard-Mihai Burtescu <edy.burt@gmail.com> | 2019-06-11 22:03:44 +0300 |
|---|---|---|
| committer | Eduard-Mihai Burtescu <edy.burt@gmail.com> | 2019-06-12 13:38:27 +0300 |
| commit | 37799a5552d308da5d74d9654036f2f541f3c8c3 (patch) | |
| tree | f50866c051bcb3543a04dbc694bc24bb92c130f4 /src/librustc_codegen_utils | |
| parent | 3f511ade5b0bc42028e42b81392feec770d90ead (diff) | |
| download | rust-37799a5552d308da5d74d9654036f2f541f3c8c3.tar.gz rust-37799a5552d308da5d74d9654036f2f541f3c8c3.zip | |
rustc: replace `TyCtxt<'a, 'gcx, 'tcx>` with `TyCtxt<'tcx, 'gcx, 'tcx>`.
Diffstat (limited to 'src/librustc_codegen_utils')
| -rw-r--r-- | src/librustc_codegen_utils/codegen_backend.rs | 2 | ||||
| -rw-r--r-- | src/librustc_codegen_utils/symbol_names.rs | 2 | ||||
| -rw-r--r-- | src/librustc_codegen_utils/symbol_names/legacy.rs | 16 | ||||
| -rw-r--r-- | src/librustc_codegen_utils/symbol_names/v0.rs | 12 | ||||
| -rw-r--r-- | src/librustc_codegen_utils/symbol_names_test.rs | 10 |
5 files changed, 21 insertions, 21 deletions
diff --git a/src/librustc_codegen_utils/codegen_backend.rs b/src/librustc_codegen_utils/codegen_backend.rs index 191c6605b43..472b88b5b66 100644 --- a/src/librustc_codegen_utils/codegen_backend.rs +++ b/src/librustc_codegen_utils/codegen_backend.rs @@ -36,7 +36,7 @@ pub trait CodegenBackend { fn provide_extern(&self, _providers: &mut Providers<'_>); fn codegen_crate<'a, 'tcx>( &self, - tcx: TyCtxt<'a, 'tcx, 'tcx>, + tcx: TyCtxt<'tcx, 'tcx, 'tcx>, metadata: EncodedMetadata, need_metadata_module: bool, rx: mpsc::Receiver<Box<dyn Any + Send>> diff --git a/src/librustc_codegen_utils/symbol_names.rs b/src/librustc_codegen_utils/symbol_names.rs index 47dc4e5b2ca..4df96a95e53 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, 'tcx, '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 b6ece06fa6c..c7729f28beb 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, 'tcx, 'tcx>, instance: Instance<'tcx>, instantiating_crate: Option<CrateNum>, ) -> String { @@ -69,7 +69,7 @@ pub(super) fn mangle( } fn get_symbol_hash<'a, 'tcx>( - tcx: TyCtxt<'a, 'tcx, 'tcx>, + tcx: TyCtxt<'tcx, 'tcx, 'tcx>, // instance this name will be for instance: Instance<'tcx>, @@ -179,8 +179,8 @@ impl SymbolPath { } } -struct SymbolPrinter<'a, 'tcx> { - tcx: TyCtxt<'a, 'tcx, 'tcx>, +struct SymbolPrinter<'tcx> { + tcx: TyCtxt<'tcx, 'tcx, 'tcx>, path: SymbolPath, // When `true`, `finalize_pending_component` isn't used. @@ -194,7 +194,7 @@ struct SymbolPrinter<'a, '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, '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(&'a self) -> TyCtxt<'a, 'tcx, 'tcx> { + fn tcx(&'a self) -> TyCtxt<'tcx, 'tcx, 'tcx> { self.tcx } @@ -360,7 +360,7 @@ impl Printer<'tcx, 'tcx> for SymbolPrinter<'_, 'tcx> { } } -impl PrettyPrinter<'tcx, 'tcx> for SymbolPrinter<'_, 'tcx> { +impl PrettyPrinter<'tcx, 'tcx> for SymbolPrinter<'tcx> { fn region_should_not_be_omitted( &self, _region: ty::Region<'_>, @@ -400,7 +400,7 @@ impl PrettyPrinter<'tcx, 'tcx> for SymbolPrinter<'_, 'tcx> { } } -impl fmt::Write for SymbolPrinter<'_, '_> { +impl fmt::Write for SymbolPrinter<'_> { fn write_str(&mut self, s: &str) -> fmt::Result { // Name sanitation. LLVM will happily accept identifiers with weird names, but // gas doesn't! diff --git a/src/librustc_codegen_utils/symbol_names/v0.rs b/src/librustc_codegen_utils/symbol_names/v0.rs index d83d7e5244e..e3b12fb7f41 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, 'tcx, 'tcx>, instance: Instance<'tcx>, instantiating_crate: Option<CrateNum>, ) -> String { @@ -75,14 +75,14 @@ struct BinderLevel { lifetime_depths: Range<u32>, } -struct SymbolMangler<'a, 'tcx> { - tcx: TyCtxt<'a, 'tcx, 'tcx>, +struct SymbolMangler<'tcx> { + tcx: TyCtxt<'tcx, 'tcx, 'tcx>, compress: Option<Box<CompressionCaches<'tcx>>>, binders: Vec<BinderLevel>, out: String, } -impl SymbolMangler<'_, 'tcx> { +impl SymbolMangler<'tcx> { fn push(&mut self, s: &str) { self.out.push_str(s); } @@ -214,7 +214,7 @@ impl SymbolMangler<'_, 'tcx> { } } -impl Printer<'tcx, 'tcx> for SymbolMangler<'_, 'tcx> { +impl Printer<'tcx, '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<'a>(&'a self) -> TyCtxt<'a, 'tcx, 'tcx> { + fn tcx<'a>(&'a self) -> TyCtxt<'tcx, 'tcx, 'tcx> { self.tcx } diff --git a/src/librustc_codegen_utils/symbol_names_test.rs b/src/librustc_codegen_utils/symbol_names_test.rs index 9f7e4833952..b2d77e21200 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<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>) { +pub fn report_symbol_names<'a, 'tcx>(tcx: TyCtxt<'tcx, 'tcx, 'tcx>) { // if the `rustc_attrs` feature is not enabled, then the // attributes we are interested in cannot be present anyway, so // skip the walk. @@ -25,11 +25,11 @@ pub fn report_symbol_names<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>) { }) } -struct SymbolNamesTest<'a, 'tcx:'a> { - tcx: TyCtxt<'a, 'tcx, 'tcx>, +struct SymbolNamesTest<'tcx> { + tcx: TyCtxt<'tcx, 'tcx, 'tcx>, } -impl<'a, 'tcx> SymbolNamesTest<'a, 'tcx> { +impl SymbolNamesTest<'tcx> { fn process_attrs(&mut self, hir_id: hir::HirId) { let tcx = self.tcx; @@ -56,7 +56,7 @@ impl<'a, 'tcx> SymbolNamesTest<'a, 'tcx> { } } -impl<'a, 'tcx> hir::itemlikevisit::ItemLikeVisitor<'tcx> for SymbolNamesTest<'a, 'tcx> { +impl hir::itemlikevisit::ItemLikeVisitor<'tcx> for SymbolNamesTest<'tcx> { fn visit_item(&mut self, item: &'tcx hir::Item) { self.process_attrs(item.hir_id); } |
