aboutsummaryrefslogtreecommitdiff
path: root/lib/std/builtin.zig
diff options
context:
space:
mode:
authorTadeo Kondrak <me@tadeo.ca>2020-04-30 04:30:01 -0600
committerTadeo Kondrak <me@tadeo.ca>2020-05-02 14:39:31 -0600
commit647901b4a82dbb89656c620d4d4a89869fdf1fa0 (patch)
tree19b297cc713d1ea63d64d4d42130f78d375d269f /lib/std/builtin.zig
parentca6db2d008cf3e0e3700e84400bd3d6e259e3c0f (diff)
downloadzig-647901b4a82dbb89656c620d4d4a89869fdf1fa0.tar.gz
zig-647901b4a82dbb89656c620d4d4a89869fdf1fa0.zip
Constify TypeInfo
Diffstat (limited to 'lib/std/builtin.zig')
-rw-r--r--lib/std/builtin.zig18
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/std/builtin.zig b/lib/std/builtin.zig
index 9d419f9af2..9b0293228b 100644
--- a/lib/std/builtin.zig
+++ b/lib/std/builtin.zig
@@ -235,8 +235,8 @@ pub const TypeInfo = union(enum) {
/// therefore must be kept in sync with the compiler implementation.
pub const Struct = struct {
layout: ContainerLayout,
- fields: []StructField,
- decls: []Declaration,
+ fields: []const StructField,
+ decls: []const Declaration,
};
/// This data structure is used by the Zig language code generation and
@@ -261,7 +261,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.
- pub const ErrorSet = ?[]Error;
+ pub const ErrorSet = ?[]const Error;
/// This data structure is used by the Zig language code generation and
/// therefore must be kept in sync with the compiler implementation.
@@ -275,8 +275,8 @@ pub const TypeInfo = union(enum) {
pub const Enum = struct {
layout: ContainerLayout,
tag_type: type,
- fields: []EnumField,
- decls: []Declaration,
+ fields: []const EnumField,
+ decls: []const Declaration,
is_exhaustive: bool,
};
@@ -293,8 +293,8 @@ pub const TypeInfo = union(enum) {
pub const Union = struct {
layout: ContainerLayout,
tag_type: ?type,
- fields: []UnionField,
- decls: []Declaration,
+ fields: []const UnionField,
+ decls: []const Declaration,
};
/// This data structure is used by the Zig language code generation and
@@ -312,7 +312,7 @@ pub const TypeInfo = union(enum) {
is_generic: bool,
is_var_args: bool,
return_type: ?type,
- args: []FnArg,
+ args: []const FnArg,
};
/// This data structure is used by the Zig language code generation and
@@ -358,7 +358,7 @@ pub const TypeInfo = union(enum) {
is_export: bool,
lib_name: ?[]const u8,
return_type: type,
- arg_names: [][]const u8,
+ arg_names: []const []const u8,
/// This data structure is used by the Zig language code generation and
/// therefore must be kept in sync with the compiler implementation.