Skip to content

Clean up Hashable doc changes #58700

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 6, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions stdlib/public/core/Hashable.swift
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ public protocol Hashable: Equatable {
///
/// - Important: `hashValue` is deprecated as a `Hashable` requirement. To
/// conform to `Hashable`, implement the `hash(into:)` requirement instead.
/// (The compiler will provide an implementation for `hashValue` for you.)
/// The compiler provides an implementation for `hashValue` for you.
var hashValue: Int { get }

/// Hashes the essential components of this value by feeding them into the
Expand All @@ -120,9 +120,10 @@ public protocol Hashable: Equatable {
/// in your type's `==` operator implementation. Call `hasher.combine(_:)`
/// with each of these components.
///
/// - Important: `hash(into:)` implementations must never call `finalize()` on
/// the `hasher` instance provided, or replace it with a different
/// instance. Doing so may become compile-time errors in the future.
/// - Important: In your implemention of `hash(into:)`,
/// don't call `finalize()` on the `hasher` instance provided,
/// or replace it with a different instance.
/// Doing so may become a compile-time error in the future.
///
/// - Parameter hasher: The hasher to use when combining the components
/// of this instance.
Expand Down