@@ -174,14 +174,14 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
174
174
// FIXME(explicit_tail_calls): a lot of code here is duplicated with normal calls, can we refactor this?
175
175
let old_frame_idx = self . frame_idx ( ) ;
176
176
let func = self . eval_operand ( func, None ) ?;
177
- let args = self . eval_operands ( args) ?;
177
+ let args = self . eval_fn_call_arguments ( args) ?;
178
178
179
179
let fn_sig_binder = func. layout . ty . fn_sig ( * self . tcx ) ;
180
180
let fn_sig =
181
181
self . tcx . normalize_erasing_late_bound_regions ( self . param_env , fn_sig_binder) ;
182
182
let extra_args = & args[ fn_sig. inputs ( ) . len ( ) ..] ;
183
183
let extra_args =
184
- self . tcx . mk_type_list_from_iter ( extra_args. iter ( ) . map ( |arg| arg. layout . ty ) ) ;
184
+ self . tcx . mk_type_list_from_iter ( extra_args. iter ( ) . map ( |arg| arg. layout ( ) . ty ) ) ;
185
185
186
186
let ( fn_val, fn_abi, with_caller_location) = match * func. layout . ty . kind ( ) {
187
187
ty:: FnPtr ( _sig) => {
@@ -213,11 +213,16 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
213
213
// the goto to the return block, but we don't want to,
214
214
// only the tail called function should return to the current
215
215
// return block.
216
- let Some ( prev_frame) = self . stack_mut ( ) . pop ( )
217
- else { span_bug ! ( terminator. source_info. span, "empty stack while evaluating this tail call" ) } ;
216
+ let Some ( prev_frame) = self . stack_mut ( ) . pop ( ) else {
217
+ span_bug ! (
218
+ terminator. source_info. span,
219
+ "empty stack while evaluating this tail call"
220
+ )
221
+ } ;
218
222
219
- let StackPopCleanup :: Goto { ret, unwind } = prev_frame. return_to_block
220
- else { span_bug ! ( terminator. source_info. span, "tail call with the root stack frame" ) } ;
223
+ let StackPopCleanup :: Goto { ret, unwind } = prev_frame. return_to_block else {
224
+ span_bug ! ( terminator. source_info. span, "tail call with the root stack frame" )
225
+ } ;
221
226
222
227
self . eval_fn_call (
223
228
fn_val,
0 commit comments