OperandValue::Ref(next(), Some(next()), self.layout.align.abi).store(bx, dst);
}
PassMode::Direct(_) | PassMode::Indirect(_, None) | PassMode::Cast(_) => {
- self.store(bx, next(), dst);
+ let next_arg = next();
+ self.store(bx, next_arg, dst);
}
}
}
if src_ty.is_region_ptr() {
// The only `Misc` casts on references are those creating raw pointers.
assert!(dest_ty.is_unsafe_ptr());
- (RetagKind::Raw, place)
+ (RetagKind::Raw, place.clone())
} else {
// Some other cast, no retag
continue
_ =>
RetagKind::Default,
};
- (kind, place)
+ (kind, place.clone())
}
// Do nothing for the rest
_ => continue,
let source_info = block_data.statements[i].source_info;
block_data.statements.insert(i+1, Statement {
source_info,
- kind: StatementKind::Retag(retag_kind, place.clone()),
+ kind: StatementKind::Retag(retag_kind, place),
});
}
}
Named(name) => {
match self.names.get(&name) {
- Some(idx) => {
+ Some(&idx) => {
// Treat as positional arg.
- self.verify_arg_type(Exact(*idx), ty)
+ self.verify_arg_type(Exact(idx), ty)
}
None => {
let msg = format!("there is no argument named `{}`", name);