authorgravatar for 14938807+xackus@users.noreply.github.comxackus <14938807+xackus@users.noreply.github.com> 2020-11-15 11:53:23+01:00
committergravatar for git@vexu.euVeikka Tuominen <git@vexu.eu> 2020-11-18 12:57:49+02:00
log27b73cc3958a5960691fd020551012bb6e3108d5
treece2e03a93624ed057b266aa1286915efdd7a0e61
parent39336fd2e9b7e471c3971b10adb91b5fd647c946

std: make meta.IntType a compile error

the function signature changed also update langref

2 files changed, 3 insertions(+), 4 deletions(-)

doc/langref.html.in+2-2
...@@ -7460,7 +7460,7 @@ test "main" {...@@ -7460,7 +7460,7 @@ test "main" {
7460 {#header_close#}7460 {#header_close#}
74617461
7462 {#header_open|@errorToInt#}7462 {#header_open|@errorToInt#}
7463 <pre>{#syntax#}@errorToInt(err: anytype) std.meta.IntType(false, @sizeOf(anyerror) * 8){#endsyntax#}</pre>7463 <pre>{#syntax#}@errorToInt(err: anytype) std.meta.Int(.unsigned, @sizeOf(anyerror) * 8){#endsyntax#}</pre>
7464 <p>7464 <p>
7465 Supports the following types:7465 Supports the following types:
7466 </p>7466 </p>
...@@ -7752,7 +7752,7 @@ test "@hasDecl" {...@@ -7752,7 +7752,7 @@ test "@hasDecl" {
7752 {#header_close#}7752 {#header_close#}
77537753
7754 {#header_open|@intToError#}7754 {#header_open|@intToError#}
7755 <pre>{#syntax#}@intToError(value: std.meta.IntType(false, @sizeOf(anyerror) * 8)) anyerror{#endsyntax#}</pre>7755 <pre>{#syntax#}@intToError(value: std.meta.Int(.unsigned, @sizeOf(anyerror) * 8)) anyerror{#endsyntax#}</pre>
7756 <p>7756 <p>
7757 Converts from the integer representation of an error into {#link|The Global Error Set#} type.7757 Converts from the integer representation of an error into {#link|The Global Error Set#} type.
7758 </p>7758 </p>
lib/std/meta.zig+1-2
...@@ -675,8 +675,7 @@ pub fn declList(comptime Namespace: type, comptime Decl: type) []const *const De...@@ -675,8 +675,7 @@ pub fn declList(comptime Namespace: type, comptime Decl: type) []const *const De
675 }675 }
676}676}
677677
678/// Deprecated: use Int678pub const IntType = @compileError("replaced by std.meta.Int");
679pub const IntType = Int;
680679
681pub const Signedness = enum {680pub const Signedness = enum {
682 unsigned,681 unsigned,