Skip to content

Commit bbcc26a

Browse files
LordMZTEVexu
authored andcommitted
fix error message when providing slice to std.hash.autoHash
1 parent a82d7c2 commit bbcc26a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/std/hash/auto_hash.zig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,8 +193,8 @@ fn typeContainsSlice(comptime K: type) bool {
193193
pub fn autoHash(hasher: anytype, key: anytype) void {
194194
const Key = @TypeOf(key);
195195
if (comptime typeContainsSlice(Key)) {
196-
@compileError("std.auto_hash.autoHash does not allow slices as well as unions and structs containing slices here (" ++ @typeName(Key) ++
197-
") because the intent is unclear. Consider using std.auto_hash.hash or providing your own hash function instead.");
196+
@compileError("std.hash.autoHash does not allow slices as well as unions and structs containing slices here (" ++ @typeName(Key) ++
197+
") because the intent is unclear. Consider using std.hash.autoHashStrat or providing your own hash function instead.");
198198
}
199199

200200
hash(hasher, key, .Shallow);

0 commit comments

Comments
 (0)