Skip to content

Commit 679bbf3

Browse files
committed
---
yaml --- r: 1991 b: refs/heads/master c: f10a5bb h: refs/heads/master i: 1989: 1708391 1987: 3c58312 1983: a097b4c v: v3
1 parent ba43447 commit 679bbf3

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
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: bd9f45446a747da26382f08f1769ef98b8e43898
2+
refs/heads/master: f10a5bbad0e169d051ffb05ff58a31438cb8b31b

trunk/src/comp/middle/trans.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -705,7 +705,7 @@ fn type_of_inner(@crate_ctxt cx, @ty.t t, bool boxed) -> TypeRef {
705705
llty = T_fn_pair(cx.tn, type_of_fn(cx, proto, args, out, 0u));
706706
}
707707
case (ty.ty_native_fn(?abi, ?args, ?out)) {
708-
auto nft = type_of_native_fn(cx, abi, args, out, 0u);
708+
auto nft = native_fn_wrapper_type(cx, 0u, t);
709709
llty = T_fn_pair(cx.tn, nft);
710710
}
711711
case (ty.ty_obj(?meths)) {
@@ -6101,9 +6101,8 @@ fn native_fn_ty_param_count(@crate_ctxt cx, &ast.def_id id) -> uint {
61016101
ret count;
61026102
}
61036103

6104-
fn native_fn_wrapper_type(@crate_ctxt cx, uint ty_param_count, &ast.ann ann)
6104+
fn native_fn_wrapper_type(@crate_ctxt cx, uint ty_param_count, @ty.t x)
61056105
-> TypeRef {
6106-
auto x = node_ann_type(cx, ann);
61076106
alt (x.struct) {
61086107
case (ty.ty_native_fn(?abi, ?args, ?out)) {
61096108
ret type_of_fn(cx, ast.proto_fn, args, out, ty_param_count);
@@ -6119,7 +6118,8 @@ fn decl_native_fn_and_pair(@crate_ctxt cx,
61196118
auto num_ty_param = native_fn_ty_param_count(cx, id);
61206119

61216120
// Declare the wrapper.
6122-
auto wrapper_type = native_fn_wrapper_type(cx, num_ty_param, ann);
6121+
auto t = node_ann_type(cx, ann);
6122+
auto wrapper_type = native_fn_wrapper_type(cx, num_ty_param, t);
61236123
let str s = mangle_name_by_seq(cx, "wrapper");
61246124
let ValueRef wrapper_fn = decl_internal_fastcall_fn(cx.llmod, s,
61256125
wrapper_type);

0 commit comments

Comments
 (0)