mirror of
https://github.com/ziglang/zig.git
synced 2026-01-21 06:45:24 +00:00
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:
parent
0d96a284e8
commit
5e40560367
@ -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.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user