}
#[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.
#[derive(Clone, Debug, RustcEncodable, RustcDecodable)]
pub enum GenericParamDefKind {
- Lifetime(RegionParamDef),
+ Lifetime(LifetimeParamDef),
Type(TypeParamDef),
}
}
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")
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,
}),
}