1
Fork 0

fix rustc_nonnull_optimization_guaranteed docs

This commit is contained in:
Ralf Jung 2024-09-22 08:11:17 +02:00
parent c0838c8ebe
commit 8103505a4d
4 changed files with 8 additions and 4 deletions

View file

@ -234,6 +234,7 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
// so we implement a type-based check that reflects the guaranteed rules for ABI compatibility.
if self.layout_compat(caller_abi.layout, callee_abi.layout)? {
// Ensure that our checks imply actual ABI compatibility for this concrete call.
// (This can fail e.g. if `#[rustc_nonnull_optimization_guaranteed]` is used incorrectly.)
assert!(caller_abi.eq_abi(callee_abi));
Ok(true)
} else {