Skip to content

Commit 92c039c

Browse files
committed
---
yaml --- r: 27893 b: refs/heads/try c: 10c997a h: refs/heads/master i: 27891: 78d5f4b v: v3
1 parent 20e8bbd commit 92c039c

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
@@ -2,7 +2,7 @@
22
refs/heads/master: cd6f24f9d14ac90d167386a56e7a6ac1f0318195
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: cd6f24f9d14ac90d167386a56e7a6ac1f0318195
5-
refs/heads/try: 1ed94a56744c0ed4056c22da297d84222f4327f2
5+
refs/heads/try: 10c997a746178085b6b447a76e237dd08c5446fa
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: d0c6ce338884ee21843f4b40bf6bf18d222ce5df

branches/try/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)