Skip to content

Commit 1c08714

Browse files
committed
---
yaml --- r: 2009 b: refs/heads/master c: 2a894ca h: refs/heads/master i: 2007: c349562 v: v3
1 parent 9375887 commit 1c08714

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: 25320da099e375be22706b641eba35b7e35299e0
2+
refs/heads/master: 2a894cabc237f32484dd9fb4265790c60eefd661

trunk/src/comp/middle/trans.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -710,7 +710,7 @@ fn type_of_inner(@crate_ctxt cx, @ty.t t, bool boxed) -> TypeRef {
710710
llty = T_fn_pair(cx.tn, type_of_fn(cx, proto, args, out, 0u));
711711
}
712712
case (ty.ty_native_fn(?abi, ?args, ?out)) {
713-
auto nft = type_of_native_fn(cx, abi, args, out, 0u);
713+
auto nft = native_fn_wrapper_type(cx, 0u, t);
714714
llty = T_fn_pair(cx.tn, nft);
715715
}
716716
case (ty.ty_obj(?meths)) {
@@ -6092,9 +6092,8 @@ fn native_fn_ty_param_count(@crate_ctxt cx, &ast.def_id id) -> uint {
60926092
ret count;
60936093
}
60946094

6095-
fn native_fn_wrapper_type(@crate_ctxt cx, uint ty_param_count, &ast.ann ann)
6095+
fn native_fn_wrapper_type(@crate_ctxt cx, uint ty_param_count, @ty.t x)
60966096
-> TypeRef {
6097-
auto x = node_ann_type(cx, ann);
60986097
alt (x.struct) {
60996098
case (ty.ty_native_fn(?abi, ?args, ?out)) {
61006099
ret type_of_fn(cx, ast.proto_fn, args, out, ty_param_count);
@@ -6110,7 +6109,8 @@ fn decl_native_fn_and_pair(@crate_ctxt cx,
61106109
auto num_ty_param = native_fn_ty_param_count(cx, id);
61116110

61126111
// Declare the wrapper.
6113-
auto wrapper_type = native_fn_wrapper_type(cx, num_ty_param, ann);
6112+
auto t = node_ann_type(cx, ann);
6113+
auto wrapper_type = native_fn_wrapper_type(cx, num_ty_param, t);
61146114
let str s = mangle_name_by_seq(cx, "wrapper");
61156115
let ValueRef wrapper_fn = decl_internal_fastcall_fn(cx.llmod, s,
61166116
wrapper_type);

0 commit comments

Comments
 (0)