Skip to content

Commit 5266787

Browse files
committed
---
yaml --- r: 29915 b: refs/heads/incoming c: 10c997a h: refs/heads/master i: 29913: 44e5f26 29911: 084b7b6 v: v3
1 parent 1deddc3 commit 5266787

File tree

2 files changed

+21
-27
lines changed

2 files changed

+21
-27
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ refs/heads/try: d324a424d8f84b1eb049b12cf34182bda91b0024
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: d0c6ce338884ee21843f4b40bf6bf18d222ce5df
9-
refs/heads/incoming: 1ed94a56744c0ed4056c22da297d84222f4327f2
9+
refs/heads/incoming: 10c997a746178085b6b447a76e237dd08c5446fa
1010
refs/heads/dist-snap: 2f32a1581f522e524009138b33b1c7049ced668d
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1212
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/incoming/src/rustc/metadata/encoder.rs

Lines changed: 20 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -262,32 +262,26 @@ fn encode_info_for_mod(ecx: @encode_ctxt, ebml_w: ebml::writer, md: _mod,
262262
encode_family(ebml_w, 'm');
263263
encode_name(ebml_w, name);
264264
debug!{"(encoding info for module) encoding info for module ID %d", id};
265-
// the impl map contains ref_ids
266-
let impls = ecx.impl_map(id);
267-
for impls.each |i| {
268-
let (ident, did) = i;
269-
debug!{"(encoding info for module) ... encoding impl %s (%?/%?), \
270-
exported? %?",
271-
*ident,
272-
did,
273-
ast_map::node_id_to_str(ecx.tcx.items, did.node),
274-
ast_util::is_exported(ident, md)};
275-
276-
ebml_w.start_tag(tag_mod_impl);
277-
match ecx.tcx.items.find(did.node) {
278-
some(ast_map::node_item(it@@{node: cl@item_class(*),_},_)) => {
279-
/* If did stands for a trait
280-
ref, we need to map it to its parent class */
281-
ebml_w.wr_str(def_to_str(local_def(it.id)));
282-
}
283-
_ => {
284-
// Must be a re-export, then!
285-
// ...or a trait ref
286-
ebml_w.wr_str(def_to_str(did));
287-
}
288-
};
289-
ebml_w.end_tag();
290-
} // for
265+
266+
// Encode info about all the module children.
267+
for md.items.each |item| {
268+
match item.node {
269+
item_impl(*) | item_class(*) => {
270+
let (ident, did) = (item.ident, item.id);
271+
debug!{"(encoding info for module) ... encoding impl %s \
272+
(%?/%?), exported? %?",
273+
*ident,
274+
did,
275+
ast_map::node_id_to_str(ecx.tcx.items, did),
276+
ast_util::is_exported(ident, md)};
277+
278+
ebml_w.start_tag(tag_mod_impl);
279+
ebml_w.wr_str(def_to_str(local_def(did)));
280+
ebml_w.end_tag();
281+
}
282+
_ => {} // XXX: Encode these too.
283+
}
284+
}
291285

292286
encode_path(ebml_w, path, ast_map::path_mod(name));
293287

0 commit comments

Comments
 (0)