diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2019-10-16 19:16:39 -0400 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2019-10-16 19:16:57 -0400 |
| commit | f80c01f9d8367ee904d8e01666cd6136dafd6213 (patch) | |
| tree | 716527e403f2464f9feb627f976e604c29ec556d /lib/std/meta.zig | |
| parent | 7598a579ff5f4db43a53c4a466b4b37263726b4b (diff) | |
| download | zig-f80c01f9d8367ee904d8e01666cd6136dafd6213.tar.gz zig-f80c01f9d8367ee904d8e01666cd6136dafd6213.zip | |
ref more math decls for better docs
Diffstat (limited to 'lib/std/meta.zig')
| -rw-r--r-- | lib/std/meta.zig | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/std/meta.zig b/lib/std/meta.zig index 46018e0b1d..b29eb60201 100644 --- a/lib/std/meta.zig +++ b/lib/std/meta.zig @@ -552,3 +552,9 @@ 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; + _ = declarations(T); +} |
