From a5691ee363c025775f9f7f3a59cb31503068add2 Mon Sep 17 00:00:00 2001 From: Isaac Freund Date: Thu, 19 Nov 2020 23:32:22 +0100 Subject: [PATCH] std.meta.declarations: support opaque {} --- lib/std/meta.zig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/std/meta.zig b/lib/std/meta.zig index 8919c2679a..23bcf10a59 100644 --- a/lib/std/meta.zig +++ b/lib/std/meta.zig @@ -261,7 +261,8 @@ pub fn declarations(comptime T: type) []const TypeInfo.Declaration { .Struct => |info| info.decls, .Enum => |info| info.decls, .Union => |info| info.decls, - else => @compileError("Expected struct, enum or union type, found '" ++ @typeName(T) ++ "'"), + .Opaque => |info| info.decls, + else => @compileError("Expected struct, enum, union, or opaque type, found '" ++ @typeName(T) ++ "'"), }; }