Specify type in autoHash error message

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

Closes #7970.
This commit is contained in:
Joris Hartog 2021-03-21 12:02:33 +01:00 committed by Veikka Tuominen
parent 0d96a284e8
commit 5e40560367

View File

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