aboutsummaryrefslogtreecommitdiff
path: root/src/type.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2021-06-13 20:39:40 -0400
committerGitHub <noreply@github.com>2021-06-13 20:39:40 -0400
commit86ebd4b975d2f1e01f468e06daab6e28c06f9719 (patch)
tree250bfe03e0768bdf7619fa8bb588b6815e1d3f0d /src/type.zig
parentdf4f11f42f44b4ee2a06e43095bc160277ceed42 (diff)
parente63ff4f1c110165c4b92025cb5b9d5531e861643 (diff)
downloadzig-86ebd4b975d2f1e01f468e06daab6e28c06f9719.tar.gz
zig-86ebd4b975d2f1e01f468e06daab6e28c06f9719.zip
Merge pull request #9106 from Vexu/fmt
Add formatting check to CI pipeline
Diffstat (limited to 'src/type.zig')
-rw-r--r--src/type.zig6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/type.zig b/src/type.zig
index 3e6c810b20..410773b649 100644
--- a/src/type.zig
+++ b/src/type.zig
@@ -6,6 +6,8 @@ const Target = std.Target;
const Module = @import("Module.zig");
const log = std.log.scoped(.Type);
+const file_struct = @This();
+
/// This is the raw data, with no bookkeeping, no memory awareness, no de-duplication.
/// It's important for this type to be small.
/// Types are not de-duplicated, which helps with multi-threading since it obviates the requirement
@@ -3000,12 +3002,12 @@ pub const Type = extern union {
};
}
- pub fn init(comptime t: Tag) Type {
+ pub fn init(comptime t: Tag) file_struct.Type {
comptime std.debug.assert(@enumToInt(t) < Tag.no_payload_count);
return .{ .tag_if_small_enough = @enumToInt(t) };
}
- pub fn create(comptime t: Tag, ally: *Allocator, data: Data(t)) error{OutOfMemory}!Type {
+ pub fn create(comptime t: Tag, ally: *Allocator, data: Data(t)) error{OutOfMemory}!file_struct.Type {
const ptr = try ally.create(t.Type());
ptr.* = .{
.base = .{ .tag = t },