diff options
Diffstat (limited to 'src/InternPool.zig')
| -rw-r--r-- | src/InternPool.zig | 23 |
1 files changed, 2 insertions, 21 deletions
diff --git a/src/InternPool.zig b/src/InternPool.zig index 46676097bf..fa7f1153ec 100644 --- a/src/InternPool.zig +++ b/src/InternPool.zig @@ -383,27 +383,8 @@ pub const RuntimeIndex = enum(u32) { } }; -pub const DeclIndex = enum(u32) { - _, - - pub fn toOptional(i: DeclIndex) OptionalDeclIndex { - return @enumFromInt(@intFromEnum(i)); - } -}; - -pub const OptionalDeclIndex = enum(u32) { - none = std.math.maxInt(u32), - _, - - pub fn init(oi: ?DeclIndex) OptionalDeclIndex { - return @enumFromInt(@intFromEnum(oi orelse return .none)); - } - - pub fn unwrap(oi: OptionalDeclIndex) ?DeclIndex { - if (oi == .none) return null; - return @enumFromInt(@intFromEnum(oi)); - } -}; +pub const DeclIndex = std.zig.DeclIndex; +pub const OptionalDeclIndex = std.zig.OptionalDeclIndex; pub const NamespaceIndex = enum(u32) { _, |
