rustc: Make trans no longer insist that there be exactly one impl scope per module

Conflicts:

	src/rustc/middle/trans/base.rs
This commit is contained in:
Patrick Walton
2012-06-26 13:30:47 -07:00
parent 1228c55ef0
commit 481267299d

View File

@@ -5456,17 +5456,12 @@ fn crate_ctxt_to_encode_parms(cx: @crate_ctxt)
fn impl_map(cx: @crate_ctxt, fn impl_map(cx: @crate_ctxt,
id: ast::node_id) -> [(ast::ident, ast::def_id)]/~ { id: ast::node_id) -> [(ast::ident, ast::def_id)]/~ {
alt *cx.maps.impl_map.get(id) { let mut result = []/~;
list::cons(impls, @list::nil) { for list::each(cx.maps.impl_map.get(id)) {
(*impls).map {|i| |impls|
(i.ident, i.did) result += (*impls).map({|i| (i.ident, i.did) });
}
}
_ {
cx.sess.bug(#fmt("encode_info_for_mod: empty impl_map \
entry for %?", id));
}
} }
ret result;
} }
} }