From 4c1dbc3aec35daca455c9ba7e440651bcf16069a Mon Sep 17 00:00:00 2001 From: Erik Desjardins Date: Sun, 11 Jun 2023 13:47:35 -0400 Subject: [PATCH] bless layout tests for has_repr_align in debug output --- tests/ui/layout/debug.stderr | 18 ++++++++++++++++++ tests/ui/layout/hexagon-enum.stderr | 10 ++++++++++ ...8-scalarpair-payload-might-be-uninit.stderr | 17 +++++++++++++++++ .../layout/issue-96185-overaligned-enum.stderr | 6 ++++++ tests/ui/layout/thumb-enum.stderr | 10 ++++++++++ .../layout/zero-sized-array-enum-niche.stderr | 13 +++++++++++++ 6 files changed, 74 insertions(+) diff --git a/tests/ui/layout/debug.stderr b/tests/ui/layout/debug.stderr index b9fa1b299e9..4f27eaae8d8 100644 --- a/tests/ui/layout/debug.stderr +++ b/tests/ui/layout/debug.stderr @@ -53,6 +53,7 @@ error: layout_of(E) = Layout { variants: Single { index: 0, }, + has_repr_align: false, }, Layout { size: Size(12 bytes), @@ -77,9 +78,11 @@ error: layout_of(E) = Layout { variants: Single { index: 1, }, + has_repr_align: false, }, ], }, + has_repr_align: false, } --> $DIR/debug.rs:7:1 | @@ -124,6 +127,7 @@ error: layout_of(S) = Layout { variants: Single { index: 0, }, + has_repr_align: false, } --> $DIR/debug.rs:10:1 | @@ -146,6 +150,7 @@ error: layout_of(U) = Layout { variants: Single { index: 0, }, + has_repr_align: false, } --> $DIR/debug.rs:13:1 | @@ -237,6 +242,7 @@ error: layout_of(std::result::Result) = Layout { variants: Single { index: 0, }, + has_repr_align: false, }, Layout { size: Size(8 bytes), @@ -272,9 +278,11 @@ error: layout_of(std::result::Result) = Layout { variants: Single { index: 1, }, + has_repr_align: false, }, ], }, + has_repr_align: false, } --> $DIR/debug.rs:16:1 | @@ -301,6 +309,7 @@ error: layout_of(i32) = Layout { variants: Single { index: 0, }, + has_repr_align: false, } --> $DIR/debug.rs:19:1 | @@ -323,6 +332,7 @@ error: layout_of(V) = Layout { variants: Single { index: 0, }, + has_repr_align: false, } --> $DIR/debug.rs:22:1 | @@ -345,6 +355,7 @@ error: layout_of(W) = Layout { variants: Single { index: 0, }, + has_repr_align: false, } --> $DIR/debug.rs:28:1 | @@ -367,6 +378,7 @@ error: layout_of(Y) = Layout { variants: Single { index: 0, }, + has_repr_align: false, } --> $DIR/debug.rs:34:1 | @@ -389,6 +401,7 @@ error: layout_of(P1) = Layout { variants: Single { index: 0, }, + has_repr_align: false, } --> $DIR/debug.rs:41:1 | @@ -411,6 +424,7 @@ error: layout_of(P2) = Layout { variants: Single { index: 0, }, + has_repr_align: false, } --> $DIR/debug.rs:45:1 | @@ -433,6 +447,7 @@ error: layout_of(P3) = Layout { variants: Single { index: 0, }, + has_repr_align: false, } --> $DIR/debug.rs:53:1 | @@ -455,6 +470,7 @@ error: layout_of(P4) = Layout { variants: Single { index: 0, }, + has_repr_align: false, } --> $DIR/debug.rs:57:1 | @@ -482,6 +498,7 @@ error: layout_of(P5) = Layout { variants: Single { index: 0, }, + has_repr_align: false, } --> $DIR/debug.rs:61:1 | @@ -509,6 +526,7 @@ error: layout_of(std::mem::MaybeUninit) = Layout { variants: Single { index: 0, }, + has_repr_align: false, } --> $DIR/debug.rs:64:1 | diff --git a/tests/ui/layout/hexagon-enum.stderr b/tests/ui/layout/hexagon-enum.stderr index d850dd69c96..08c4e547ff2 100644 --- a/tests/ui/layout/hexagon-enum.stderr +++ b/tests/ui/layout/hexagon-enum.stderr @@ -59,9 +59,11 @@ error: layout_of(A) = Layout { variants: Single { index: 0, }, + has_repr_align: false, }, ], }, + has_repr_align: false, } --> $DIR/hexagon-enum.rs:16:1 | @@ -129,9 +131,11 @@ error: layout_of(B) = Layout { variants: Single { index: 0, }, + has_repr_align: false, }, ], }, + has_repr_align: false, } --> $DIR/hexagon-enum.rs:20:1 | @@ -199,9 +203,11 @@ error: layout_of(C) = Layout { variants: Single { index: 0, }, + has_repr_align: false, }, ], }, + has_repr_align: false, } --> $DIR/hexagon-enum.rs:24:1 | @@ -269,9 +275,11 @@ error: layout_of(P) = Layout { variants: Single { index: 0, }, + has_repr_align: false, }, ], }, + has_repr_align: false, } --> $DIR/hexagon-enum.rs:28:1 | @@ -339,9 +347,11 @@ error: layout_of(T) = Layout { variants: Single { index: 0, }, + has_repr_align: false, }, ], }, + has_repr_align: false, } --> $DIR/hexagon-enum.rs:34:1 | diff --git a/tests/ui/layout/issue-96158-scalarpair-payload-might-be-uninit.stderr b/tests/ui/layout/issue-96158-scalarpair-payload-might-be-uninit.stderr index 8c7c915350f..5fae4d9a6a5 100644 --- a/tests/ui/layout/issue-96158-scalarpair-payload-might-be-uninit.stderr +++ b/tests/ui/layout/issue-96158-scalarpair-payload-might-be-uninit.stderr @@ -81,6 +81,7 @@ error: layout_of(MissingPayloadField) = Layout { variants: Single { index: 0, }, + has_repr_align: false, }, Layout { size: Size(1 bytes), @@ -99,9 +100,11 @@ error: layout_of(MissingPayloadField) = Layout { variants: Single { index: 1, }, + has_repr_align: false, }, ], }, + has_repr_align: false, } --> $DIR/issue-96158-scalarpair-payload-might-be-uninit.rs:16:1 | @@ -193,6 +196,7 @@ error: layout_of(CommonPayloadField) = Layout { variants: Single { index: 0, }, + has_repr_align: false, }, Layout { size: Size(2 bytes), @@ -228,9 +232,11 @@ error: layout_of(CommonPayloadField) = Layout { variants: Single { index: 1, }, + has_repr_align: false, }, ], }, + has_repr_align: false, } --> $DIR/issue-96158-scalarpair-payload-might-be-uninit.rs:25:1 | @@ -320,6 +326,7 @@ error: layout_of(CommonPayloadFieldIsMaybeUninit) = Layout { variants: Single { index: 0, }, + has_repr_align: false, }, Layout { size: Size(2 bytes), @@ -354,9 +361,11 @@ error: layout_of(CommonPayloadFieldIsMaybeUninit) = Layout { variants: Single { index: 1, }, + has_repr_align: false, }, ], }, + has_repr_align: false, } --> $DIR/issue-96158-scalarpair-payload-might-be-uninit.rs:33:1 | @@ -462,6 +471,7 @@ error: layout_of(NicheFirst) = Layout { variants: Single { index: 0, }, + has_repr_align: false, }, Layout { size: Size(0 bytes), @@ -480,6 +490,7 @@ error: layout_of(NicheFirst) = Layout { variants: Single { index: 1, }, + has_repr_align: false, }, Layout { size: Size(0 bytes), @@ -498,9 +509,11 @@ error: layout_of(NicheFirst) = Layout { variants: Single { index: 2, }, + has_repr_align: false, }, ], }, + has_repr_align: false, } --> $DIR/issue-96158-scalarpair-payload-might-be-uninit.rs:41:1 | @@ -606,6 +619,7 @@ error: layout_of(NicheSecond) = Layout { variants: Single { index: 0, }, + has_repr_align: false, }, Layout { size: Size(0 bytes), @@ -624,6 +638,7 @@ error: layout_of(NicheSecond) = Layout { variants: Single { index: 1, }, + has_repr_align: false, }, Layout { size: Size(0 bytes), @@ -642,9 +657,11 @@ error: layout_of(NicheSecond) = Layout { variants: Single { index: 2, }, + has_repr_align: false, }, ], }, + has_repr_align: false, } --> $DIR/issue-96158-scalarpair-payload-might-be-uninit.rs:50:1 | diff --git a/tests/ui/layout/issue-96185-overaligned-enum.stderr b/tests/ui/layout/issue-96185-overaligned-enum.stderr index de6177c8dfc..fe1d4392b67 100644 --- a/tests/ui/layout/issue-96185-overaligned-enum.stderr +++ b/tests/ui/layout/issue-96185-overaligned-enum.stderr @@ -53,6 +53,7 @@ error: layout_of(Aligned1) = Layout { variants: Single { index: 0, }, + has_repr_align: true, }, Layout { size: Size(8 bytes), @@ -71,9 +72,11 @@ error: layout_of(Aligned1) = Layout { variants: Single { index: 1, }, + has_repr_align: true, }, ], }, + has_repr_align: true, } --> $DIR/issue-96185-overaligned-enum.rs:8:1 | @@ -141,6 +144,7 @@ error: layout_of(Aligned2) = Layout { variants: Single { index: 0, }, + has_repr_align: true, }, Layout { size: Size(1 bytes), @@ -159,9 +163,11 @@ error: layout_of(Aligned2) = Layout { variants: Single { index: 1, }, + has_repr_align: true, }, ], }, + has_repr_align: true, } --> $DIR/issue-96185-overaligned-enum.rs:16:1 | diff --git a/tests/ui/layout/thumb-enum.stderr b/tests/ui/layout/thumb-enum.stderr index 227bd950b66..7aca1aa462e 100644 --- a/tests/ui/layout/thumb-enum.stderr +++ b/tests/ui/layout/thumb-enum.stderr @@ -59,9 +59,11 @@ error: layout_of(A) = Layout { variants: Single { index: 0, }, + has_repr_align: false, }, ], }, + has_repr_align: false, } --> $DIR/thumb-enum.rs:16:1 | @@ -129,9 +131,11 @@ error: layout_of(B) = Layout { variants: Single { index: 0, }, + has_repr_align: false, }, ], }, + has_repr_align: false, } --> $DIR/thumb-enum.rs:20:1 | @@ -199,9 +203,11 @@ error: layout_of(C) = Layout { variants: Single { index: 0, }, + has_repr_align: false, }, ], }, + has_repr_align: false, } --> $DIR/thumb-enum.rs:24:1 | @@ -269,9 +275,11 @@ error: layout_of(P) = Layout { variants: Single { index: 0, }, + has_repr_align: false, }, ], }, + has_repr_align: false, } --> $DIR/thumb-enum.rs:28:1 | @@ -339,9 +347,11 @@ error: layout_of(T) = Layout { variants: Single { index: 0, }, + has_repr_align: false, }, ], }, + has_repr_align: false, } --> $DIR/thumb-enum.rs:34:1 | diff --git a/tests/ui/layout/zero-sized-array-enum-niche.stderr b/tests/ui/layout/zero-sized-array-enum-niche.stderr index a3e82070e0f..8342d64b6fe 100644 --- a/tests/ui/layout/zero-sized-array-enum-niche.stderr +++ b/tests/ui/layout/zero-sized-array-enum-niche.stderr @@ -57,6 +57,7 @@ error: layout_of(std::result::Result<[u32; 0], bool>) = Layout { variants: Single { index: 0, }, + has_repr_align: false, }, Layout { size: Size(2 bytes), @@ -88,9 +89,11 @@ error: layout_of(std::result::Result<[u32; 0], bool>) = Layout { variants: Single { index: 1, }, + has_repr_align: false, }, ], }, + has_repr_align: false, } --> $DIR/zero-sized-array-enum-niche.rs:13:1 | @@ -156,6 +159,7 @@ error: layout_of(MultipleAlignments) = Layout { variants: Single { index: 0, }, + has_repr_align: false, }, Layout { size: Size(4 bytes), @@ -178,6 +182,7 @@ error: layout_of(MultipleAlignments) = Layout { variants: Single { index: 1, }, + has_repr_align: false, }, Layout { size: Size(2 bytes), @@ -209,9 +214,11 @@ error: layout_of(MultipleAlignments) = Layout { variants: Single { index: 2, }, + has_repr_align: false, }, ], }, + has_repr_align: false, } --> $DIR/zero-sized-array-enum-niche.rs:21:1 | @@ -277,6 +284,7 @@ error: layout_of(std::result::Result<[u32; 0], Packed>) = variants: Single { index: 0, }, + has_repr_align: false, }, Layout { size: Size(3 bytes), @@ -308,9 +316,11 @@ error: layout_of(std::result::Result<[u32; 0], Packed>) = variants: Single { index: 1, }, + has_repr_align: false, }, ], }, + has_repr_align: false, } --> $DIR/zero-sized-array-enum-niche.rs:37:1 | @@ -380,6 +390,7 @@ error: layout_of(std::result::Result<[u32; 0], Packed>) = Layout { variants: Single { index: 0, }, + has_repr_align: false, }, Layout { size: Size(2 bytes), @@ -411,9 +422,11 @@ error: layout_of(std::result::Result<[u32; 0], Packed>) = Layout { variants: Single { index: 1, }, + has_repr_align: false, }, ], }, + has_repr_align: false, } --> $DIR/zero-sized-array-enum-niche.rs:44:1 |