提交 47cd05c8 编写于 作者: E Eduard Burtescu

mir: Don't shadow the "args" variable in Call translation.

上级 9c6bfe44
......@@ -196,7 +196,7 @@ pub fn trans_block(&mut self, bb: mir::BasicBlock) {
};
// Split the rust-call tupled arguments off.
let (args, untuple) = if abi == Abi::RustCall && !args.is_empty() {
let (first_args, untuple) = if abi == Abi::RustCall && !args.is_empty() {
let (tup, args) = args.split_last().unwrap();
(args, Some(tup))
} else {
......@@ -204,7 +204,7 @@ pub fn trans_block(&mut self, bb: mir::BasicBlock) {
};
let mut idx = 0;
for arg in args {
for arg in first_args {
let val = self.trans_operand(&bcx, arg).val;
self.trans_argument(&bcx, val, &mut llargs, &fn_ty,
&mut idx, &mut callee.data);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册