Commit eeb8629bea

InKryption <59504965+InKryption@users.noreply.github.com>
2021-10-28 18:16:03
Use `debug.assert` instead of `testing.expect`.
`testing.expect` and friends are intended to be used only in tests; this change reflects that intention.
1 parent ee038df
Changed files (1)
lib
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;