migrate langref documentation generation to the build system

This commit is contained in:
Andrew Kelley
2024-04-24 17:41:47 -07:00
parent 9d64332a59
commit 1b90888f57
283 changed files with 7745 additions and 6371 deletions

View File

@@ -0,0 +1,16 @@
const std = @import("std");
const expectEqual = std.testing.expectEqual;
test "aligned struct fields" {
const S = struct {
a: u32 align(2),
b: u32 align(64),
};
var foo = S{ .a = 1, .b = 2 };
try expectEqual(64, @alignOf(S));
try expectEqual(*align(2) u32, @TypeOf(&foo.a));
try expectEqual(*align(64) u32, @TypeOf(&foo.b));
}
// test