From bbcc26a9b6d8de5971f26cda01350022a1049e08 Mon Sep 17 00:00:00 2001 From: LordMZTE Date: Thu, 11 Aug 2022 12:16:36 +0200 Subject: [PATCH] fix error message when providing slice to `std.hash.autoHash` --- lib/std/hash/auto_hash.zig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/std/hash/auto_hash.zig b/lib/std/hash/auto_hash.zig index c4060e9182..951c0148d9 100644 --- a/lib/std/hash/auto_hash.zig +++ b/lib/std/hash/auto_hash.zig @@ -193,8 +193,8 @@ fn typeContainsSlice(comptime K: type) bool { pub fn autoHash(hasher: anytype, key: anytype) void { const Key = @TypeOf(key); if (comptime typeContainsSlice(Key)) { - @compileError("std.auto_hash.autoHash does not allow slices as well as unions and structs containing slices here (" ++ @typeName(Key) ++ - ") because the intent is unclear. Consider using std.auto_hash.hash or providing your own hash function instead."); + @compileError("std.hash.autoHash does not allow slices as well as unions and structs containing slices here (" ++ @typeName(Key) ++ + ") because the intent is unclear. Consider using std.hash.autoHashStrat or providing your own hash function instead."); } hash(hasher, key, .Shallow);