@@ -79,10 +79,10 @@ struct LifetimeContext<'a> {
79
79
enum ScopeChain < ' a > {
80
80
/// EarlyScope(i, ['a, 'b, ...], s) extends s with early-bound
81
81
/// lifetimes, assigning indexes 'a => i, 'b => i+1, ... etc.
82
- EarlyScope ( subst:: ParamSpace , & ' a Vec < hir:: LifetimeDef > , Scope < ' a > ) ,
82
+ EarlyScope ( subst:: ParamSpace , & ' a [ hir:: LifetimeDef ] , Scope < ' a > ) ,
83
83
/// LateScope(['a, 'b, ...], s) extends s with late-bound
84
84
/// lifetimes introduced by the declaration binder_id.
85
- LateScope ( & ' a Vec < hir:: LifetimeDef > , Scope < ' a > ) ,
85
+ LateScope ( & ' a [ hir:: LifetimeDef ] , Scope < ' a > ) ,
86
86
/// lifetimes introduced by items within a code block are scoped
87
87
/// to that block.
88
88
BlockScope ( region:: DestructionScopeData , Scope < ' a > ) ,
@@ -661,7 +661,7 @@ impl<'a> LifetimeContext<'a> {
661
661
lifetime_ref. name) ;
662
662
}
663
663
664
- fn check_lifetime_defs ( & mut self , old_scope : Scope , lifetimes : & Vec < hir:: LifetimeDef > ) {
664
+ fn check_lifetime_defs ( & mut self , old_scope : Scope , lifetimes : & [ hir:: LifetimeDef ] ) {
665
665
for i in 0 ..lifetimes. len ( ) {
666
666
let lifetime_i = & lifetimes[ i] ;
667
667
@@ -753,7 +753,7 @@ impl<'a> LifetimeContext<'a> {
753
753
}
754
754
}
755
755
756
- fn search_lifetimes < ' a > ( lifetimes : & ' a Vec < hir:: LifetimeDef > ,
756
+ fn search_lifetimes < ' a > ( lifetimes : & ' a [ hir:: LifetimeDef ] ,
757
757
lifetime_ref : & hir:: Lifetime )
758
758
-> Option < ( u32 , & ' a hir:: Lifetime ) > {
759
759
for ( i, lifetime_decl) in lifetimes. iter ( ) . enumerate ( ) {
0 commit comments