From eeb8629bea90b931a65559886c272fe7aad9211d Mon Sep 17 00:00:00 2001 From: InKryption <59504965+InKryption@users.noreply.github.com> Date: Thu, 28 Oct 2021 17:16:03 +0100 Subject: [PATCH] Use `debug.assert` instead of `testing.expect`. `testing.expect` and friends are intended to be used only in tests; this change reflects that intention. --- lib/std/meta.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/std/meta.zig b/lib/std/meta.zig index 5cdbeb4caa..67f12e12c1 100644 --- a/lib/std/meta.zig +++ b/lib/std/meta.zig @@ -648,7 +648,7 @@ const TagPayloadType = TagPayload; ///Given a tagged union type, and an enum, return the type of the union /// field corresponding to the enum tag. pub fn TagPayload(comptime U: type, tag: Tag(U)) type { - try testing.expect(trait.is(.Union)(U)); + comptime debug.assert(trait.is(.Union)(U)); const info = @typeInfo(U).Union;