authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2021-08-01 02:42:48-07:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2021-08-01 12:42:48+03:00
log7e52a096dbace546cae89ab691741ecca45f28ce
tree62c95704bca0bdf557facc510f28b62b629550c0
parent32069d23301f624a7cdd4f1763c2de24f7a234ab
signaturebadge-question-mark Signed by PGP key 4AEE18F83AFDEB23

langref- fix packed struct error code


1 files changed, 2 insertions(+), 1 deletions(-)

doc/langref.html.in+2-1
......@@ -2846,7 +2846,7 @@ test "pointer to non-bit-aligned field" {
28462846 Zig should correctly understand the alignment of fields. However there is
28472847 <a href="https://github.com/ziglang/zig/issues/1994">a bug</a>:
28482848 </p>
2849 {#code_begin|test_err#}
2849 {#code_begin|test_err|expected type '*u32', found '*align(1) u32'#}
28502850const S = packed struct {
28512851 a: u32,
28522852 b: u32,
......@@ -2855,6 +2855,7 @@ test "overaligned pointer to packed struct" {
28552855 var foo: S align(4) = undefined;
28562856 const ptr: *align(4) S = &foo;
28572857 const ptr_to_b: *u32 = &ptr.b;
2858 _ = ptr_to_b;
28582859}
28592860 {#code_end#}
28602861 <p>When this bug is fixed, the above test in the documentation will unexpectedly pass, which will