diff options
| author | varkor <github@varkor.com> | 2019-09-25 16:39:44 +0100 |
|---|---|---|
| committer | varkor <github@varkor.com> | 2019-09-26 11:48:05 +0100 |
| commit | bea3d67c77dd643ef1f89c8bd6562e90b373cec4 (patch) | |
| tree | 9dddf45584ef5604529a2b72049c63ae6b875cf7 /src/librustc_codegen_utils | |
| parent | dc45735f29788924b9fc351d100e5bf3ebdca162 (diff) | |
| download | rust-bea3d67c77dd643ef1f89c8bd6562e90b373cec4.tar.gz rust-bea3d67c77dd643ef1f89c8bd6562e90b373cec4.zip | |
Rename `subst::Kind` to `subst::GenericArg`
Diffstat (limited to 'src/librustc_codegen_utils')
| -rw-r--r-- | src/librustc_codegen_utils/symbol_names/legacy.rs | 6 | ||||
| -rw-r--r-- | src/librustc_codegen_utils/symbol_names/v0.rs | 20 |
2 files changed, 13 insertions, 13 deletions
diff --git a/src/librustc_codegen_utils/symbol_names/legacy.rs b/src/librustc_codegen_utils/symbol_names/legacy.rs index 1b094e26c24..277aa2db33a 100644 --- a/src/librustc_codegen_utils/symbol_names/legacy.rs +++ b/src/librustc_codegen_utils/symbol_names/legacy.rs @@ -3,7 +3,7 @@ use rustc::hir::map::{DefPathData, DisambiguatedDefPathData}; use rustc::ich::NodeIdHashingMode; use rustc::mir::interpret::{ConstValue, Scalar}; use rustc::ty::print::{PrettyPrinter, Printer, Print}; -use rustc::ty::subst::{Kind, UnpackedKind}; +use rustc::ty::subst::{GenericArg, GenericArgKind}; use rustc::ty::{self, Ty, TyCtxt, TypeFoldable, Instance}; use rustc::util::common::record_time; use rustc_data_structures::stable_hasher::{HashStable, StableHasher}; @@ -341,13 +341,13 @@ impl Printer<'tcx> for SymbolPrinter<'tcx> { fn path_generic_args( mut self, print_prefix: impl FnOnce(Self) -> Result<Self::Path, Self::Error>, - args: &[Kind<'tcx>], + args: &[GenericArg<'tcx>], ) -> Result<Self::Path, Self::Error> { self = print_prefix(self)?; let args = args.iter().cloned().filter(|arg| { match arg.unpack() { - UnpackedKind::Lifetime(_) => false, + GenericArgKind::Lifetime(_) => false, _ => true, } }); diff --git a/src/librustc_codegen_utils/symbol_names/v0.rs b/src/librustc_codegen_utils/symbol_names/v0.rs index f1f5913425d..a63236305dc 100644 --- a/src/librustc_codegen_utils/symbol_names/v0.rs +++ b/src/librustc_codegen_utils/symbol_names/v0.rs @@ -3,7 +3,7 @@ use rustc::hir::def_id::{CrateNum, DefId}; use rustc::hir::map::{DefPathData, DisambiguatedDefPathData}; use rustc::ty::{self, Ty, TyCtxt, TypeFoldable, Instance}; use rustc::ty::print::{Printer, Print}; -use rustc::ty::subst::{Kind, Subst, UnpackedKind}; +use rustc::ty::subst::{GenericArg, Subst, GenericArgKind}; use rustc_data_structures::base_n; use rustc_data_structures::fx::{FxHashMap, FxHashSet}; use rustc_target::spec::abi::Abi; @@ -56,7 +56,7 @@ struct CompressionCaches<'tcx> { start_offset: usize, // The values are start positions in `out`, in bytes. - paths: FxHashMap<(DefId, &'tcx [Kind<'tcx>]), usize>, + paths: FxHashMap<(DefId, &'tcx [GenericArg<'tcx>]), usize>, types: FxHashMap<Ty<'tcx>, usize>, consts: FxHashMap<&'tcx ty::Const<'tcx>, usize>, } @@ -234,7 +234,7 @@ impl Printer<'tcx> for SymbolMangler<'tcx> { fn print_def_path( mut self, def_id: DefId, - substs: &'tcx [Kind<'tcx>], + substs: &'tcx [GenericArg<'tcx>], ) -> Result<Self::Path, Self::Error> { if let Some(&i) = self.compress.as_ref().and_then(|c| c.paths.get(&(def_id, substs))) { return self.print_backref(i); @@ -256,7 +256,7 @@ impl Printer<'tcx> for SymbolMangler<'tcx> { fn print_impl_path( self, impl_def_id: DefId, - substs: &'tcx [Kind<'tcx>], + substs: &'tcx [GenericArg<'tcx>], mut self_ty: Ty<'tcx>, mut impl_trait_ref: Option<ty::TraitRef<'tcx>>, ) -> Result<Self::Path, Self::Error> { @@ -619,18 +619,18 @@ impl Printer<'tcx> for SymbolMangler<'tcx> { fn path_generic_args( mut self, print_prefix: impl FnOnce(Self) -> Result<Self::Path, Self::Error>, - args: &[Kind<'tcx>], + args: &[GenericArg<'tcx>], ) -> Result<Self::Path, Self::Error> { // Don't print any regions if they're all erased. let print_regions = args.iter().any(|arg| { match arg.unpack() { - UnpackedKind::Lifetime(r) => *r != ty::ReErased, + GenericArgKind::Lifetime(r) => *r != ty::ReErased, _ => false, } }); let args = args.iter().cloned().filter(|arg| { match arg.unpack() { - UnpackedKind::Lifetime(_) => print_regions, + GenericArgKind::Lifetime(_) => print_regions, _ => true, } }); @@ -643,13 +643,13 @@ impl Printer<'tcx> for SymbolMangler<'tcx> { self = print_prefix(self)?; for arg in args { match arg.unpack() { - UnpackedKind::Lifetime(lt) => { + GenericArgKind::Lifetime(lt) => { self = lt.print(self)?; } - UnpackedKind::Type(ty) => { + GenericArgKind::Type(ty) => { self = ty.print(self)?; } - UnpackedKind::Const(c) => { + GenericArgKind::Const(c) => { self.push("K"); // FIXME(const_generics) implement `ty::print::Print` on `ty::Const`. // self = c.print(self)?; |
