diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2024-02-26 20:35:26 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2024-02-26 21:35:30 -0700 |
| commit | f7143e18e368eb89763e9d813b8b7c9c96dd1bd3 (patch) | |
| tree | cf1ee7be89d5f632ef865f2ff3900c48150d08e2 /src/InternPool.zig | |
| parent | 4e2570baafb587c679ee0fc5e113ddeb36522a5d (diff) | |
| download | zig-f7143e18e368eb89763e9d813b8b7c9c96dd1bd3.tar.gz zig-f7143e18e368eb89763e9d813b8b7c9c96dd1bd3.zip | |
move Zcu.LazySrcLoc to std.zig.LazySrcLoc
Part of an effort to ship more of the compiler in source form.
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) { _, |
