diff options
| author | David Rubin <daviru007@icloud.com> | 2025-02-24 04:02:06 -0800 |
|---|---|---|
| committer | David Rubin <david@vortan.dev> | 2025-08-01 14:57:16 -0700 |
| commit | d6c74a95fdaba4ed373f80baa725dcc53b27e402 (patch) | |
| tree | e6827e6fa40ed25f5c6cee6eab0edace8a62c190 /test/cases/compile_errors/align_zero.zig | |
| parent | 17330867eb8f9e24ec8aadf23592e36f90f9dcb3 (diff) | |
| download | zig-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.zig | 20 |
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 |
