aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2022-01-31 22:09:41 -0700
committerAndrew Kelley <andrew@ziglang.org>2022-01-31 22:09:41 -0700
commitaa326328d0b4a0d4ee8167be9b2ab25fd560b0c9 (patch)
treedfe604416f201b5bff587c1ae8031669c26c3b83 /lib
parent44b105a38d966a43dcd407b971ea39fe26353eab (diff)
downloadzig-aa326328d0b4a0d4ee8167be9b2ab25fd560b0c9.tar.gz
zig-aa326328d0b4a0d4ee8167be9b2ab25fd560b0c9.zip
stage1: remove the `data` field from TypeInfo.Declaration
Partially implements #10706
Diffstat (limited to 'lib')
-rw-r--r--lib/std/builtin.zig24
1 files changed, 2 insertions, 22 deletions
diff --git a/lib/std/builtin.zig b/lib/std/builtin.zig
index 3675a90257..e4ab6d7e8f 100644
--- a/lib/std/builtin.zig
+++ b/lib/std/builtin.zig
@@ -171,6 +171,7 @@ pub const TypeId = std.meta.Tag(TypeInfo);
/// This data structure is used by the Zig language code generation and
/// therefore must be kept in sync with the compiler implementation.
+/// TODO: rename to `Type` because "info" is redundant.
pub const TypeInfo = union(enum) {
Type: void,
Void: void,
@@ -338,6 +339,7 @@ pub const TypeInfo = union(enum) {
/// This data structure is used by the Zig language code generation and
/// therefore must be kept in sync with the compiler implementation.
+ /// TODO rename to Param and put inside `Fn`.
pub const FnArg = struct {
is_generic: bool,
is_noalias: bool,
@@ -385,28 +387,6 @@ pub const TypeInfo = union(enum) {
pub const Declaration = struct {
name: []const u8,
is_pub: bool,
- data: Data,
-
- /// This data structure is used by the Zig language code generation and
- /// therefore must be kept in sync with the compiler implementation.
- pub const Data = union(enum) {
- Type: type,
- Var: type,
- Fn: FnDecl,
-
- /// This data structure is used by the Zig language code generation and
- /// therefore must be kept in sync with the compiler implementation.
- pub const FnDecl = struct {
- fn_type: type,
- is_noinline: bool,
- is_var_args: bool,
- is_extern: bool,
- is_export: bool,
- lib_name: ?[]const u8,
- return_type: type,
- arg_names: []const []const u8,
- };
- };
};
};