diff options
| author | Ralf Jung <post@ralfj.de> | 2023-09-07 16:48:02 +0200 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2023-09-08 09:14:07 +0200 |
| commit | b0cf4c28ea0f2ac0a7c6fb5bc3ee4291b7595c24 (patch) | |
| tree | fe150f7773945f3ccc4304fb79532802abc71a5b /compiler/rustc_const_eval/src | |
| parent | 28d152935e5f62ecbb6d2c99865de39c1993189b (diff) | |
| download | rust-b0cf4c28ea0f2ac0a7c6fb5bc3ee4291b7595c24.tar.gz rust-b0cf4c28ea0f2ac0a7c6fb5bc3ee4291b7595c24.zip | |
turns out Layout has some more things to worry about -- move ABI comparison into helper function
like is_bool, and some special magic extra fields
Diffstat (limited to 'compiler/rustc_const_eval/src')
| -rw-r--r-- | compiler/rustc_const_eval/src/interpret/terminator.rs | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/compiler/rustc_const_eval/src/interpret/terminator.rs b/compiler/rustc_const_eval/src/interpret/terminator.rs index 6312dc7414d..eb4673c0edc 100644 --- a/compiler/rustc_const_eval/src/interpret/terminator.rs +++ b/compiler/rustc_const_eval/src/interpret/terminator.rs @@ -332,12 +332,8 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> { if self.layout_compat(caller_abi.layout, callee_abi.layout) && caller_abi.mode.eq_abi(&callee_abi.mode) { - // Something went very wrong if our checks don't even imply that the layout is the same. - assert!( - caller_abi.layout.size == callee_abi.layout.size - && caller_abi.layout.align.abi == callee_abi.layout.align.abi - && caller_abi.layout.is_sized() == callee_abi.layout.is_sized() - ); + // Something went very wrong if our checks don't imply layout ABI compatibility. + assert!(caller_abi.layout.eq_abi(&callee_abi.layout)); return true; } else { trace!( |
