authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2018-03-25 23:31:12-04:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2018-03-25 23:31:12-04:00
logc0a69a50755b4364e18726b06cbc193d208b131d
tree36f0ca762e1330414967929586e0ad195dd19ade
parentaa2995ee395b2c1329a61513debcac6225fcb8a8
parent3e836f5516c48bcfa16e0b630e53822af80d4b3b
signaturebadge-question-mark Signed by PGP key 4AEE18F83AFDEB23

Merge pull request #860 from jayschwa/patch-1

doc: fix typo and tighten wording in error sections

1 files changed, 7 insertions(+), 8 deletions(-)

doc/langref.html.in+7-8
...@@ -2864,18 +2864,18 @@ const err = (error {FileNotFound}).FileNotFound;...@@ -2864,18 +2864,18 @@ const err = (error {FileNotFound}).FileNotFound;
2864 assert to make sure the error value is in fact in the destination error set.2864 assert to make sure the error value is in fact in the destination error set.
2865 </p>2865 </p>
2866 <p>2866 <p>
2867 The global error set should generally be avoided when possible, because it prevents2867 The global error set should generally be avoided because it prevents the
2868 the compiler from knowing what errors are possible at compile-time. Knowing2868 compiler from knowing what errors are possible at compile-time. Knowing
2869 the error set at compile-time is better for generated documentationt and for2869 the error set at compile-time is better for generated documentation and
2870 helpful error messages such as forgetting a possible error value in a {#link|switch#}.2870 helpful error messages, such as forgetting a possible error value in a {#link|switch#}.
2871 </p>2871 </p>
2872 {#header_close#}2872 {#header_close#}
2873 {#header_close#}2873 {#header_close#}
2874 {#header_open|Error Union Type#}2874 {#header_open|Error Union Type#}
2875 <p>2875 <p>
2876 Most of the time you will not find yourself using an error set type. Instead,2876 An error set type and normal type can be combined with the <code>!<code>
2877 likely you will be using the error union type. This is when you take an error set2877 binary operator to form an error union type. You are likely to use an
2878 and a normal type, and create an error union with the <code>!</code> binary operator.2878 error union type more often than an error set type by itself.
2879 </p>2879 </p>
2880 <p>2880 <p>
2881 Here is a function to parse a string into a 64-bit integer:2881 Here is a function to parse a string into a 64-bit integer:
...@@ -6033,4 +6033,3 @@ hljs.registerLanguage("zig", function(t) {...@@ -6033,4 +6033,3 @@ hljs.registerLanguage("zig", function(t) {
6033 </script>6033 </script>
6034 </body>6034 </body>
6035</html>6035</html>
6036