@@ -98,7 +98,7 @@ impl<'ast> DefCollector<'ast> {
9898 self . parent_def = parent;
9999 }
100100
101- fn visit_ast_const_integer ( & mut self , expr : & ' ast Expr ) {
101+ fn visit_ast_const_integer ( & mut self , expr : & Expr ) {
102102 // Find the node which will be used after lowering.
103103 if let ExprKind :: Paren ( ref inner) = expr. node {
104104 return self . visit_ast_const_integer ( inner) ;
@@ -124,8 +124,8 @@ impl<'ast> DefCollector<'ast> {
124124 }
125125}
126126
127- impl < ' ast > visit:: Visitor < ' ast > for DefCollector < ' ast > {
128- fn visit_item ( & mut self , i : & ' ast Item ) {
127+ impl < ' ast > visit:: Visitor for DefCollector < ' ast > {
128+ fn visit_item ( & mut self , i : & Item ) {
129129 debug ! ( "visit_item: {:?}" , i) ;
130130
131131 // Pick the def data. This need not be unique, but the more
@@ -183,23 +183,23 @@ impl<'ast> visit::Visitor<'ast> for DefCollector<'ast> {
183183 } ) ;
184184 }
185185
186- fn visit_foreign_item ( & mut self , foreign_item : & ' ast ForeignItem ) {
186+ fn visit_foreign_item ( & mut self , foreign_item : & ForeignItem ) {
187187 let def = self . create_def ( foreign_item. id , DefPathData :: ValueNs ( foreign_item. ident . name ) ) ;
188188
189189 self . with_parent ( def, |this| {
190190 visit:: walk_foreign_item ( this, foreign_item) ;
191191 } ) ;
192192 }
193193
194- fn visit_generics ( & mut self , generics : & ' ast Generics ) {
194+ fn visit_generics ( & mut self , generics : & Generics ) {
195195 for ty_param in generics. ty_params . iter ( ) {
196196 self . create_def ( ty_param. id , DefPathData :: TypeParam ( ty_param. ident . name ) ) ;
197197 }
198198
199199 visit:: walk_generics ( self , generics) ;
200200 }
201201
202- fn visit_trait_item ( & mut self , ti : & ' ast TraitItem ) {
202+ fn visit_trait_item ( & mut self , ti : & TraitItem ) {
203203 let def_data = match ti. node {
204204 TraitItemKind :: Method ( ..) | TraitItemKind :: Const ( ..) =>
205205 DefPathData :: ValueNs ( ti. ident . name ) ,
@@ -217,7 +217,7 @@ impl<'ast> visit::Visitor<'ast> for DefCollector<'ast> {
217217 } ) ;
218218 }
219219
220- fn visit_impl_item ( & mut self , ii : & ' ast ImplItem ) {
220+ fn visit_impl_item ( & mut self , ii : & ImplItem ) {
221221 let def_data = match ii. node {
222222 ImplItemKind :: Method ( ..) | ImplItemKind :: Const ( ..) =>
223223 DefPathData :: ValueNs ( ii. ident . name ) ,
@@ -235,7 +235,7 @@ impl<'ast> visit::Visitor<'ast> for DefCollector<'ast> {
235235 } ) ;
236236 }
237237
238- fn visit_pat ( & mut self , pat : & ' ast Pat ) {
238+ fn visit_pat ( & mut self , pat : & Pat ) {
239239 let parent_def = self . parent_def ;
240240
241241 if let PatKind :: Ident ( _, id, _) = pat. node {
@@ -247,7 +247,7 @@ impl<'ast> visit::Visitor<'ast> for DefCollector<'ast> {
247247 self . parent_def = parent_def;
248248 }
249249
250- fn visit_expr ( & mut self , expr : & ' ast Expr ) {
250+ fn visit_expr ( & mut self , expr : & Expr ) {
251251 let parent_def = self . parent_def ;
252252
253253 if let ExprKind :: Repeat ( _, ref count) = expr. node {
@@ -263,18 +263,18 @@ impl<'ast> visit::Visitor<'ast> for DefCollector<'ast> {
263263 self . parent_def = parent_def;
264264 }
265265
266- fn visit_ty ( & mut self , ty : & ' ast Ty ) {
266+ fn visit_ty ( & mut self , ty : & Ty ) {
267267 if let TyKind :: FixedLengthVec ( _, ref length) = ty. node {
268268 self . visit_ast_const_integer ( length) ;
269269 }
270270 visit:: walk_ty ( self , ty) ;
271271 }
272272
273- fn visit_lifetime_def ( & mut self , def : & ' ast LifetimeDef ) {
273+ fn visit_lifetime_def ( & mut self , def : & LifetimeDef ) {
274274 self . create_def ( def. lifetime . id , DefPathData :: LifetimeDef ( def. lifetime . name ) ) ;
275275 }
276276
277- fn visit_macro_def ( & mut self , macro_def : & ' ast MacroDef ) {
277+ fn visit_macro_def ( & mut self , macro_def : & MacroDef ) {
278278 self . create_def ( macro_def. id , DefPathData :: MacroDef ( macro_def. ident . name ) ) ;
279279 }
280280}
0 commit comments