about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/codegen/align-byval.rs11
-rw-r--r--tests/ui/layout/debug.stderr36
-rw-r--r--tests/ui/layout/hexagon-enum.stderr20
-rw-r--r--tests/ui/layout/issue-96158-scalarpair-payload-might-be-uninit.stderr34
-rw-r--r--tests/ui/layout/issue-96185-overaligned-enum.stderr24
-rw-r--r--tests/ui/layout/thumb-enum.stderr20
-rw-r--r--tests/ui/layout/zero-sized-array-enum-niche.stderr26
7 files changed, 90 insertions, 81 deletions
diff --git a/tests/codegen/align-byval.rs b/tests/codegen/align-byval.rs
index 2c64230bfd0..fc5f795bf67 100644
--- a/tests/codegen/align-byval.rs
+++ b/tests/codegen/align-byval.rs
@@ -71,17 +71,16 @@ pub struct ForceAlign8 {
     c: i64
 }
 
-// On i686-windows, this is passed by reference because alignment is requested,
-// even though the requested alignment is less than the natural alignment.
+// On i686-windows, this is passed on stack, because requested alignment is <=4.
 #[repr(C)]
-#[repr(align(1))]
+#[repr(align(4))]
 pub struct LowerFA8 {
     a: i64,
     b: i64,
     c: i64
 }
 
-// On i686-windows, this is passed on stack again, because the wrapper struct does not have
+// On i686-windows, this is passed on stack, because the wrapper struct does not have
 // requested/forced alignment.
 #[repr(C)]
 pub struct WrappedFA8 {
@@ -287,9 +286,7 @@ extern "C" {
 
     // i686-linux: declare void @lower_fa8({{.*}}byval(%LowerFA8) align 4{{.*}})
 
-    // i686-windows: declare void @lower_fa8(
-    // i686-windows-NOT: byval
-    // i686-windows-SAME: align 8{{.*}})
+    // i686-windows: declare void @lower_fa8({{.*}}byval(%LowerFA8) align 4{{.*}})
     fn lower_fa8(x: LowerFA8);
 
     // m68k: declare void @wrapped_fa8({{.*}}byval(%WrappedFA8) align 8{{.*}})
diff --git a/tests/ui/layout/debug.stderr b/tests/ui/layout/debug.stderr
index 4f27eaae8d8..99022fb11b5 100644
--- a/tests/ui/layout/debug.stderr
+++ b/tests/ui/layout/debug.stderr
@@ -53,7 +53,7 @@ error: layout_of(E) = Layout {
                        variants: Single {
                            index: 0,
                        },
-                       has_repr_align: false,
+                       repr_align: None,
                    },
                    Layout {
                        size: Size(12 bytes),
@@ -78,11 +78,11 @@ error: layout_of(E) = Layout {
                        variants: Single {
                            index: 1,
                        },
-                       has_repr_align: false,
+                       repr_align: None,
                    },
                ],
            },
-           has_repr_align: false,
+           repr_align: None,
        }
   --> $DIR/debug.rs:7:1
    |
@@ -127,7 +127,7 @@ error: layout_of(S) = Layout {
            variants: Single {
                index: 0,
            },
-           has_repr_align: false,
+           repr_align: None,
        }
   --> $DIR/debug.rs:10:1
    |
@@ -150,7 +150,7 @@ error: layout_of(U) = Layout {
            variants: Single {
                index: 0,
            },
-           has_repr_align: false,
+           repr_align: None,
        }
   --> $DIR/debug.rs:13:1
    |
@@ -242,7 +242,7 @@ error: layout_of(std::result::Result<i32, i32>) = Layout {
                        variants: Single {
                            index: 0,
                        },
-                       has_repr_align: false,
+                       repr_align: None,
                    },
                    Layout {
                        size: Size(8 bytes),
@@ -278,11 +278,11 @@ error: layout_of(std::result::Result<i32, i32>) = Layout {
                        variants: Single {
                            index: 1,
                        },
-                       has_repr_align: false,
+                       repr_align: None,
                    },
                ],
            },
-           has_repr_align: false,
+           repr_align: None,
        }
   --> $DIR/debug.rs:16:1
    |
@@ -309,7 +309,7 @@ error: layout_of(i32) = Layout {
            variants: Single {
                index: 0,
            },
-           has_repr_align: false,
+           repr_align: None,
        }
   --> $DIR/debug.rs:19:1
    |
@@ -332,7 +332,7 @@ error: layout_of(V) = Layout {
            variants: Single {
                index: 0,
            },
-           has_repr_align: false,
+           repr_align: None,
        }
   --> $DIR/debug.rs:22:1
    |
@@ -355,7 +355,7 @@ error: layout_of(W) = Layout {
            variants: Single {
                index: 0,
            },
-           has_repr_align: false,
+           repr_align: None,
        }
   --> $DIR/debug.rs:28:1
    |
@@ -378,7 +378,7 @@ error: layout_of(Y) = Layout {
            variants: Single {
                index: 0,
            },
-           has_repr_align: false,
+           repr_align: None,
        }
   --> $DIR/debug.rs:34:1
    |
@@ -401,7 +401,7 @@ error: layout_of(P1) = Layout {
            variants: Single {
                index: 0,
            },
-           has_repr_align: false,
+           repr_align: None,
        }
   --> $DIR/debug.rs:41:1
    |
@@ -424,7 +424,7 @@ error: layout_of(P2) = Layout {
            variants: Single {
                index: 0,
            },
-           has_repr_align: false,
+           repr_align: None,
        }
   --> $DIR/debug.rs:45:1
    |
@@ -447,7 +447,7 @@ error: layout_of(P3) = Layout {
            variants: Single {
                index: 0,
            },
-           has_repr_align: false,
+           repr_align: None,
        }
   --> $DIR/debug.rs:53:1
    |
@@ -470,7 +470,7 @@ error: layout_of(P4) = Layout {
            variants: Single {
                index: 0,
            },
-           has_repr_align: false,
+           repr_align: None,
        }
   --> $DIR/debug.rs:57:1
    |
@@ -498,7 +498,7 @@ error: layout_of(P5) = Layout {
            variants: Single {
                index: 0,
            },
-           has_repr_align: false,
+           repr_align: None,
        }
   --> $DIR/debug.rs:61:1
    |
@@ -526,7 +526,7 @@ error: layout_of(std::mem::MaybeUninit<u8>) = Layout {
            variants: Single {
                index: 0,
            },
-           has_repr_align: false,
+           repr_align: None,
        }
   --> $DIR/debug.rs:64:1
    |
diff --git a/tests/ui/layout/hexagon-enum.stderr b/tests/ui/layout/hexagon-enum.stderr
index 08c4e547ff2..a907853585d 100644
--- a/tests/ui/layout/hexagon-enum.stderr
+++ b/tests/ui/layout/hexagon-enum.stderr
@@ -59,11 +59,11 @@ error: layout_of(A) = Layout {
                        variants: Single {
                            index: 0,
                        },
-                       has_repr_align: false,
+                       repr_align: None,
                    },
                ],
            },
-           has_repr_align: false,
+           repr_align: None,
        }
   --> $DIR/hexagon-enum.rs:16:1
    |
@@ -131,11 +131,11 @@ error: layout_of(B) = Layout {
                        variants: Single {
                            index: 0,
                        },
-                       has_repr_align: false,
+                       repr_align: None,
                    },
                ],
            },
-           has_repr_align: false,
+           repr_align: None,
        }
   --> $DIR/hexagon-enum.rs:20:1
    |
@@ -203,11 +203,11 @@ error: layout_of(C) = Layout {
                        variants: Single {
                            index: 0,
                        },
-                       has_repr_align: false,
+                       repr_align: None,
                    },
                ],
            },
-           has_repr_align: false,
+           repr_align: None,
        }
   --> $DIR/hexagon-enum.rs:24:1
    |
@@ -275,11 +275,11 @@ error: layout_of(P) = Layout {
                        variants: Single {
                            index: 0,
                        },
-                       has_repr_align: false,
+                       repr_align: None,
                    },
                ],
            },
-           has_repr_align: false,
+           repr_align: None,
        }
   --> $DIR/hexagon-enum.rs:28:1
    |
@@ -347,11 +347,11 @@ error: layout_of(T) = Layout {
                        variants: Single {
                            index: 0,
                        },
-                       has_repr_align: false,
+                       repr_align: None,
                    },
                ],
            },
-           has_repr_align: false,
+           repr_align: None,
        }
   --> $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 5fae4d9a6a5..2db6ab9bc89 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,7 +81,7 @@ error: layout_of(MissingPayloadField) = Layout {
                        variants: Single {
                            index: 0,
                        },
-                       has_repr_align: false,
+                       repr_align: None,
                    },
                    Layout {
                        size: Size(1 bytes),
@@ -100,11 +100,11 @@ error: layout_of(MissingPayloadField) = Layout {
                        variants: Single {
                            index: 1,
                        },
-                       has_repr_align: false,
+                       repr_align: None,
                    },
                ],
            },
-           has_repr_align: false,
+           repr_align: None,
        }
   --> $DIR/issue-96158-scalarpair-payload-might-be-uninit.rs:16:1
    |
@@ -196,7 +196,7 @@ error: layout_of(CommonPayloadField) = Layout {
                        variants: Single {
                            index: 0,
                        },
-                       has_repr_align: false,
+                       repr_align: None,
                    },
                    Layout {
                        size: Size(2 bytes),
@@ -232,11 +232,11 @@ error: layout_of(CommonPayloadField) = Layout {
                        variants: Single {
                            index: 1,
                        },
-                       has_repr_align: false,
+                       repr_align: None,
                    },
                ],
            },
-           has_repr_align: false,
+           repr_align: None,
        }
   --> $DIR/issue-96158-scalarpair-payload-might-be-uninit.rs:25:1
    |
@@ -326,7 +326,7 @@ error: layout_of(CommonPayloadFieldIsMaybeUninit) = Layout {
                        variants: Single {
                            index: 0,
                        },
-                       has_repr_align: false,
+                       repr_align: None,
                    },
                    Layout {
                        size: Size(2 bytes),
@@ -361,11 +361,11 @@ error: layout_of(CommonPayloadFieldIsMaybeUninit) = Layout {
                        variants: Single {
                            index: 1,
                        },
-                       has_repr_align: false,
+                       repr_align: None,
                    },
                ],
            },
-           has_repr_align: false,
+           repr_align: None,
        }
   --> $DIR/issue-96158-scalarpair-payload-might-be-uninit.rs:33:1
    |
@@ -471,7 +471,7 @@ error: layout_of(NicheFirst) = Layout {
                        variants: Single {
                            index: 0,
                        },
-                       has_repr_align: false,
+                       repr_align: None,
                    },
                    Layout {
                        size: Size(0 bytes),
@@ -490,7 +490,7 @@ error: layout_of(NicheFirst) = Layout {
                        variants: Single {
                            index: 1,
                        },
-                       has_repr_align: false,
+                       repr_align: None,
                    },
                    Layout {
                        size: Size(0 bytes),
@@ -509,11 +509,11 @@ error: layout_of(NicheFirst) = Layout {
                        variants: Single {
                            index: 2,
                        },
-                       has_repr_align: false,
+                       repr_align: None,
                    },
                ],
            },
-           has_repr_align: false,
+           repr_align: None,
        }
   --> $DIR/issue-96158-scalarpair-payload-might-be-uninit.rs:41:1
    |
@@ -619,7 +619,7 @@ error: layout_of(NicheSecond) = Layout {
                        variants: Single {
                            index: 0,
                        },
-                       has_repr_align: false,
+                       repr_align: None,
                    },
                    Layout {
                        size: Size(0 bytes),
@@ -638,7 +638,7 @@ error: layout_of(NicheSecond) = Layout {
                        variants: Single {
                            index: 1,
                        },
-                       has_repr_align: false,
+                       repr_align: None,
                    },
                    Layout {
                        size: Size(0 bytes),
@@ -657,11 +657,11 @@ error: layout_of(NicheSecond) = Layout {
                        variants: Single {
                            index: 2,
                        },
-                       has_repr_align: false,
+                       repr_align: None,
                    },
                ],
            },
-           has_repr_align: false,
+           repr_align: None,
        }
   --> $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 fe1d4392b67..3a0ad07347d 100644
--- a/tests/ui/layout/issue-96185-overaligned-enum.stderr
+++ b/tests/ui/layout/issue-96185-overaligned-enum.stderr
@@ -53,7 +53,9 @@ error: layout_of(Aligned1) = Layout {
                        variants: Single {
                            index: 0,
                        },
-                       has_repr_align: true,
+                       repr_align: Some(
+                           Align(8 bytes),
+                       ),
                    },
                    Layout {
                        size: Size(8 bytes),
@@ -72,11 +74,15 @@ error: layout_of(Aligned1) = Layout {
                        variants: Single {
                            index: 1,
                        },
-                       has_repr_align: true,
+                       repr_align: Some(
+                           Align(8 bytes),
+                       ),
                    },
                ],
            },
-           has_repr_align: true,
+           repr_align: Some(
+               Align(8 bytes),
+           ),
        }
   --> $DIR/issue-96185-overaligned-enum.rs:8:1
    |
@@ -144,7 +150,9 @@ error: layout_of(Aligned2) = Layout {
                        variants: Single {
                            index: 0,
                        },
-                       has_repr_align: true,
+                       repr_align: Some(
+                           Align(1 bytes),
+                       ),
                    },
                    Layout {
                        size: Size(1 bytes),
@@ -163,11 +171,15 @@ error: layout_of(Aligned2) = Layout {
                        variants: Single {
                            index: 1,
                        },
-                       has_repr_align: true,
+                       repr_align: Some(
+                           Align(1 bytes),
+                       ),
                    },
                ],
            },
-           has_repr_align: true,
+           repr_align: Some(
+               Align(1 bytes),
+           ),
        }
   --> $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 7aca1aa462e..27bba72fcfe 100644
--- a/tests/ui/layout/thumb-enum.stderr
+++ b/tests/ui/layout/thumb-enum.stderr
@@ -59,11 +59,11 @@ error: layout_of(A) = Layout {
                        variants: Single {
                            index: 0,
                        },
-                       has_repr_align: false,
+                       repr_align: None,
                    },
                ],
            },
-           has_repr_align: false,
+           repr_align: None,
        }
   --> $DIR/thumb-enum.rs:16:1
    |
@@ -131,11 +131,11 @@ error: layout_of(B) = Layout {
                        variants: Single {
                            index: 0,
                        },
-                       has_repr_align: false,
+                       repr_align: None,
                    },
                ],
            },
-           has_repr_align: false,
+           repr_align: None,
        }
   --> $DIR/thumb-enum.rs:20:1
    |
@@ -203,11 +203,11 @@ error: layout_of(C) = Layout {
                        variants: Single {
                            index: 0,
                        },
-                       has_repr_align: false,
+                       repr_align: None,
                    },
                ],
            },
-           has_repr_align: false,
+           repr_align: None,
        }
   --> $DIR/thumb-enum.rs:24:1
    |
@@ -275,11 +275,11 @@ error: layout_of(P) = Layout {
                        variants: Single {
                            index: 0,
                        },
-                       has_repr_align: false,
+                       repr_align: None,
                    },
                ],
            },
-           has_repr_align: false,
+           repr_align: None,
        }
   --> $DIR/thumb-enum.rs:28:1
    |
@@ -347,11 +347,11 @@ error: layout_of(T) = Layout {
                        variants: Single {
                            index: 0,
                        },
-                       has_repr_align: false,
+                       repr_align: None,
                    },
                ],
            },
-           has_repr_align: false,
+           repr_align: None,
        }
   --> $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 8342d64b6fe..a9a242943ba 100644
--- a/tests/ui/layout/zero-sized-array-enum-niche.stderr
+++ b/tests/ui/layout/zero-sized-array-enum-niche.stderr
@@ -57,7 +57,7 @@ error: layout_of(std::result::Result<[u32; 0], bool>) = Layout {
                        variants: Single {
                            index: 0,
                        },
-                       has_repr_align: false,
+                       repr_align: None,
                    },
                    Layout {
                        size: Size(2 bytes),
@@ -89,11 +89,11 @@ error: layout_of(std::result::Result<[u32; 0], bool>) = Layout {
                        variants: Single {
                            index: 1,
                        },
-                       has_repr_align: false,
+                       repr_align: None,
                    },
                ],
            },
-           has_repr_align: false,
+           repr_align: None,
        }
   --> $DIR/zero-sized-array-enum-niche.rs:13:1
    |
@@ -159,7 +159,7 @@ error: layout_of(MultipleAlignments) = Layout {
                        variants: Single {
                            index: 0,
                        },
-                       has_repr_align: false,
+                       repr_align: None,
                    },
                    Layout {
                        size: Size(4 bytes),
@@ -182,7 +182,7 @@ error: layout_of(MultipleAlignments) = Layout {
                        variants: Single {
                            index: 1,
                        },
-                       has_repr_align: false,
+                       repr_align: None,
                    },
                    Layout {
                        size: Size(2 bytes),
@@ -214,11 +214,11 @@ error: layout_of(MultipleAlignments) = Layout {
                        variants: Single {
                            index: 2,
                        },
-                       has_repr_align: false,
+                       repr_align: None,
                    },
                ],
            },
-           has_repr_align: false,
+           repr_align: None,
        }
   --> $DIR/zero-sized-array-enum-niche.rs:21:1
    |
@@ -284,7 +284,7 @@ error: layout_of(std::result::Result<[u32; 0], Packed<std::num::NonZeroU16>>) =
                        variants: Single {
                            index: 0,
                        },
-                       has_repr_align: false,
+                       repr_align: None,
                    },
                    Layout {
                        size: Size(3 bytes),
@@ -316,11 +316,11 @@ error: layout_of(std::result::Result<[u32; 0], Packed<std::num::NonZeroU16>>) =
                        variants: Single {
                            index: 1,
                        },
-                       has_repr_align: false,
+                       repr_align: None,
                    },
                ],
            },
-           has_repr_align: false,
+           repr_align: None,
        }
   --> $DIR/zero-sized-array-enum-niche.rs:37:1
    |
@@ -390,7 +390,7 @@ error: layout_of(std::result::Result<[u32; 0], Packed<U16IsZero>>) = Layout {
                        variants: Single {
                            index: 0,
                        },
-                       has_repr_align: false,
+                       repr_align: None,
                    },
                    Layout {
                        size: Size(2 bytes),
@@ -422,11 +422,11 @@ error: layout_of(std::result::Result<[u32; 0], Packed<U16IsZero>>) = Layout {
                        variants: Single {
                            index: 1,
                        },
-                       has_repr_align: false,
+                       repr_align: None,
                    },
                ],
            },
-           has_repr_align: false,
+           repr_align: None,
        }
   --> $DIR/zero-sized-array-enum-niche.rs:44:1
    |