Add a comment for check_abi()

This commit is contained in:
hyd-dev 2021-05-17 20:54:31 +08:00
parent c6ae57cb83
commit 97bc0eefe7
No known key found for this signature in database
GPG key ID: 74FA7FD5B8DA14B8

View file

@ -276,6 +276,9 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
None => return Ok(()),
};
// Check against the ABI of the MIR body we are calling (not the ABI of `instance`;
// these can differ when `find_mir_or_eval_fn` does something clever like resolve
// exported symbol names).
check_abi(self, self.tcx.type_of(body.source.def_id()))?;
self.push_stack_frame(