diff --git a/src/librustc/ich/impls_ty.rs b/src/librustc/ich/impls_ty.rs index eddb73e7239..e06d22607b7 100644 --- a/src/librustc/ich/impls_ty.rs +++ b/src/librustc/ich/impls_ty.rs @@ -765,7 +765,7 @@ impl_stable_hash_for!(struct ty::GenericParamDef { kind }); -impl_stable_hash_for!(struct ty::RegionParamDef { +impl_stable_hash_for!(struct ty::LifetimeParamDef { pure_wrt_drop }); diff --git a/src/librustc/ty/mod.rs b/src/librustc/ty/mod.rs index 3c4c326578a..025e0794265 100644 --- a/src/librustc/ty/mod.rs +++ b/src/librustc/ty/mod.rs @@ -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 @@ impl ty::EarlyBoundRegion { #[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") diff --git a/src/librustc_typeck/collect.rs b/src/librustc_typeck/collect.rs index d41f7e60727..6945f8f3c07 100644 --- a/src/librustc_typeck/collect.rs +++ b/src/librustc_typeck/collect.rs @@ -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, }), }