Skip to content

Commit 97bc0ee

Browse files
author
hyd-dev
committed
Add a comment for check_abi()
1 parent c6ae57c commit 97bc0ee

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

compiler/rustc_mir/src/interpret/terminator.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,9 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
276276
None => return Ok(()),
277277
};
278278

279+
// Check against the ABI of the MIR body we are calling (not the ABI of `instance`;
280+
// these can differ when `find_mir_or_eval_fn` does something clever like resolve
281+
// exported symbol names).
279282
check_abi(self, self.tcx.type_of(body.source.def_id()))?;
280283

281284
self.push_stack_frame(

0 commit comments

Comments
 (0)