diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2023-07-22 19:57:37 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-07-22 19:57:37 +0200 |
| commit | b7183bd167cf40be79bd7c7d7686f27cf41414bd (patch) | |
| tree | 3f3048ce8d5d4e66de53a69fb3abf749b1a00da2 | |
| parent | 00e147543c5daa77a6cdaa4f9a2529262f7bba56 (diff) | |
| parent | ffa4b6f422aabfc425f61526d51e2c42300b130f (diff) | |
| download | rust-b7183bd167cf40be79bd7c7d7686f27cf41414bd.tar.gz rust-b7183bd167cf40be79bd7c7d7686f27cf41414bd.zip | |
Rollup merge of #113957 - Urgau:regression-test-issue-113941, r=dtolnay
Add regression test for issue #113941 - naive layout isn't refined This PR adds a regression test for issue #113941 - `the naive layout isn't refined by the actual layout` based on the minimized repro https://github.com/rust-lang/rust/issues/113941#issuecomment-1646446769.
| -rw-r--r-- | tests/ui/layout/issue-113941.rs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/ui/layout/issue-113941.rs b/tests/ui/layout/issue-113941.rs new file mode 100644 index 00000000000..7a54e28b350 --- /dev/null +++ b/tests/ui/layout/issue-113941.rs @@ -0,0 +1,13 @@ +// build-pass +// revisions: normal randomize-layout +// [randomize-layout]compile-flags: -Zrandomize-layout + +enum Void {} + +pub struct Struct([*const (); 0], Void); + +pub enum Enum { + Variant(Struct), +} + +fn main() {} |
