@@ -82,8 +82,9 @@ fn variant_tag_id(&ebml::doc d) -> ast::def_id {
82
82
ret parse_def_id( ebml:: doc_data( tagdoc) ) ;
83
83
}
84
84
85
- fn item_type( & ebml:: doc item, int this_cnum, ty:: ctxt tcx) -> ty:: t {
86
- fn parse_external_def_id( int this_cnum, str s) -> ast:: def_id {
85
+ fn item_type( & ebml:: doc item, ast:: crate_num this_cnum,
86
+ ty:: ctxt tcx) -> ty:: t {
87
+ fn parse_external_def_id( ast:: crate_num this_cnum, str s) -> ast:: def_id {
87
88
// FIXME: This is completely wrong when linking against a crate
88
89
// that, in turn, links against another crate. We need a mapping
89
90
// from crate ID to crate "meta" attributes as part of the crate
@@ -107,7 +108,8 @@ fn item_ty_param_count(&ebml::doc item) -> uint {
107
108
ret ty_param_count;
108
109
}
109
110
110
- fn tag_variant_ids( & ebml:: doc item, int this_cnum) -> vec[ ast:: def_id] {
111
+ fn tag_variant_ids( & ebml:: doc item,
112
+ ast:: crate_num this_cnum) -> vec[ ast:: def_id] {
111
113
let vec[ ast:: def_id] ids = [ ] ;
112
114
auto v = tag_items_data_item_variant;
113
115
for each ( ebml:: doc p in ebml:: tagged_docs( item, v) ) {
@@ -136,15 +138,16 @@ fn resolve_path(vec[ast::ident] path, vec[u8] data) -> vec[ast::def_id] {
136
138
}
137
139
138
140
// Crate metadata queries
139
- fn lookup_defs( session:: session sess, int cnum , vec [ ast:: ident ] path ) ->
140
- vec[ ast:: def] {
141
+ fn lookup_defs( session:: session sess, ast:: crate_num cnum ,
142
+ vec [ ast :: ident ] path ) -> vec[ ast:: def] {
141
143
auto data = cstore:: get_crate_data( sess. get_cstore( ) , cnum) . data;
142
144
ret vec:: map( bind lookup_def( cnum, data, _) , resolve_path( path, data) ) ;
143
145
}
144
146
145
147
146
148
// FIXME doesn't yet handle re-exported externals
147
- fn lookup_def( int cnum, vec[ u8] data, & ast:: def_id did_) -> ast:: def {
149
+ fn lookup_def( ast:: crate_num cnum, vec[ u8] data,
150
+ & ast:: def_id did_) -> ast:: def {
148
151
auto item = lookup_item( did_. _1, data) ;
149
152
auto kind_ch = item_kind( item) ;
150
153
auto did = tup( cnum, did_. _1) ;
0 commit comments