mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-06 05:44:20 +00:00
langref: update to document --error-limit flag
This commit is contained in:
parent
9d9e22e716
commit
ed82e4f7ac
1 changed files with 3 additions and 2 deletions
|
|
@ -5373,8 +5373,9 @@ test "fn reflection" {
|
|||
gets assigned the same integer value.
|
||||
</p>
|
||||
<p>
|
||||
The number of unique error values across the entire compilation should determine the size of the error set type.
|
||||
However right now it is hard coded to be a {#syntax#}u16{#endsyntax#}. See <a href="https://github.com/ziglang/zig/issues/786">#786</a>.
|
||||
The error set type defaults to a {#syntax#}u16{#endsyntax#}, though if the maximum number of distinct
|
||||
error values is provided via the <kbd>--error-limit [num]</kbd> command line parameter an integer type
|
||||
with the minimum number of bits required to represent all of the error values will be used.
|
||||
</p>
|
||||
<p>
|
||||
You can {#link|coerce|Type Coercion#} an error from a subset to a superset:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue