@@ -14,8 +14,10 @@ export get_symbol;
14
14
export get_tag_variants;
15
15
export get_type;
16
16
export get_type_param_count;
17
+ export get_impl_iface;
17
18
export lookup_def;
18
19
export lookup_item_name;
20
+ export get_impl_iface;
19
21
export resolve_path;
20
22
export get_crate_attributes;
21
23
export list_crate_metadata;
@@ -115,6 +117,18 @@ fn item_type(item: ebml::doc, this_cnum: ast::crate_num, tcx: ty::ctxt,
115
117
t
116
118
}
117
119
120
+ fn item_impl_iface ( item : ebml:: doc , this_cnum : ast:: crate_num , tcx : ty:: ctxt ,
121
+ extres : external_resolver ) -> option:: t < ty:: t > {
122
+ let result = none;
123
+ ebml:: tagged_docs ( item, tag_impl_iface) { |ity|
124
+ let def_parser = bind parse_external_def_id ( this_cnum, extres, _) ;
125
+ let t = parse_ty_data ( ity. data , this_cnum, ity. start ,
126
+ ity. end - ity. start , def_parser, tcx) ;
127
+ result = some ( t) ;
128
+ }
129
+ result
130
+ }
131
+
118
132
fn item_ty_param_bounds ( item : ebml:: doc , this_cnum : ast:: crate_num ,
119
133
tcx : ty:: ctxt , extres : external_resolver )
120
134
-> @[ ty:: param_bounds ] {
@@ -217,6 +231,11 @@ fn get_type_param_count(data: @[u8], id: ast::node_id) -> uint {
217
231
item_ty_param_count ( lookup_item ( id, data) )
218
232
}
219
233
234
+ fn get_impl_iface ( data : @[ u8 ] , def : ast:: def_id , tcx : ty:: ctxt ,
235
+ extres : external_resolver ) -> option:: t < ty:: t > {
236
+ item_impl_iface ( lookup_item ( def. node , data) , def. crate , tcx, extres)
237
+ }
238
+
220
239
fn get_symbol ( data : @[ u8 ] , id : ast:: node_id ) -> str {
221
240
ret item_symbol ( lookup_item ( id, data) ) ;
222
241
}
@@ -269,7 +288,6 @@ fn lookup_impl_methods(data: @[u8], node: ast::node_id, cnum: ast::crate_num)
269
288
rslt
270
289
}
271
290
272
-
273
291
fn family_has_type_params ( fam_ch : u8 ) -> bool {
274
292
ret alt fam_ch as char {
275
293
'c' { false }
0 commit comments