Skip to content

Commit 9bc254f

Browse files
committed
---
yaml --- r: 1427 b: refs/heads/master c: 0a65283 h: refs/heads/master i: 1425: 8663713 1423: f793309 v: v3
1 parent d6633d4 commit 9bc254f

File tree

4 files changed

+14
-4
lines changed

4 files changed

+14
-4
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: 127139aecd5c3a1227ee58c77fc083506125f7cd
2+
refs/heads/master: 0a65283c5eeae0b98fff7d213dbaad59889e677e

trunk/src/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -416,6 +416,7 @@ TEST_XFAILS_BOOT := $(TASK_XFAILS) \
416416
test/run-pass/obj-as.rs \
417417
test/run-pass/vec-slice.rs \
418418
test/run-pass/fn-lval.rs \
419+
test/run-pass/generic-fn-box.rs \
419420
test/run-pass/generic-recursive-tag.rs \
420421
test/run-pass/generic-tup.rs \
421422
test/run-pass/iter-ret.rs \

trunk/src/comp/middle/trans.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3132,9 +3132,9 @@ fn trans_args(@block_ctxt cx,
31323132
bcx = re.bcx;
31333133
}
31343134

3135-
if (ty.type_has_dynamic_size(args.(i).ty)) {
3136-
val = bcx.build.PointerCast(val,
3137-
T_typaram_ptr(cx.fcx.ccx.tn));
3135+
if (ty.count_ty_params(args.(i).ty) > 0u) {
3136+
auto lldestty = type_of(cx.fcx.ccx, args.(i).ty);
3137+
val = bcx.build.PointerCast(val, lldestty);
31383138
}
31393139

31403140
llargs += val;
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
fn f[T](@T x) -> @T {
2+
ret x;
3+
}
4+
5+
fn main() {
6+
auto x = f(@3);
7+
log *x;
8+
}
9+

0 commit comments

Comments
 (0)