diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2021-05-12 16:41:20 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2021-05-12 16:41:20 -0700 |
| commit | c9cc09a3bfb45d93b84577238047cd69ef0a7d88 (patch) | |
| tree | 1686cda92ae0c5d9ae55c02e7755c55d4e6f3c18 /lib/std/meta.zig | |
| parent | 71afc3088009944fcd8339ac71e69a0b77a781ab (diff) | |
| parent | 40a47eae65b918866abc9d745f89d837f6a1e591 (diff) | |
| download | zig-c9cc09a3bfb45d93b84577238047cd69ef0a7d88.tar.gz zig-c9cc09a3bfb45d93b84577238047cd69ef0a7d88.zip | |
Merge remote-tracking branch 'origin/master' into stage2-whole-file-astgen
Conflicts:
* lib/std/os/linux.zig
* lib/std/os/windows/bits.zig
* src/Module.zig
* src/Sema.zig
* test/stage2/test.zig
Mainly I wanted Jakub's new macOS code for respecting stack size, since
we now depend on it for debug builds able to pass one of the test cases
for recursive comptime function calls with `@setEvalBranchQuota`.
The conflicts were all trivial.
Diffstat (limited to 'lib/std/meta.zig')
| -rw-r--r-- | lib/std/meta.zig | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/lib/std/meta.zig b/lib/std/meta.zig index e35a248a91..18f761d86e 100644 --- a/lib/std/meta.zig +++ b/lib/std/meta.zig @@ -175,13 +175,7 @@ pub fn Elem(comptime T: type) type { }, .Many, .C, .Slice => return info.child, }, - .Optional => |info| switch (@typeInfo(info.child)) { - .Pointer => |ptr_info| switch (ptr_info.size) { - .Many => return ptr_info.child, - else => {}, - }, - else => {}, - }, + .Optional => |info| return Elem(info.child), else => {}, } @compileError("Expected pointer, slice, array or vector type, found '" ++ @typeName(T) ++ "'"); |
