aboutsummaryrefslogtreecommitdiff
path: root/src/type.zig
diff options
context:
space:
mode:
authorJonathan Marler <johnnymarler@gmail.com>2022-02-01 11:42:41 -0700
committerVeikka Tuominen <git@vexu.eu>2022-03-08 20:38:12 +0200
commitd805adddd6744e0d55263c02d2a03e27ad0c7d68 (patch)
tree430dca3714090db578e6b34ed497ff2b3baee783 /src/type.zig
parent404f5d617982e2323c6ab6b878c29880af3d64c2 (diff)
downloadzig-d805adddd6744e0d55263c02d2a03e27ad0c7d68.tar.gz
zig-d805adddd6744e0d55263c02d2a03e27ad0c7d68.zip
deprecated TypeInfo in favor of Type
Co-authored-by: Veikka Tuominen <git@vexu.eu>
Diffstat (limited to 'src/type.zig')
-rw-r--r--src/type.zig10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/type.zig b/src/type.zig
index a371577c7a..6c284f58d4 100644
--- a/src/type.zig
+++ b/src/type.zig
@@ -1527,7 +1527,7 @@ pub const Type = extern union {
.prefetch_options => return writer.writeAll("std.builtin.PrefetchOptions"),
.export_options => return writer.writeAll("std.builtin.ExportOptions"),
.extern_options => return writer.writeAll("std.builtin.ExternOptions"),
- .type_info => return writer.writeAll("std.builtin.TypeInfo"),
+ .type_info => return writer.writeAll("std.builtin.Type"),
.function => {
const payload = ty.castTag(.function).?.data;
try writer.writeAll("fn(");
@@ -1866,7 +1866,7 @@ pub const Type = extern union {
.prefetch_options => return "PrefetchOptions",
.export_options => return "ExportOptions",
.extern_options => return "ExternOptions",
- .type_info => return "TypeInfo",
+ .type_info => return "Type",
else => {
// TODO this is wasteful and also an incorrect implementation of `@typeName`
@@ -2856,7 +2856,7 @@ pub const Type = extern union {
}
/// Asserts the `Type` is a pointer.
- pub fn ptrSize(self: Type) std.builtin.TypeInfo.Pointer.Size {
+ pub fn ptrSize(self: Type) std.builtin.Type.Pointer.Size {
return switch (self.tag()) {
.const_slice,
.mut_slice,
@@ -3392,7 +3392,7 @@ pub const Type = extern union {
}
}
- pub fn containerLayout(ty: Type) std.builtin.TypeInfo.ContainerLayout {
+ pub fn containerLayout(ty: Type) std.builtin.Type.ContainerLayout {
return switch (ty.tag()) {
.tuple, .empty_struct_literal, .anon_struct => .Auto,
.@"struct" => ty.castTag(.@"struct").?.data.layout,
@@ -5165,7 +5165,7 @@ pub const Type = extern union {
@"allowzero": bool = false,
mutable: bool = true, // TODO rename this to const, not mutable
@"volatile": bool = false,
- size: std.builtin.TypeInfo.Pointer.Size = .One,
+ size: std.builtin.Type.Pointer.Size = .One,
};
};