diff --git a/lib/std/os/uefi/protocol.zig b/lib/std/os/uefi/protocol.zig index 05ab24baf1..2afe978bb7 100644 --- a/lib/std/os/uefi/protocol.zig +++ b/lib/std/os/uefi/protocol.zig @@ -53,6 +53,5 @@ pub const HiiDatabase = @import("protocol/hii_database.zig").HiiDatabase; pub const HiiPopup = @import("protocol/hii_popup.zig").HiiPopup; test { - @setEvalBranchQuota(2000); - @import("std").testing.refAllDeclsRecursive(@This()); + std.testing.refAllDecls(@This()); } diff --git a/lib/std/os/uefi/tables.zig b/lib/std/os/uefi/tables.zig index d211fcbdaf..1b86446c9d 100644 --- a/lib/std/os/uefi/tables.zig +++ b/lib/std/os/uefi/tables.zig @@ -305,5 +305,5 @@ pub const global_variable = Guid{ }; test { - std.testing.refAllDeclsRecursive(@This()); + std.testing.refAllDecls(@This()); } diff --git a/lib/std/testing.zig b/lib/std/testing.zig index 6d2a045abb..561a6c7f8b 100644 --- a/lib/std/testing.zig +++ b/lib/std/testing.zig @@ -1200,21 +1200,6 @@ pub fn refAllDecls(comptime T: type) void { } } -/// Given a type, recursively references all the declarations inside, so that the semantic analyzer sees them. -/// For deep types, you may use `@setEvalBranchQuota`. -pub fn refAllDeclsRecursive(comptime T: type) void { - if (!builtin.is_test) return; - inline for (comptime std.meta.declarations(T)) |decl| { - if (@TypeOf(@field(T, decl.name)) == type) { - switch (@typeInfo(@field(T, decl.name))) { - .@"struct", .@"enum", .@"union", .@"opaque" => refAllDeclsRecursive(@field(T, decl.name)), - else => {}, - } - } - _ = &@field(T, decl.name); - } -} - pub const FuzzInputOptions = struct { corpus: []const []const u8 = &.{}, };