We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8e598e4 commit 4f4fcf7Copy full SHA for 4f4fcf7
any-pointer.zig
@@ -104,12 +104,12 @@ const TypeId = enum(usize) {
104
105
fn assertPointer(comptime T: type) void {
106
comptime var ti: std.builtin.Type = @typeInfo(T);
107
- if (ti == .Optional) {
108
- ti = @typeInfo(ti.Optional.child);
+ if (ti == .optional) {
+ ti = @typeInfo(ti.optional.child);
109
}
110
- if (ti != .Pointer)
+ if (ti != .pointer)
111
@compileError("any-pointer only works with (optional) pointers to one or many.");
112
- switch (ti.Pointer.size) {
+ switch (ti.pointer.size) {
113
.One, .Many, .C => {},
114
else => @compileError("any-pointer only works with (optional) pointers to one or many."),
115
0 commit comments