# Pre-RFC: Aarch64 Indirect Return ABI

**URL:** <https://internals.rust-lang.org/t/pre-rfc-aarch64-indirect-return-abi/23453>\
**Category:** language design\
**Created:** [August 25, 2025, 2:42pm UTC](https://internals.rust-lang.org/t/pre-rfc-aarch64-indirect-return-abi/23453 "2025-08-25T14:42:21Z")\
**Posts on this page:** 1\
**Page:** 2

<div class="post-metadata">

**Author:** ![kornel](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/kornel/32/2711_2.png) [@kornel](https://internals.rust-lang.org/u/kornel)\
**Post date:** [August 27, 2025, 4:22pm UTC](https://internals.rust-lang.org/t/pre-rfc-aarch64-indirect-return-abi/23453/21 "2025-08-27T16:22:59Z")

</div>

It's a correctness issue for C++ too. It allows self-referential structs. Move constructors can be used to fix self-referential pointers, but Rust isn't going to call them.

> [@CodesInChaos](#):
>
> I assume that C++ can apply this mechanism on top of different C ABIs, like `C` and `fastcall`.

I think `fastcall` happens to be the same for C and C++ (`fastcall` with attribute for non-trivial C++ types could be the C++ fastcall ABI).

But there is a general problem with lack of orthogonality/customizability in Rust's `extern "ABI"` design. There's already `"C"` and `"C-unwind"`. Every other ABI will need an `*-unwind` variant, and if C++ affects it, it would need `*-C++` and `*-C++-unwind` variants too.

There's also a [gray area of `target_feature` and `avx2`](https://github.com/gnzlbg/rfcs/blob/target_feature/text/0000-target-feature.md#how-do-we-handle-abi-issues-with-portable-vector-types) in Rust, which is kinda like `extern "Rust-avx2" fn()` for SIMD types.

[Previous page](https://internals.rust-lang.org/t/pre-rfc-aarch64-indirect-return-abi/23453.md?page=1)
