Temporary bootstrapping hack: introduce syntax for r egion bounds like 'b:'a,
meaning `'b outlives 'a`. Syntax currently does nothing but is needed for full fix to #5763. To use this syntax, the issue_5763_bootstrap feature guard is required.
This commit is contained in:
@@ -160,6 +160,12 @@ pub struct Lifetime {
|
||||
pub name: Name
|
||||
}
|
||||
|
||||
#[deriving(Clone, PartialEq, Eq, Encodable, Decodable, Hash, Show)]
|
||||
pub struct LifetimeDef {
|
||||
pub lifetime: Lifetime,
|
||||
pub bounds: Vec<Lifetime>
|
||||
}
|
||||
|
||||
/// A "Path" is essentially Rust's notion of a name; for instance:
|
||||
/// std::cmp::PartialEq . It's represented as a sequence of identifiers,
|
||||
/// along with a bunch of supporting information.
|
||||
@@ -231,7 +237,7 @@ pub struct TyParam {
|
||||
/// of a function, enum, trait, etc.
|
||||
#[deriving(Clone, PartialEq, Eq, Encodable, Decodable, Hash, Show)]
|
||||
pub struct Generics {
|
||||
pub lifetimes: Vec<Lifetime>,
|
||||
pub lifetimes: Vec<LifetimeDef>,
|
||||
pub ty_params: OwnedSlice<TyParam>,
|
||||
}
|
||||
|
||||
@@ -861,7 +867,7 @@ impl fmt::Show for Onceness {
|
||||
/// Represents the type of a closure
|
||||
#[deriving(PartialEq, Eq, Encodable, Decodable, Hash, Show)]
|
||||
pub struct ClosureTy {
|
||||
pub lifetimes: Vec<Lifetime>,
|
||||
pub lifetimes: Vec<LifetimeDef>,
|
||||
pub fn_style: FnStyle,
|
||||
pub onceness: Onceness,
|
||||
pub decl: P<FnDecl>,
|
||||
@@ -876,7 +882,7 @@ pub struct ClosureTy {
|
||||
pub struct BareFnTy {
|
||||
pub fn_style: FnStyle,
|
||||
pub abi: Abi,
|
||||
pub lifetimes: Vec<Lifetime>,
|
||||
pub lifetimes: Vec<LifetimeDef>,
|
||||
pub decl: P<FnDecl>
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user