about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-08-25 00:02:54 +0000
committerbors <bors@rust-lang.org>2023-08-25 00:02:54 +0000
commit4354192429729d64f205e5021b6e793ea77e65c4 (patch)
treed1080a7fc52c7848d04e56d9e832681875574a51 /compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp
parent58eefc33adf769a1abe12ad94b3e6811185b4ce5 (diff)
parent1f7bad0d128c6b005ffadb683fffb8cc02f66c7d (diff)
downloadrust-4354192429729d64f205e5021b6e793ea77e65c4.tar.gz
rust-4354192429729d64f205e5021b6e793ea77e65c4.zip
Auto merge of #114201 - Centri3:explicit-repr-rust, r=WaffleLapkin
Allow explicit `#[repr(Rust)]`

This is identical to no `repr()` at all. For `Rust, packed` and `Rust, align(x)`, it should be the same as no `Rust` at all (as, afaik, `#[repr(align(16))]` uses the Rust ABI.)

The main use case for this is being able to explicitly say "I want to use the Rust ABI" in very very rare circumstances where the first obvious choice would be the C ABI yet is undesirable, which is already possible with functions as `extern "Rust"`. This would be useful for silencing https://github.com/rust-lang/rust-clippy/pull/11253. It's also more consistent with `extern`.

The lack of this also tripped me up a bit when I was new to Rust, as I expected this to be possible.
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp')
0 files changed, 0 insertions, 0 deletions