Skip to content
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
30 changes: 0 additions & 30 deletions stdlib/public/core/AnyHashable.swift
Original file line number Diff line number Diff line change
Expand Up @@ -133,21 +133,6 @@ public struct AnyHashable {

/// Creates a type-erased hashable value that wraps the given instance.
///
/// The following example creates two type-erased hashable values: `x` wraps
/// an `Int` with the value 42, while `y` wraps a `UInt8` with the same
/// numeric value. Because the underlying types of `x` and `y` are
/// different, the two variables do not compare as equal despite having
/// equal underlying values.
///
/// let x = AnyHashable(Int(42))
/// let y = AnyHashable(UInt8(42))
///
/// print(x == y)
/// // Prints "false" because `Int` and `UInt8` are different types
///
/// print(x == AnyHashable(Int(42)))
/// // Prints "true"
///
/// - Parameter base: A hashable value to wrap.
public init<H : Hashable>(_ base: H) {
if let custom =
Expand Down Expand Up @@ -210,21 +195,6 @@ extension AnyHashable : Equatable {
/// underlying types have the same conformance to the `Equatable` protocol
/// and the underlying values compare as equal.
///
/// The following example creates two type-erased hashable values: `x` wraps
/// an `Int` with the value 42, while `y` wraps a `UInt8` with the same
/// numeric value. Because the underlying types of `x` and `y` are
/// different, the two variables do not compare as equal despite having
/// equal underlying values.
///
/// let x = AnyHashable(Int(42))
/// let y = AnyHashable(UInt8(42))
///
/// print(x == y)
/// // Prints "false" because `Int` and `UInt8` are different types
///
/// print(x == AnyHashable(Int(42)))
/// // Prints "true"
///
/// - Parameters:
/// - lhs: A type-erased hashable value.
/// - rhs: Another type-erased hashable value.
Expand Down