Skip to content

Commit 3a2cc00

Browse files
committed
---
yaml --- r: 3460 b: refs/heads/master c: 5b2c17f h: refs/heads/master v: v3
1 parent 3453e4a commit 3a2cc00

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: 750dcc05e441e9e958012155902ce841e1ef1ed2
2+
refs/heads/master: 5b2c17fba51b868c1a9b6de0bd0f3941eb87249c

trunk/src/comp/metadata/encoder.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -280,10 +280,11 @@ fn encode_info_for_item(@crate_ctxt cx, &ebml::writer ebml_w,
280280
tps);
281281
}
282282
case (item_res(_, _, ?tps, ?ctor_id)) {
283-
auto fn_ty = node_id_type(cx, item.id);
283+
284+
auto fn_ty = node_id_type(cx, ctor_id);
284285

285286
ebml::start_tag(ebml_w, tag_items_data_item);
286-
encode_def_id(ebml_w, local_def(item.id));
287+
encode_def_id(ebml_w, local_def(ctor_id));
287288
encode_kind(ebml_w, 'y' as u8);
288289
encode_type_param_count(ebml_w, tps);
289290
encode_type(cx, ebml_w, ty::ty_fn_ret(cx.tcx, fn_ty));

trunk/src/comp/middle/typeck.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -742,6 +742,7 @@ mod collect {
742742
t_res, ast::return, []);
743743
auto t_dtor = ty::mk_fn(cx.tcx, ast::proto_fn, [t_arg],
744744
ty::mk_nil(cx.tcx), ast::return, []);
745+
write::ty_only(cx.tcx, it.id, t_res);
745746
write::ty_only(cx.tcx, ctor_id, t_ctor);
746747
cx.tcx.tcache.insert(local_def(ctor_id),
747748
tup(vec::len(tps), t_ctor));

0 commit comments

Comments
 (0)