@@ -221,39 +221,44 @@ fn variant_disr_val(d: rbml::Doc) -> Option<ty::Disr> {
221221 } )
222222}
223223
224- fn doc_type ( doc : rbml:: Doc , tcx : & ty:: ctxt , cdata : Cmd ) -> Ty {
224+ fn doc_type < ' tcx > ( doc : rbml:: Doc , tcx : & ty:: ctxt < ' tcx > , cdata : Cmd ) -> Ty < ' tcx > {
225225 let tp = reader:: get_doc ( doc, tag_items_data_item_type) ;
226226 parse_ty_data ( tp. data , cdata. cnum , tp. start , tcx,
227227 |_, did| translate_def_id ( cdata, did) )
228228}
229229
230- fn doc_method_fty ( doc : rbml:: Doc , tcx : & ty:: ctxt , cdata : Cmd ) -> ty:: BareFnTy {
230+ fn doc_method_fty < ' tcx > ( doc : rbml:: Doc , tcx : & ty:: ctxt < ' tcx > ,
231+ cdata : Cmd ) -> ty:: BareFnTy < ' tcx > {
231232 let tp = reader:: get_doc ( doc, tag_item_method_fty) ;
232233 parse_bare_fn_ty_data ( tp. data , cdata. cnum , tp. start , tcx,
233234 |_, did| translate_def_id ( cdata, did) )
234235}
235236
236- pub fn item_type ( _item_id : ast:: DefId , item : rbml:: Doc ,
237- tcx : & ty:: ctxt , cdata : Cmd ) -> Ty {
237+ pub fn item_type < ' tcx > ( _item_id : ast:: DefId , item : rbml:: Doc ,
238+ tcx : & ty:: ctxt < ' tcx > , cdata : Cmd ) -> Ty < ' tcx > {
238239 doc_type ( item, tcx, cdata)
239240}
240241
241- fn doc_trait_ref ( doc : rbml:: Doc , tcx : & ty:: ctxt , cdata : Cmd ) -> ty:: TraitRef {
242+ fn doc_trait_ref < ' tcx > ( doc : rbml:: Doc , tcx : & ty:: ctxt < ' tcx > , cdata : Cmd )
243+ -> ty:: TraitRef < ' tcx > {
242244 parse_trait_ref_data ( doc. data , cdata. cnum , doc. start , tcx,
243245 |_, did| translate_def_id ( cdata, did) )
244246}
245247
246- fn item_trait_ref ( doc : rbml:: Doc , tcx : & ty:: ctxt , cdata : Cmd ) -> ty:: TraitRef {
248+ fn item_trait_ref < ' tcx > ( doc : rbml:: Doc , tcx : & ty:: ctxt < ' tcx > , cdata : Cmd )
249+ -> ty:: TraitRef < ' tcx > {
247250 let tp = reader:: get_doc ( doc, tag_item_trait_ref) ;
248251 doc_trait_ref ( tp, tcx, cdata)
249252}
250253
251- fn doc_bounds ( doc : rbml:: Doc , tcx : & ty:: ctxt , cdata : Cmd ) -> ty:: ParamBounds {
254+ fn doc_bounds < ' tcx > ( doc : rbml:: Doc , tcx : & ty:: ctxt < ' tcx > , cdata : Cmd )
255+ -> ty:: ParamBounds < ' tcx > {
252256 parse_bounds_data ( doc. data , cdata. cnum , doc. start , tcx,
253257 |_, did| translate_def_id ( cdata, did) )
254258}
255259
256- fn trait_def_bounds ( doc : rbml:: Doc , tcx : & ty:: ctxt , cdata : Cmd ) -> ty:: ParamBounds {
260+ fn trait_def_bounds < ' tcx > ( doc : rbml:: Doc , tcx : & ty:: ctxt < ' tcx > , cdata : Cmd )
261+ -> ty:: ParamBounds < ' tcx > {
257262 let d = reader:: get_doc ( doc, tag_trait_def_bounds) ;
258263 doc_bounds ( d, tcx, cdata)
259264}
@@ -350,9 +355,9 @@ fn item_to_def_like(item: rbml::Doc, did: ast::DefId, cnum: ast::CrateNum)
350355 }
351356}
352357
353- pub fn get_trait_def ( cdata : Cmd ,
354- item_id : ast:: NodeId ,
355- tcx : & ty:: ctxt ) -> ty:: TraitDef
358+ pub fn get_trait_def < ' tcx > ( cdata : Cmd ,
359+ item_id : ast:: NodeId ,
360+ tcx : & ty:: ctxt < ' tcx > ) -> ty:: TraitDef < ' tcx >
356361{
357362 let item_doc = lookup_item ( item_id, cdata. data ( ) ) ;
358363 let generics = doc_generics ( item_doc, tcx, cdata, tag_item_generics) ;
@@ -365,8 +370,8 @@ pub fn get_trait_def(cdata: Cmd,
365370 }
366371}
367372
368- pub fn get_type ( cdata : Cmd , id : ast:: NodeId , tcx : & ty:: ctxt )
369- -> ty:: Polytype {
373+ pub fn get_type < ' tcx > ( cdata : Cmd , id : ast:: NodeId , tcx : & ty:: ctxt < ' tcx > )
374+ -> ty:: Polytype < ' tcx > {
370375
371376 let item = lookup_item ( id, cdata. data ( ) ) ;
372377
@@ -400,20 +405,21 @@ pub fn get_repr_attrs(cdata: Cmd, id: ast::NodeId) -> Vec<attr::ReprAttr> {
400405 }
401406}
402407
403- pub fn get_impl_trait ( cdata : Cmd ,
404- id : ast:: NodeId ,
405- tcx : & ty:: ctxt ) -> Option < Rc < ty:: TraitRef > >
408+ pub fn get_impl_trait < ' tcx > ( cdata : Cmd ,
409+ id : ast:: NodeId ,
410+ tcx : & ty:: ctxt < ' tcx > )
411+ -> Option < Rc < ty:: TraitRef < ' tcx > > >
406412{
407413 let item_doc = lookup_item ( id, cdata. data ( ) ) ;
408414 reader:: maybe_get_doc ( item_doc, tag_item_trait_ref) . map ( |tp| {
409415 Rc :: new ( doc_trait_ref ( tp, tcx, cdata) )
410416 } )
411417}
412418
413- pub fn get_impl_vtables ( cdata : Cmd ,
414- id : ast:: NodeId ,
415- tcx : & ty:: ctxt )
416- -> typeck:: vtable_res
419+ pub fn get_impl_vtables < ' tcx > ( cdata : Cmd ,
420+ id : ast:: NodeId ,
421+ tcx : & ty:: ctxt < ' tcx > )
422+ -> typeck:: vtable_res < ' tcx >
417423{
418424 let item_doc = lookup_item ( id, cdata. data ( ) ) ;
419425 let vtables_doc = reader:: get_doc ( item_doc, tag_item_impl_vtables) ;
@@ -679,8 +685,8 @@ pub fn get_enum_variant_defs(intr: &IdentInterner,
679685 } ) . collect ( )
680686}
681687
682- pub fn get_enum_variants ( intr : Rc < IdentInterner > , cdata : Cmd , id : ast:: NodeId ,
683- tcx : & ty:: ctxt ) -> Vec < Rc < ty:: VariantInfo > > {
688+ pub fn get_enum_variants < ' tcx > ( intr : Rc < IdentInterner > , cdata : Cmd , id : ast:: NodeId ,
689+ tcx : & ty:: ctxt < ' tcx > ) -> Vec < Rc < ty:: VariantInfo < ' tcx > > > {
684690 let data = cdata. data ( ) ;
685691 let items = reader:: get_doc ( rbml:: Doc :: new ( data) , tag_items) ;
686692 let item = find_item ( id, items) ;
@@ -783,11 +789,11 @@ pub fn get_trait_item_name_and_kind(intr: Rc<IdentInterner>,
783789 }
784790}
785791
786- pub fn get_impl_or_trait_item ( intr : Rc < IdentInterner > ,
787- cdata : Cmd ,
788- id : ast:: NodeId ,
789- tcx : & ty:: ctxt )
790- -> ty:: ImplOrTraitItem {
792+ pub fn get_impl_or_trait_item < ' tcx > ( intr : Rc < IdentInterner > ,
793+ cdata : Cmd ,
794+ id : ast:: NodeId ,
795+ tcx : & ty:: ctxt < ' tcx > )
796+ -> ty:: ImplOrTraitItem < ' tcx > {
791797 let method_doc = lookup_item ( id, cdata. data ( ) ) ;
792798
793799 let def_id = item_def_id ( method_doc, cdata) ;
@@ -857,11 +863,11 @@ pub fn get_item_variances(cdata: Cmd, id: ast::NodeId) -> ty::ItemVariances {
857863 Decodable :: decode ( & mut decoder) . unwrap ( )
858864}
859865
860- pub fn get_provided_trait_methods ( intr : Rc < IdentInterner > ,
861- cdata : Cmd ,
862- id : ast:: NodeId ,
863- tcx : & ty:: ctxt )
864- -> Vec < Rc < ty:: Method > > {
866+ pub fn get_provided_trait_methods < ' tcx > ( intr : Rc < IdentInterner > ,
867+ cdata : Cmd ,
868+ id : ast:: NodeId ,
869+ tcx : & ty:: ctxt < ' tcx > )
870+ -> Vec < Rc < ty:: Method < ' tcx > > > {
865871 let data = cdata. data ( ) ;
866872 let item = lookup_item ( id, data) ;
867873 let mut result = Vec :: new ( ) ;
@@ -889,8 +895,8 @@ pub fn get_provided_trait_methods(intr: Rc<IdentInterner>,
889895}
890896
891897/// Returns the supertraits of the given trait.
892- pub fn get_supertraits ( cdata : Cmd , id : ast:: NodeId , tcx : & ty:: ctxt )
893- -> Vec < Rc < ty:: TraitRef > > {
898+ pub fn get_supertraits < ' tcx > ( cdata : Cmd , id : ast:: NodeId , tcx : & ty:: ctxt < ' tcx > )
899+ -> Vec < Rc < ty:: TraitRef < ' tcx > > > {
894900 let mut results = Vec :: new ( ) ;
895901 let item_doc = lookup_item ( id, cdata. data ( ) ) ;
896902 reader:: tagged_docs ( item_doc, tag_item_super_trait_ref, |trait_doc| {
@@ -1385,11 +1391,11 @@ pub fn is_typedef(cdata: Cmd, id: ast::NodeId) -> bool {
13851391 }
13861392}
13871393
1388- fn doc_generics ( base_doc : rbml:: Doc ,
1389- tcx : & ty:: ctxt ,
1390- cdata : Cmd ,
1391- tag : uint )
1392- -> ty:: Generics
1394+ fn doc_generics < ' tcx > ( base_doc : rbml:: Doc ,
1395+ tcx : & ty:: ctxt < ' tcx > ,
1396+ cdata : Cmd ,
1397+ tag : uint )
1398+ -> ty:: Generics < ' tcx >
13931399{
13941400 let doc = reader:: get_doc ( base_doc, tag) ;
13951401
0 commit comments