Commit 27b73cc395

xackus <14938807+xackus@users.noreply.github.com>
2020-11-15 11:53:23
std: make meta.IntType a compile error the function signature changed also update langref
1 parent 39336fd
Changed files (2)
doc/langref.html.in
@@ -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>
lib/std/meta.zig
@@ -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,