Auto merge of #115372 - RalfJung:abi-assert-eq, r=davidtwco
add rustc_abi(assert_eq) to test some guaranteed or at least highly expected ABI compatibility guarantees This new repr(transparent) test is super useful, it would have found https://github.com/rust-lang/rust/issues/115336 and found https://github.com/rust-lang/rust/issues/115404, https://github.com/rust-lang/rust/issues/115481, https://github.com/rust-lang/rust/issues/115509.
This commit is contained in:
@@ -520,6 +520,8 @@ fn fn_abi_adjust_for_abi<'tcx>(
|
||||
|
||||
_ => return,
|
||||
}
|
||||
// `Aggregate` ABI must be adjusted to ensure that ABI-compatible Rust types are passed
|
||||
// the same way.
|
||||
|
||||
let size = arg.layout.size;
|
||||
if arg.layout.is_unsized() || size > Pointer(AddressSpace::DATA).size(cx) {
|
||||
|
||||
Reference in New Issue
Block a user