rust/compiler/rustc_attr/src
bors 4354192429 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.
2023-08-25 00:02:54 +00:00
..
builtin.rs Auto merge of #114201 - Centri3:explicit-repr-rust, r=WaffleLapkin 2023-08-25 00:02:54 +00:00
lib.rs Add rustc_fluent_macro to decouple fluent from rustc_macros 2023-04-18 18:56:22 +00:00
session_diagnostics.rs