diff --git a/src/platform/common.zig b/src/platform/common.zig index 2dfadedf..62ed49ac 100644 --- a/src/platform/common.zig +++ b/src/platform/common.zig @@ -6,17 +6,8 @@ pub fn checkApplication(comptime app_pkg: type) void { } const App = app_pkg.App; - // If App has no fields, it gets interpretted as '*const App' when it should be '*App' - // This gives a more useful compiler error. - switch (@typeInfo(App)) { - .Struct => |app| { - if (app.fields.len == 0) { - @compileError("App must contain fields. Example: '_unused: i32,'"); - } - }, - else => { - @compileError("App must be a struct type. Found:" ++ @typeName(App)); - }, + if (@typeInfo(App) != .Struct) { + @compileError("App must be a struct type. Found:" ++ @typeName(App)); } if (@hasDecl(App, "init")) { diff --git a/src/platform/libmach.zig b/src/platform/libmach.zig index a128f1ea..478b96c6 100644 --- a/src/platform/libmach.zig +++ b/src/platform/libmach.zig @@ -7,9 +7,6 @@ const native = @import("native.zig"); pub const App = @This(); -// TODO(self-hosted): https://github.com/ziglang/zig/issues/12275 -_unused: i32, - pub const GPUInterface = gpu.dawn.Interface; const _ = gpu.Export(GPUInterface);