Cast more aggressively to the callee type when calling generic functions. Add a test-case for this, and XFAIL it in rustboot.
This commit is contained in:
parent
127139aecd
commit
0a65283c5e
3 changed files with 13 additions and 3 deletions
|
|
@ -3132,9 +3132,9 @@ fn trans_args(@block_ctxt cx,
|
|||
bcx = re.bcx;
|
||||
}
|
||||
|
||||
if (ty.type_has_dynamic_size(args.(i).ty)) {
|
||||
val = bcx.build.PointerCast(val,
|
||||
T_typaram_ptr(cx.fcx.ccx.tn));
|
||||
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);
|
||||
}
|
||||
|
||||
llargs += val;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue