authorgravatar for joris.hartog@cyso.nlJoris Hartog <joris.hartog@cyso.nl> 2021-03-21 12:02:33+01:00
committergravatar for git@vexu.euVeikka Tuominen <git@vexu.eu> 2021-03-21 23:07:02+02:00
log5e40560367bb2e591c5275d211d661e1aa1eef03
treea8d21acf6c54dd6da67488fdb8887fd096bf1c12
parent0d96a284e80fc3d79af9d56bacb05456b9ed3da4

Specify type in autoHash error message

This commit simply specifies the type which `autoHash` can't hash in the compile error. Closes #7970.

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

lib/std/hash/auto_hash.zig+1-1
...@@ -95,7 +95,7 @@ pub fn hash(hasher: anytype, key: anytype, comptime strat: HashStrategy) void {...@@ -95,7 +95,7 @@ pub fn hash(hasher: anytype, key: anytype, comptime strat: HashStrategy) void {
95 .EnumLiteral,95 .EnumLiteral,
96 .Frame,96 .Frame,
97 .Float,97 .Float,
98 => @compileError("cannot hash this type"),98 => @compileError("unable to hash type " ++ @typeName(Key)),
9999
100 // Help the optimizer see that hashing an int is easy by inlining!100 // Help the optimizer see that hashing an int is easy by inlining!
101 // TODO Check if the situation is better after #561 is resolved.101 // TODO Check if the situation is better after #561 is resolved.