From e892ee17e680d12292b971b553b36067ed3bbd74 Mon Sep 17 00:00:00 2001 From: Tadeo Kondrak Date: Mon, 28 Sep 2020 07:29:53 -0600 Subject: std: move std.meta.refAllDecls to std.testing --- lib/std/meta.zig | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'lib/std/meta.zig') diff --git a/lib/std/meta.zig b/lib/std/meta.zig index 79b0424e96..ca13ba8a28 100644 --- a/lib/std/meta.zig +++ b/lib/std/meta.zig @@ -655,13 +655,7 @@ pub fn fieldIndex(comptime T: type, comptime name: []const u8) ?comptime_int { return null; } -/// Given a type, reference all the declarations inside, so that the semantic analyzer sees them. -pub fn refAllDecls(comptime T: type) void { - if (!builtin.is_test) return; - inline for (declarations(T)) |decl| { - _ = decl; - } -} +pub const refAllDecls = @compileError("refAllDecls has been moved from std.meta to std.testing"); /// Returns a slice of pointers to public declarations of a namespace. pub fn declList(comptime Namespace: type, comptime Decl: type) []const *const Decl { -- cgit v1.2.3