diff --git a/doc/docgen.zig b/doc/docgen.zig index c3b8d9ebfd3ed06a2c885b21586aa124bfe15664..73289e5edc05ce1e51160a55af636d2126ad6fd9 100644 --- a/doc/docgen.zig +++ b/doc/docgen.zig @@ -528,6 +528,8 @@ fn genToc(allocator: *mem.Allocator, tokenizer: *Tokenizer) !Toc { const end_tag_name = tokenizer.buffer[end_code_tag.start..end_code_tag.end]; if (mem.eql(u8, end_tag_name, "code_release_fast")) { mode = builtin.Mode.ReleaseFast; + } else if (mem.eql(u8, end_tag_name, "code_release_safe")) { + mode = builtin.Mode.ReleaseSafe; } else if (mem.eql(u8, end_tag_name, "code_link_object")) { _ = try eatToken(tokenizer, Token.Id.Separator); const obj_tok = try eatToken(tokenizer, Token.Id.TagContent); diff --git a/doc/langref.html.in b/doc/langref.html.in index 2e51ad5e6c1ccdf9f1735aa14c514cf836a1b046..5599cc215449a9d5ce772bb0a3fbf63a4f21f58a 100644 --- a/doc/langref.html.in +++ b/doc/langref.html.in @@ -7137,7 +7137,7 @@ fn func() void { {#header_close#} {#header_open|@hasDecl#} -
{#syntax#}@hasDecl(comptime container: type, comptime name: []const u8) bool{#endsyntax#}
+
{#syntax#}@hasDecl(comptime Container: type, comptime name: []const u8) bool{#endsyntax#}

Returns whether or not a {#link|struct#}, {#link|enum#}, or {#link|union#} has a declaration matching {#syntax#}name{#endsyntax#}. @@ -7170,7 +7170,7 @@ test "@hasDecl" { {#header_close#} {#header_open|@hasField#} -

{#syntax#}@hasField(comptime T: type, comptime name: []const u8) bool{#endsyntax#}
+
{#syntax#}@hasField(comptime Container: type, comptime name: []const u8) bool{#endsyntax#}

Returns whether the field name of a struct, union, or enum exists.

The result is a compile time constant.