rust/compiler/rustc_hir_analysis
bors 203c57dbe2 Auto merge of #115334 - RalfJung:transparent-aligned-zst, r=compiler-errors
repr(transparent): it's fine if the one non-1-ZST field is a ZST

This code currently gets rejected:
```rust
#[repr(transparent)]
struct MyType([u16; 0])
```
That clearly seems like a bug to me: `repr(transparent)` [got defined ](https://github.com/rust-lang/rust/issues/77841#issuecomment-716575747) as having any number of 1-ZST fields plus optionally one more field; `MyType` clearly satisfies that definition.

This PR changes the `repr(transparent)` logic to actually match that definition.
2023-09-17 15:20:44 +00:00
..
src Auto merge of #115334 - RalfJung:transparent-aligned-zst, r=compiler-errors 2023-09-17 15:20:44 +00:00
Cargo.toml
messages.ftl Auto merge of #115334 - RalfJung:transparent-aligned-zst, r=compiler-errors 2023-09-17 15:20:44 +00:00
README.md

For high-level intro to how type checking works in rustc, see the type checking chapter of the rustc dev guide.