@@ -279,13 +279,6 @@ fn item_region_param_defs(item_doc: ebml::Doc, cdata: Cmd)
279
279
Rc :: new ( v)
280
280
}
281
281
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
-
289
282
fn enum_variant_ids ( item : ebml:: Doc , cdata : Cmd ) -> Vec < ast:: DefId > {
290
283
let mut ids: Vec < ast:: DefId > = Vec :: new ( ) ;
291
284
let v = tag_items_data_item_variant;
@@ -420,10 +413,6 @@ pub fn get_type(cdata: Cmd, id: ast::NodeId, tcx: &ty::ctxt)
420
413
}
421
414
}
422
415
423
- pub fn get_type_param_count ( data : & [ u8 ] , id : ast:: NodeId ) -> uint {
424
- item_ty_param_count ( lookup_item ( id, data) )
425
- }
426
-
427
416
pub fn get_impl_trait ( cdata : Cmd ,
428
417
id : ast:: NodeId ,
429
418
tcx : & ty:: ctxt ) -> Option < @ty:: TraitRef >
@@ -449,20 +438,6 @@ pub fn get_impl_vtables(cdata: Cmd,
449
438
}
450
439
451
440
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
-
466
441
pub fn get_symbol ( data : & [ u8 ] , id : ast:: NodeId ) -> ~str {
467
442
return item_symbol ( lookup_item ( id, data) ) ;
468
443
}
@@ -475,14 +450,6 @@ pub enum DefLike {
475
450
DlField
476
451
}
477
452
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
-
486
453
/// Iterates over the language items in the given crate.
487
454
pub fn each_lang_item ( cdata : Cmd , f : |ast:: NodeId , uint| -> bool) -> bool {
488
455
let root = reader:: Doc ( cdata. data ( ) ) ;
@@ -1030,11 +997,6 @@ pub fn get_struct_fields(intr: Rc<IdentInterner>, cdata: Cmd, id: ast::NodeId)
1030
997
result
1031
998
}
1032
999
1033
- pub fn get_item_visibility ( cdata : Cmd , id : ast:: NodeId )
1034
- -> ast:: Visibility {
1035
- item_visibility ( lookup_item ( id, cdata. data ( ) ) )
1036
- }
1037
-
1038
1000
fn get_meta_items ( md : ebml:: Doc ) -> Vec < @ast:: MetaItem > {
1039
1001
let mut items: Vec < @ast:: MetaItem > = Vec :: new ( ) ;
1040
1002
reader:: tagged_docs ( md, tag_meta_item_word, |meta_item_doc| {
@@ -1103,7 +1065,7 @@ fn list_crate_attributes(md: ebml::Doc, hash: &Svh,
1103
1065
}
1104
1066
1105
1067
pub fn get_crate_attributes ( data : & [ u8 ] ) -> Vec < ast:: Attribute > {
1106
- return get_attributes ( reader:: Doc ( data) ) ;
1068
+ get_attributes ( reader:: Doc ( data) )
1107
1069
}
1108
1070
1109
1071
#[ deriving( Clone ) ]
0 commit comments