authorgravatar for lord@mzte.deLordMZTE <lord@mzte.de> 2022-08-11 12:16:36+02:00
committergravatar for git@vexu.euVeikka Tuominen <git@vexu.eu> 2022-08-11 21:44:33+03:00
logbbcc26a9b6d8de5971f26cda01350022a1049e08
treef338d51fc5a8f6268b5951620e3770640a2dcbef
parenta82d7c20631b90de2f2298d351353041ac41650d

fix error message when providing slice to `std.hash.autoHash`


1 files changed, 2 insertions(+), 2 deletions(-)

lib/std/hash/auto_hash.zig+2-2
......@@ -193,8 +193,8 @@ fn typeContainsSlice(comptime K: type) bool {
193193pub 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);