about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src/builder.rs
diff options
context:
space:
mode:
authorJubilee <workingjubilee@gmail.com>2024-09-18 14:32:24 -0700
committerGitHub <noreply@github.com>2024-09-18 14:32:24 -0700
commit2eb65a6667f2023d0c51eb0b717698365520088d (patch)
tree3107641ea8dd6dc8bdb09003c5000ce1aa928bf5 /compiler/rustc_codegen_llvm/src/builder.rs
parent2a1dd3575f54a700c98aeadd33b3222e66ecab0d (diff)
parent363addc79c7a2cc782c88646ac90ebcc5836fb92 (diff)
downloadrust-2eb65a6667f2023d0c51eb0b717698365520088d.tar.gz
rust-2eb65a6667f2023d0c51eb0b717698365520088d.zip
Rollup merge of #129422 - compiler-errors:repr-rust, r=fmease
Gate `repr(Rust)` correctly on non-ADT items

#114201 added `repr(Rust)` but didn't add any attribute validation to it like `repr(C)` has, to only allow it on ADT items.

I consider this code to be nonsense, for example:
```
#[repr(Rust)]
fn foo() {}
```

Reminder that it's different from `extern "Rust"`, which *is* valid on function items. But also this now disallows `repr(Rust)` on modules, impls, traits, etc.

I'll crater it, if it looks bad then I'll add an FCW.

---

https://github.com/rust-lang/rust/labels/relnotes: Compatibility (minor breaking change).
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/builder.rs')
0 files changed, 0 insertions, 0 deletions