mirror of
https://codeberg.org/ziglang/zig.git
synced 2026-03-08 02:24:33 +01:00
std.hash_map: fix error message in getAutoHashFn
This commit is contained in:
parent
6d2945f1fe
commit
13da34955c
1 changed files with 2 additions and 2 deletions
|
|
@ -11,11 +11,11 @@ pub fn getAutoHashFn(comptime K: type, comptime Context: type) (fn (Context, K)
|
|||
comptime {
|
||||
assert(@hasDecl(std, "StringHashMap")); // detect when the following message needs updated
|
||||
if (K == []const u8) {
|
||||
@compileError("std.auto_hash.autoHash does not allow slices here (" ++
|
||||
@compileError("std.hash.autoHash does not allow slices here (" ++
|
||||
@typeName(K) ++
|
||||
") because the intent is unclear. " ++
|
||||
"Consider using std.StringHashMap for hashing the contents of []const u8. " ++
|
||||
"Alternatively, consider using std.auto_hash.hash or providing your own hash function instead.");
|
||||
"Alternatively, consider using std.hash.autoHashStrat or providing your own hash function instead.");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue