aboutsummaryrefslogtreecommitdiff
path: root/std
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2019-02-14 15:48:28 -0500
committerAndrew Kelley <andrew@ziglang.org>2019-02-14 15:48:28 -0500
commit6769183a9d5f5ec69747f46d4d13c0f8709b2f46 (patch)
tree273a352de8765f10482336d510a995543ee3d259 /std
parent52c03de5c2495b369ae730ff203e5342e4f33a36 (diff)
downloadzig-6769183a9d5f5ec69747f46d4d13c0f8709b2f46.tar.gz
zig-6769183a9d5f5ec69747f46d4d13c0f8709b2f46.zip
fix implicit cast error unions with non-optional to optional pointer
and update self hosted compiler for C pointers See #1059
Diffstat (limited to 'std')
-rw-r--r--std/hash_map.zig2
1 files changed, 2 insertions, 0 deletions
diff --git a/std/hash_map.zig b/std/hash_map.zig
index 716f04ff34..4519890bb7 100644
--- a/std/hash_map.zig
+++ b/std/hash_map.zig
@@ -496,6 +496,7 @@ pub fn autoHash(key: var, comptime rng: *std.rand.Random, comptime HashInt: type
builtin.TypeId.Pointer => |info| switch (info.size) {
builtin.TypeInfo.Pointer.Size.One => @compileError("TODO auto hash for single item pointers"),
builtin.TypeInfo.Pointer.Size.Many => @compileError("TODO auto hash for many item pointers"),
+ builtin.TypeInfo.Pointer.Size.C => @compileError("TODO auto hash C pointers"),
builtin.TypeInfo.Pointer.Size.Slice => {
const interval = std.math.max(1, key.len / 256);
var i: usize = 0;
@@ -543,6 +544,7 @@ pub fn autoEql(a: var, b: @typeOf(a)) bool {
builtin.TypeId.Pointer => |info| switch (info.size) {
builtin.TypeInfo.Pointer.Size.One => @compileError("TODO auto eql for single item pointers"),
builtin.TypeInfo.Pointer.Size.Many => @compileError("TODO auto eql for many item pointers"),
+ builtin.TypeInfo.Pointer.Size.C => @compileError("TODO auto eql for C pointers"),
builtin.TypeInfo.Pointer.Size.Slice => {
if (a.len != b.len) return false;
for (a) |a_item, i| {