mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-28 01:34:21 +00:00
Fix resource encoding bugs.
This commit is contained in:
parent
750dcc05e4
commit
5b2c17fba5
@ -280,10 +280,11 @@ fn encode_info_for_item(@crate_ctxt cx, &ebml::writer ebml_w,
|
||||
tps);
|
||||
}
|
||||
case (item_res(_, _, ?tps, ?ctor_id)) {
|
||||
auto fn_ty = node_id_type(cx, item.id);
|
||||
|
||||
auto fn_ty = node_id_type(cx, ctor_id);
|
||||
|
||||
ebml::start_tag(ebml_w, tag_items_data_item);
|
||||
encode_def_id(ebml_w, local_def(item.id));
|
||||
encode_def_id(ebml_w, local_def(ctor_id));
|
||||
encode_kind(ebml_w, 'y' as u8);
|
||||
encode_type_param_count(ebml_w, tps);
|
||||
encode_type(cx, ebml_w, ty::ty_fn_ret(cx.tcx, fn_ty));
|
||||
|
@ -742,6 +742,7 @@ mod collect {
|
||||
t_res, ast::return, []);
|
||||
auto t_dtor = ty::mk_fn(cx.tcx, ast::proto_fn, [t_arg],
|
||||
ty::mk_nil(cx.tcx), ast::return, []);
|
||||
write::ty_only(cx.tcx, it.id, t_res);
|
||||
write::ty_only(cx.tcx, ctor_id, t_ctor);
|
||||
cx.tcx.tcache.insert(local_def(ctor_id),
|
||||
tup(vec::len(tps), t_ctor));
|
||||
|
Loading…
Reference in New Issue
Block a user