1
Fork 0

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:
Niko Matsakis 2014-08-05 22:59:24 -04:00
parent 1a53c00117
commit fcab98038c
19 changed files with 241 additions and 81 deletions

View file

@ -395,7 +395,7 @@ impl<'a> TraitDef<'a> {
let mut ty_params = ty_params.into_vec();
// Copy the lifetimes
lifetimes.extend(generics.lifetimes.iter().map(|l| *l));
lifetimes.extend(generics.lifetimes.iter().map(|l| (*l).clone()));
// Create the type parameters.
ty_params.extend(generics.ty_params.iter().map(|ty_param| {
@ -429,7 +429,11 @@ impl<'a> TraitDef<'a> {
cx.ty_ident(self.span, ty_param.ident)
});
let self_lifetimes = generics.lifetimes.clone();
let self_lifetimes: Vec<ast::Lifetime> =
generics.lifetimes
.iter()
.map(|ld| ld.lifetime)
.collect();
// Create the type of `self`.
let self_type = cx.ty_path(