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:
parent
1a53c00117
commit
fcab98038c
19 changed files with 241 additions and 81 deletions
|
@ -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(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue