Revert "Cast more aggressively to the callee type when calling generic functions. Add a test-case for this, and XFAIL it in rustboot." due to test failures

This reverts commit 0a65283c5e.
This commit is contained in:
Patrick Walton 2011-02-24 13:51:18 -08:00
parent 0a65283c5e
commit 5332250d3b
3 changed files with 3 additions and 13 deletions

View file

@ -416,7 +416,6 @@ TEST_XFAILS_BOOT := $(TASK_XFAILS) \
test/run-pass/obj-as.rs \
test/run-pass/vec-slice.rs \
test/run-pass/fn-lval.rs \
test/run-pass/generic-fn-box.rs \
test/run-pass/generic-recursive-tag.rs \
test/run-pass/generic-tup.rs \
test/run-pass/iter-ret.rs \

View file

@ -3132,9 +3132,9 @@ fn trans_args(@block_ctxt cx,
bcx = re.bcx;
}
if (ty.count_ty_params(args.(i).ty) > 0u) {
auto lldestty = type_of(cx.fcx.ccx, args.(i).ty);
val = bcx.build.PointerCast(val, lldestty);
if (ty.type_has_dynamic_size(args.(i).ty)) {
val = bcx.build.PointerCast(val,
T_typaram_ptr(cx.fcx.ccx.tn));
}
llargs += val;

View file

@ -1,9 +0,0 @@
fn f[T](@T x) -> @T {
ret x;
}
fn main() {
auto x = f(@3);
log *x;
}