hashes for refs should be an opt-in feature (#18098)
This commit is contained in:
parent
e2ab08603d
commit
50e98e6efa
4 changed files with 16 additions and 5 deletions
|
|
@ -236,7 +236,7 @@ proc hash*[T](x: ptr[T]): Hash {.inline.} =
|
|||
assert cast[pointer](a[0].addr).hash == a[0].addr.hash
|
||||
hash(cast[pointer](x))
|
||||
|
||||
when not defined(nimLegacyNoHashRef):
|
||||
when defined(nimEnableHashRef):
|
||||
proc hash*[T](x: ref[T]): Hash {.inline.} =
|
||||
## Efficient `hash` overload.
|
||||
runnableExamples:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue