From b3ae69d80b5bc04a334882d955d638eac64eef33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rory=20O=E2=80=99Kane?= Date: Sun, 12 Sep 2021 13:08:56 -0400 Subject: [PATCH] langref: define the inferred error set syntax more explicitly MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This edit allows the reader to understand the syntax this section is talking about more quickly – they don’t have to read the whole code block and understand which part of it demonstrates the feature being described. Affects https://ziglang.org/documentation/master/#Inferred-Error-Sets --- doc/langref.html.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/langref.html.in b/doc/langref.html.in index 3f33123372..384ecfffe3 100644 --- a/doc/langref.html.in +++ b/doc/langref.html.in @@ -4955,7 +4955,7 @@ test "merge error sets" { {#header_open|Inferred Error Sets#}

Because many functions in Zig return a possible error, Zig supports inferring the error set. - To infer the error set for a function, use this syntax: + To infer the error set for a function, prepend the {#syntax#}!{#endsyntax#} operator to the function’s return type, like {#syntax#}!T{#endsyntax#}:

{#code_begin|test|inferred_error_sets#} // With an inferred error set