aboutsummaryrefslogtreecommitdiff
path: root/lib/docs
diff options
context:
space:
mode:
authormlugg <mlugg@mlugg.co.uk>2024-08-28 02:35:53 +0100
committermlugg <mlugg@mlugg.co.uk>2024-08-28 08:39:59 +0100
commit0fe3fd01ddc2cd49c6a2b939577d16b9d2c65ea9 (patch)
tree2c07fddf2b6230360fe618c4de192bc2d24eeaf7 /lib/docs
parent1a178d499537b922ff05c5d0186ed5a00dbb1a9b (diff)
downloadzig-0fe3fd01ddc2cd49c6a2b939577d16b9d2c65ea9.tar.gz
zig-0fe3fd01ddc2cd49c6a2b939577d16b9d2c65ea9.zip
std: update `std.builtin.Type` fields to follow naming conventions
The compiler actually doesn't need any functional changes for this: Sema does reification based on the tag indices of `std.builtin.Type` already! So, no zig1.wasm update is necessary. This change is necessary to disallow name clashes between fields and decls on a type, which is a prerequisite of #9938.
Diffstat (limited to 'lib/docs')
-rw-r--r--lib/docs/wasm/Walk.zig2
-rw-r--r--lib/docs/wasm/markdown/Document.zig2
-rw-r--r--lib/docs/wasm/markdown/Parser.zig2
3 files changed, 3 insertions, 3 deletions
diff --git a/lib/docs/wasm/Walk.zig b/lib/docs/wasm/Walk.zig
index ae924b8c38..611830fcb8 100644
--- a/lib/docs/wasm/Walk.zig
+++ b/lib/docs/wasm/Walk.zig
@@ -36,7 +36,7 @@ pub const Category = union(enum(u8)) {
/// A function that returns a type.
type_function: Ast.Node.Index,
- pub const Tag = @typeInfo(Category).Union.tag_type.?;
+ pub const Tag = @typeInfo(Category).@"union".tag_type.?;
};
pub const File = struct {
diff --git a/lib/docs/wasm/markdown/Document.zig b/lib/docs/wasm/markdown/Document.zig
index 8eec97415c..59a40135d6 100644
--- a/lib/docs/wasm/markdown/Document.zig
+++ b/lib/docs/wasm/markdown/Document.zig
@@ -170,7 +170,7 @@ pub fn ExtraData(comptime T: type) type {
}
pub fn extraData(doc: Document, comptime T: type, index: ExtraIndex) ExtraData(T) {
- const fields = @typeInfo(T).Struct.fields;
+ const fields = @typeInfo(T).@"struct".fields;
var i: usize = @intFromEnum(index);
var result: T = undefined;
inline for (fields) |field| {
diff --git a/lib/docs/wasm/markdown/Parser.zig b/lib/docs/wasm/markdown/Parser.zig
index fe4fc2f9b0..024a16a2d7 100644
--- a/lib/docs/wasm/markdown/Parser.zig
+++ b/lib/docs/wasm/markdown/Parser.zig
@@ -1564,7 +1564,7 @@ fn parseInlines(p: *Parser, content: []const u8) !ExtraIndex {
}
pub fn extraData(p: Parser, comptime T: type, index: ExtraIndex) ExtraData(T) {
- const fields = @typeInfo(T).Struct.fields;
+ const fields = @typeInfo(T).@"struct".fields;
var i: usize = @intFromEnum(index);
var result: T = undefined;
inline for (fields) |field| {