@@ -279,13 +279,6 @@ fn item_region_param_defs(item_doc: ebml::Doc, cdata: Cmd)
279279 Rc :: new ( v)
280280}
281281
282- fn item_ty_param_count ( item : ebml:: Doc ) -> uint {
283- let mut n = 0 u;
284- reader:: tagged_docs ( item, tag_items_data_item_ty_param_bounds,
285- |_p| { n += 1 u; true } ) ;
286- n
287- }
288-
289282fn enum_variant_ids ( item : ebml:: Doc , cdata : Cmd ) -> Vec < ast:: DefId > {
290283 let mut ids: Vec < ast:: DefId > = Vec :: new ( ) ;
291284 let v = tag_items_data_item_variant;
@@ -420,10 +413,6 @@ pub fn get_type(cdata: Cmd, id: ast::NodeId, tcx: &ty::ctxt)
420413 }
421414}
422415
423- pub fn get_type_param_count ( data : & [ u8 ] , id : ast:: NodeId ) -> uint {
424- item_ty_param_count ( lookup_item ( id, data) )
425- }
426-
427416pub fn get_impl_trait ( cdata : Cmd ,
428417 id : ast:: NodeId ,
429418 tcx : & ty:: ctxt ) -> Option < @ty:: TraitRef >
@@ -449,20 +438,6 @@ pub fn get_impl_vtables(cdata: Cmd,
449438}
450439
451440
452- pub fn get_impl_method ( intr : Rc < IdentInterner > , cdata : Cmd , id : ast:: NodeId ,
453- name : ast:: Ident ) -> Option < ast:: DefId > {
454- let items = reader:: get_doc ( reader:: Doc ( cdata. data ( ) ) , tag_items) ;
455- let mut found = None ;
456- reader:: tagged_docs ( find_item ( id, items) , tag_item_impl_method, |mid| {
457- let m_did = reader:: with_doc_data ( mid, parse_def_id) ;
458- if item_name ( & * intr, find_item ( m_did. node , items) ) == name {
459- found = Some ( translate_def_id ( cdata, m_did) ) ;
460- }
461- true
462- } ) ;
463- found
464- }
465-
466441pub fn get_symbol ( data : & [ u8 ] , id : ast:: NodeId ) -> ~str {
467442 return item_symbol ( lookup_item ( id, data) ) ;
468443}
@@ -475,14 +450,6 @@ pub enum DefLike {
475450 DlField
476451}
477452
478- pub fn def_like_to_def ( def_like : DefLike ) -> ast:: Def {
479- match def_like {
480- DlDef ( def) => return def,
481- DlImpl ( ..) => fail ! ( "found impl in def_like_to_def" ) ,
482- DlField => fail ! ( "found field in def_like_to_def" )
483- }
484- }
485-
486453/// Iterates over the language items in the given crate.
487454pub fn each_lang_item ( cdata : Cmd , f : |ast:: NodeId , uint| -> bool) -> bool {
488455 let root = reader:: Doc ( cdata. data ( ) ) ;
@@ -1030,11 +997,6 @@ pub fn get_struct_fields(intr: Rc<IdentInterner>, cdata: Cmd, id: ast::NodeId)
1030997 result
1031998}
1032999
1033- pub fn get_item_visibility ( cdata : Cmd , id : ast:: NodeId )
1034- -> ast:: Visibility {
1035- item_visibility ( lookup_item ( id, cdata. data ( ) ) )
1036- }
1037-
10381000fn get_meta_items ( md : ebml:: Doc ) -> Vec < @ast:: MetaItem > {
10391001 let mut items: Vec < @ast:: MetaItem > = Vec :: new ( ) ;
10401002 reader:: tagged_docs ( md, tag_meta_item_word, |meta_item_doc| {
@@ -1103,7 +1065,7 @@ fn list_crate_attributes(md: ebml::Doc, hash: &Svh,
11031065}
11041066
11051067pub fn get_crate_attributes ( data : & [ u8 ] ) -> Vec < ast:: Attribute > {
1106- return get_attributes ( reader:: Doc ( data) ) ;
1068+ get_attributes ( reader:: Doc ( data) )
11071069}
11081070
11091071#[ deriving( Clone ) ]
0 commit comments