Skip to content

Commit 1485404

Browse files
committed
[stdlib] Document that hashValue is deprecated
1 parent e0495a7 commit 1485404

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

stdlib/public/core/Hashable.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,9 @@ public protocol Hashable : Equatable {
106106
///
107107
/// Hash values are not guaranteed to be equal across different executions of
108108
/// your program. Do not save hash values to use during a future execution.
109+
///
110+
/// - Important: `hashValue` is deprecated as a Hashable requirement. To
111+
/// conform to `Hashable`, implement the `hash(into:)` requirement instead.
109112
var hashValue: Int { get }
110113

111114
/// Hashes the essential components of this value by feeding them into the

0 commit comments

Comments
 (0)