From 7e52a096dbace546cae89ab691741ecca45f28ce Mon Sep 17 00:00:00 2001 From: Meghan Date: Sun, 1 Aug 2021 02:42:48 -0700 Subject: [PATCH] langref- fix packed struct error code --- doc/langref.html.in | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/langref.html.in b/doc/langref.html.in index ce07d6494a..386fe9f41a 100644 --- a/doc/langref.html.in +++ b/doc/langref.html.in @@ -2846,7 +2846,7 @@ test "pointer to non-bit-aligned field" { Zig should correctly understand the alignment of fields. However there is a bug:

- {#code_begin|test_err#} + {#code_begin|test_err|expected type '*u32', found '*align(1) u32'#} const S = packed struct { a: u32, b: u32, @@ -2855,6 +2855,7 @@ test "overaligned pointer to packed struct" { var foo: S align(4) = undefined; const ptr: *align(4) S = &foo; const ptr_to_b: *u32 = &ptr.b; + _ = ptr_to_b; } {#code_end#}

When this bug is fixed, the above test in the documentation will unexpectedly pass, which will