Skip to content

Commit 2921db9

Browse files
committed
---
yaml --- r: 276464 b: refs/heads/master c: d460597 h: refs/heads/master
1 parent 299b252 commit 2921db9

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 9709dff7e3b9aecd392465529790edd906d95037
2+
refs/heads/master: d460597e3373c7ec2a54f64faf6a1f8874b958bd
33
refs/heads/snap-stage3: 235d77457d80b549dad3ac36d94f235208a1eafb
44
refs/heads/try: 49312a405e14a449b98fe0056b12a40ac128be4a
55
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105

trunk/src/librustc_trans/mir/block.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,8 @@ impl<'bcx, 'tcx> MirContext<'bcx, 'tcx> {
213213

214214
let extra_args = &args[sig.inputs.len()..];
215215
let extra_args = extra_args.iter().map(|op_arg| {
216-
self.mir.operand_ty(bcx.tcx(), op_arg)
216+
let op_ty = self.mir.operand_ty(bcx.tcx(), op_arg);
217+
bcx.monomorphize(&op_ty)
217218
}).collect::<Vec<_>>();
218219
let fn_ty = callee.direct_fn_type(bcx.ccx(), &extra_args);
219220

trunk/src/test/run-pass/mir_trans_calls_variadic.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,17 @@ extern {
1616
}
1717

1818
#[rustc_mir]
19-
fn test(a: i64, b: i64, c: i64, d: i64, e: i64, f: i64) -> i64 {
19+
fn test<T, U>(a: i64, b: i64, c: i64, d: i64, e: i64, f: T, g: U) -> i64 {
2020
unsafe {
2121
rust_interesting_average(6, a, a as f64,
2222
b, b as f64,
2323
c, c as f64,
2424
d, d as f64,
2525
e, e as f64,
26-
f, f as f64) as i64
26+
f, g) as i64
2727
}
2828
}
2929

3030
fn main(){
31-
assert_eq!(test(10, 20, 30, 40, 50, 60), 70);
31+
assert_eq!(test(10, 20, 30, 40, 50, 60_i64, 60.0_f64), 70);
3232
}

0 commit comments

Comments
 (0)