diff options
| author | bors <bors@rust-lang.org> | 2023-09-17 15:20:44 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-09-17 15:20:44 +0000 |
| commit | 203c57dbe20aee67eaa8f7be45d1e4ef0b274109 (patch) | |
| tree | dff297ec14f9b108ee8c775862f19bb8ff9a51fa /compiler/rustc_hir_analysis/src/errors.rs | |
| parent | db9c21fd944b942a3a83e1fbce0d7c1c9164bc2a (diff) | |
| parent | a6ccd265e6b0cad3107187fccbfee24d08158385 (diff) | |
| download | rust-203c57dbe20aee67eaa8f7be45d1e4ef0b274109.tar.gz rust-203c57dbe20aee67eaa8f7be45d1e4ef0b274109.zip | |
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.
Diffstat (limited to 'compiler/rustc_hir_analysis/src/errors.rs')
0 files changed, 0 insertions, 0 deletions
