diff options
| author | hyd-dev <yd-huang@outlook.com> | 2021-05-17 20:54:31 +0800 |
|---|---|---|
| committer | hyd-dev <yd-huang@outlook.com> | 2021-05-17 20:54:31 +0800 |
| commit | 97bc0eefe7566955eedff5fb587807224b2387c3 (patch) | |
| tree | 2b9f41376636d248631ccd6857367308e84d3dc3 | |
| parent | c6ae57cb8343d19d05e364ac9391b0a04327faa7 (diff) | |
| download | rust-97bc0eefe7566955eedff5fb587807224b2387c3.tar.gz rust-97bc0eefe7566955eedff5fb587807224b2387c3.zip | |
Add a comment for `check_abi()`
| -rw-r--r-- | compiler/rustc_mir/src/interpret/terminator.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/compiler/rustc_mir/src/interpret/terminator.rs b/compiler/rustc_mir/src/interpret/terminator.rs index d287bc858ed..a7fcb41f74a 100644 --- a/compiler/rustc_mir/src/interpret/terminator.rs +++ b/compiler/rustc_mir/src/interpret/terminator.rs @@ -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( |
