rust/compiler/rustc_ty_utils/src
bors d19980e1ce Auto merge of #117500 - RalfJung:aggregate-abi, r=davidtwco
Ensure sanity of all computed ABIs

This moves the ABI sanity assertions from the codegen backend to the ABI computation logic. Sadly, due to past mistakes, we [have to](https://github.com/rust-lang/rust/pull/117351#issuecomment-1788495503) be able to compute a sane ABI for nonsensical function types like `extern "C" fn(str) -> str`.  So to make the sanity check pass we first need to make all ABI adjustment deal with unsized types... and we have no shared infrastructure for those adjustments, so that's a bunch of copy-paste. At least we have assertions failing loudly when one accidentally sets a different mode for an unsized argument.

To achieve this, this re-lands the parts of https://github.com/rust-lang/rust/pull/80594 that got reverted in https://github.com/rust-lang/rust/pull/81388.  To avoid breaking wasm ABI again, that ABI now explicitly opts-in to the (wrong, broken) ABI that we currently keep for backwards compatibility. That's still better than having *every* ABI use the wrong broken default!

Cc `@bjorn3`
Fixes https://github.com/rust-lang/rust/issues/115845
2023-11-19 18:42:20 +00:00
..
abi.rs Auto merge of #117500 - RalfJung:aggregate-abi, r=davidtwco 2023-11-19 18:42:20 +00:00
assoc.rs compiler: use copied instead of manual map 2023-11-03 17:18:56 +01:00
common_traits.rs Move expansion of query macros in rustc_middle to rustc_middle::query 2023-05-15 08:49:13 +02:00
consts.rs Optimize some alloc_from_iter call sites. 2023-10-03 18:12:37 +11:00
errors.rs Re-use error code for duplicate error 2023-06-22 15:51:14 +00:00
implied_bounds.rs finish RegionKind rename 2023-11-14 13:13:27 +00:00
instance.rs Some more coroutine renamings 2023-10-30 23:46:27 +00:00
layout_sanity_check.rs fix failure to detect a too-big-type after adding padding 2023-10-27 18:07:53 +02:00
layout.rs Compute layout with spans for better cycle errors in coroutines 2023-11-13 02:22:25 +00:00
lib.rs Bump cfg(bootstrap)s 2023-11-15 19:41:28 -05:00
needs_drop.rs review + add tests 2023-11-02 18:16:37 +01:00
opaque_types.rs finish RegionKind rename 2023-11-14 13:13:27 +00:00
representability.rs refactor(rustc_middle): Substs -> GenericArg 2023-07-14 13:27:35 +01:00
sig_types.rs Some manual rustfmt as rustfmt is broken on this file 2023-10-30 13:48:34 +00:00
structural_match.rs Move expansion of query macros in rustc_middle to rustc_middle::query 2023-05-15 08:49:13 +02:00
ty.rs Re-format code with new rustfmt 2023-11-15 21:45:48 -05:00