]> git.lizzy.rs Git - rust.git/commitdiff
Rename RegionParamDef to LifetimeParamDef
authorvarkor <github@varkor.com>
Wed, 18 Apr 2018 23:41:29 +0000 (00:41 +0100)
committervarkor <github@varkor.com>
Tue, 15 May 2018 13:21:32 +0000 (14:21 +0100)
src/librustc/ich/impls_ty.rs
src/librustc/ty/mod.rs
src/librustc_typeck/collect.rs

index eddb73e72399cef55954a6032ebe4e53b59297db..e06d22607b75ec274109c73e34ba19ae8edc2942 100644 (file)
@@ -765,7 +765,7 @@ fn hash_stable<W: StableHasherResult>(&self,
     kind
 });
 
-impl_stable_hash_for!(struct ty::RegionParamDef {
+impl_stable_hash_for!(struct ty::LifetimeParamDef {
     pure_wrt_drop
 });
 
index 3c4c326578a5d6bb65881a1f7903aaef800dbb0b..025e07942656c555c95049e8744c8030d2b9becf 100644 (file)
@@ -723,7 +723,7 @@ pub struct TypeParamDef {
 }
 
 #[derive(Copy, Clone, Debug, RustcEncodable, RustcDecodable)]
-pub struct RegionParamDef {
+pub struct LifetimeParamDef {
     /// `pure_wrt_drop`, set by the (unsafe) `#[may_dangle]` attribute
     /// on generic parameter `'a`, asserts data of lifetime `'a`
     /// won't be accessed during the parent type's `Drop` impl.
@@ -738,7 +738,7 @@ pub fn to_bound_region(&self) -> ty::BoundRegion {
 
 #[derive(Clone, Debug, RustcEncodable, RustcDecodable)]
 pub enum GenericParamDefKind {
-    Lifetime(RegionParamDef),
+    Lifetime(LifetimeParamDef),
     Type(TypeParamDef),
 }
 
@@ -751,7 +751,7 @@ pub struct GenericParamDef {
 }
 
 impl GenericParamDef {
-    pub fn to_lifetime(&self) -> RegionParamDef {
+    pub fn to_lifetime(&self) -> LifetimeParamDef {
         match self.kind {
             GenericParamDefKind::Lifetime(lt) => lt,
             _ => bug!("cannot convert a non-lifetime to a lifetime")
index d41f7e607277a1d5feb3f07d10fffaa46aca1ee7..6945f8f3c078a70545cf9b481cbdab182d686bf8 100644 (file)
@@ -892,7 +892,7 @@ fn generics_of<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
             name: l.lifetime.name.name().as_interned_str(),
             index: own_start + i as u32,
             def_id: tcx.hir.local_def_id(l.lifetime.id),
-            kind: ty::GenericParamDefKind::Lifetime(ty::RegionParamDef {
+            kind: ty::GenericParamDefKind::Lifetime(ty::LifetimeParamDef {
                 pure_wrt_drop: l.pure_wrt_drop,
             }),
         }