about summary refs log tree commit diff
path: root/compiler/rustc_trait_selection/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2025-01-13 13:05:53 +0000
committerbors <bors@rust-lang.org>2025-01-13 13:05:53 +0000
commit7a202a9056ea19058a2a4b1b4f508f7f4ec3a0f6 (patch)
tree856dc339cc8dc938f2428f87c4bbda201e7b23c8 /compiler/rustc_trait_selection/src
parent3ff1b6410e87a237559ab76ecd50f180afbe861f (diff)
parent675a1036cae37acdcd553dc58ee17299414e8b3d (diff)
downloadrust-7a202a9056ea19058a2a4b1b4f508f7f4ec3a0f6.tar.gz
rust-7a202a9056ea19058a2a4b1b4f508f7f4ec3a0f6.zip
Auto merge of #135204 - RalfJung:win64-zst, r=SparrowLii
fix handling of ZST in win64 ABI on windows-msvc targets

The Microsoft calling conventions do not really say anything about ZST since they do not seem to exist in MSVC. However, both GCC and clang allow passing ZST over  `__attribute__((ms_abi))` functions (which matches our `extern "win64" fn`) on `windows-gnu` targets, and therefore implicitly define a de-facto ABI for these types (and lucky enough they seem to define the same ABI). This ABI should be the same for windows-msvc and windows-gnu targets, so we use this as a hint for how to implement this ABI everywhere: we always pass ZST by-ref.

The best alternative would be to just reject compiling functions which cannot exist in MSVC, but that would be a breaking change.

Cc `@programmerjake` `@ChrisDenton`
Fixes https://github.com/rust-lang/rust/issues/132893
Diffstat (limited to 'compiler/rustc_trait_selection/src')
0 files changed, 0 insertions, 0 deletions