aboutsummaryrefslogtreecommitdiff
path: root/test/cases/compile_errors/align_zero.zig
diff options
context:
space:
mode:
authorDavid Rubin <daviru007@icloud.com>2025-02-24 04:02:06 -0800
committerDavid Rubin <david@vortan.dev>2025-08-01 14:57:16 -0700
commitd6c74a95fdaba4ed373f80baa725dcc53b27e402 (patch)
treee6827e6fa40ed25f5c6cee6eab0edace8a62c190 /test/cases/compile_errors/align_zero.zig
parent17330867eb8f9e24ec8aadf23592e36f90f9dcb3 (diff)
downloadzig-d6c74a95fdaba4ed373f80baa725dcc53b27e402.tar.gz
zig-d6c74a95fdaba4ed373f80baa725dcc53b27e402.zip
remove usages of `.alignment = 0`
Diffstat (limited to 'test/cases/compile_errors/align_zero.zig')
-rw-r--r--test/cases/compile_errors/align_zero.zig20
1 files changed, 1 insertions, 19 deletions
diff --git a/test/cases/compile_errors/align_zero.zig b/test/cases/compile_errors/align_zero.zig
index e6d1a993d4..e54a32ce31 100644
--- a/test/cases/compile_errors/align_zero.zig
+++ b/test/cases/compile_errors/align_zero.zig
@@ -65,24 +65,7 @@ export fn k() void {
} });
}
-export fn l() void {
- _ = @Type(.{ .@"struct" = .{
- .layout = .@"packed",
- .fields = &.{.{
- .name = "test",
- .type = u32,
- .default_value_ptr = null,
- .is_comptime = false,
- .alignment = 8,
- }},
- .decls = &.{},
- .is_tuple = false,
- } });
-}
-
// error
-// backend=stage2
-// target=native
//
// :1:27: error: alignment must be >= 1
// :7:34: error: alignment must be >= 1
@@ -93,6 +76,5 @@ export fn l() void {
// :29:17: error: alignment must be >= 1
// :33:35: error: alignment must be >= 1
// :37:34: error: alignment must be >= 1
-// :41:9: error: alignment can only be 0 on packed struct fields
+// :41:9: error: alignment must be >= 1
// :56:9: error: alignment must be >= 1
-// :69:9: error: alignment in a packed struct field must be set to 0