We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1228c55 commit 4812672Copy full SHA for 4812672
src/rustc/middle/trans/base.rs
@@ -5456,17 +5456,12 @@ fn crate_ctxt_to_encode_parms(cx: @crate_ctxt)
5456
5457
fn impl_map(cx: @crate_ctxt,
5458
id: ast::node_id) -> [(ast::ident, ast::def_id)]/~ {
5459
- alt *cx.maps.impl_map.get(id) {
5460
- list::cons(impls, @list::nil) {
5461
- (*impls).map {|i|
5462
- (i.ident, i.did)
5463
- }
5464
5465
- _ {
5466
- cx.sess.bug(#fmt("encode_info_for_mod: empty impl_map \
5467
- entry for %?", id));
5468
+ let mut result = []/~;
+ for list::each(cx.maps.impl_map.get(id)) {
+ |impls|
+ result += (*impls).map({|i| (i.ident, i.did) });
5469
}
+ ret result;
5470
5471
5472
0 commit comments