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:
commit
cd71a37f32
17 changed files with 1305 additions and 175 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue