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" {
74607460 {#header_close#}
74617461
74627462 {#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>
74647464 <p>
74657465 Supports the following types:
74667466 </p>
......@@ -7752,7 +7752,7 @@ test "@hasDecl" {
77527752 {#header_close#}
77537753
77547754 {#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>
77567756 <p>
77577757 Converts from the integer representation of an error into {#link|The Global Error Set#} type.
77587758 </p>
lib/std/meta.zig+1-2
......@@ -675,8 +675,7 @@ pub fn declList(comptime Namespace: type, comptime Decl: type) []const *const De
675675 }
676676}
677677
678/// Deprecated: use Int
679pub const IntType = Int;
678pub const IntType = @compileError("replaced by std.meta.Int");
680679
681680pub const Signedness = enum {
682681 unsigned,