std: make meta.IntType a compile error

the function signature changed
also update langref
This commit is contained in:
xackus
2020-11-15 11:53:23 +01:00
committed by Veikka Tuominen
parent 39336fd2e9
commit 27b73cc395
2 changed files with 3 additions and 4 deletions

View File

@@ -7460,7 +7460,7 @@ test "main" {
{#header_close#}
{#header_open|@errorToInt#}
<pre>{#syntax#}@errorToInt(err: anytype) std.meta.IntType(false, @sizeOf(anyerror) * 8){#endsyntax#}</pre>
<pre>{#syntax#}@errorToInt(err: anytype) std.meta.Int(.unsigned, @sizeOf(anyerror) * 8){#endsyntax#}</pre>
<p>
Supports the following types:
</p>
@@ -7752,7 +7752,7 @@ test "@hasDecl" {
{#header_close#}
{#header_open|@intToError#}
<pre>{#syntax#}@intToError(value: std.meta.IntType(false, @sizeOf(anyerror) * 8)) anyerror{#endsyntax#}</pre>
<pre>{#syntax#}@intToError(value: std.meta.Int(.unsigned, @sizeOf(anyerror) * 8)) anyerror{#endsyntax#}</pre>
<p>
Converts from the integer representation of an error into {#link|The Global Error Set#} type.
</p>

View File

@@ -675,8 +675,7 @@ pub fn declList(comptime Namespace: type, comptime Decl: type) []const *const De
}
}
/// Deprecated: use Int
pub const IntType = Int;
pub const IntType = @compileError("replaced by std.meta.Int");
pub const Signedness = enum {
unsigned,