Skip to content

Commit 772f888

Browse files
committed
Remove an outdated comment
1 parent 5f4a8a6 commit 772f888

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

compiler/rustc_const_eval/src/interpret/terminator.rs

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -174,14 +174,14 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
174174
// FIXME(explicit_tail_calls): a lot of code here is duplicated with normal calls, can we refactor this?
175175
let old_frame_idx = self.frame_idx();
176176
let func = self.eval_operand(func, None)?;
177-
let args = self.eval_operands(args)?;
177+
let args = self.eval_fn_call_arguments(args)?;
178178

179179
let fn_sig_binder = func.layout.ty.fn_sig(*self.tcx);
180180
let fn_sig =
181181
self.tcx.normalize_erasing_late_bound_regions(self.param_env, fn_sig_binder);
182182
let extra_args = &args[fn_sig.inputs().len()..];
183183
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));
185185

186186
let (fn_val, fn_abi, with_caller_location) = match *func.layout.ty.kind() {
187187
ty::FnPtr(_sig) => {
@@ -213,11 +213,16 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
213213
// the goto to the return block, but we don't want to,
214214
// only the tail called function should return to the current
215215
// 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+
};
218222

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+
};
221226

222227
self.eval_fn_call(
223228
fn_val,

0 commit comments

Comments
 (0)