mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 16:24:46 +00:00
d19980e1ce
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 |
||
---|---|---|
.. | ||
cross-crate | ||
extern | ||
foreign | ||
issues | ||
mir | ||
numbers-arithmetic | ||
statics | ||
struct-enums | ||
union | ||
abi-sysv64-arg-passing.rs | ||
abi-sysv64-register-usage.rs | ||
abi-typo-unstable.rs | ||
abi-typo-unstable.stderr | ||
anon-extern-mod.rs | ||
c-stack-as-value.rs | ||
c-stack-returning-int64.rs | ||
cabi-int-widening.rs | ||
compatibility.rs | ||
debug.rs | ||
debug.stderr | ||
explicit_repr_rust.rs | ||
homogenous-floats-target-feature-mixup.rs | ||
issue-28676.rs | ||
lib-defaults.rs | ||
nullable-pointer-ffi-compat.rs | ||
relocation_model_pic.rs | ||
riscv-discoverability-guidance.riscv32.stderr | ||
riscv-discoverability-guidance.riscv64.stderr | ||
riscv-discoverability-guidance.rs | ||
rustcall-generic.rs | ||
segfault-no-out-of-stack.rs | ||
stack-probes-lto.rs | ||
stack-probes.rs | ||
stack-protector.rs | ||
unsized-args-in-c-abi-issues-94223-115845.rs | ||
unsupported.aarch64.stderr | ||
unsupported.arm.stderr | ||
unsupported.i686.stderr | ||
unsupported.riscv32.stderr | ||
unsupported.riscv64.stderr | ||
unsupported.rs | ||
unsupported.x64.stderr | ||
variadic-ffi.rs | ||
x86stdcall2.rs | ||
x86stdcall.rs |