From d7d50496d91a8d2e2c1dafa4e92231672b266677 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Wed, 10 Sep 2025 02:08:11 -0700 Subject: [PATCH] langref: don't assume too much about pointer to packed struct field --- doc/langref/test_overaligned_packed_struct.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/langref/test_overaligned_packed_struct.zig b/doc/langref/test_overaligned_packed_struct.zig index b739b0d407..8bf52b3297 100644 --- a/doc/langref/test_overaligned_packed_struct.zig +++ b/doc/langref/test_overaligned_packed_struct.zig @@ -8,7 +8,7 @@ const S = packed struct { test "overaligned pointer to packed struct" { var foo: S align(4) = .{ .a = 1, .b = 2 }; const ptr: *align(4) S = &foo; - const ptr_to_b: *u32 = &ptr.b; + const ptr_to_b = &ptr.b; try expect(ptr_to_b.* == 2); }