Skip to content

Commit 65d4199

Browse files
authored
Merge pull request #23400 from drodriguez/remove-incorrect-docs
[stdlib] Remove documentation piece that it is not longer true.
2 parents cdf9de9 + 59c6699 commit 65d4199

File tree

1 file changed

+0
-30
lines changed

1 file changed

+0
-30
lines changed

stdlib/public/core/AnyHashable.swift

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -133,21 +133,6 @@ public struct AnyHashable {
133133

134134
/// Creates a type-erased hashable value that wraps the given instance.
135135
///
136-
/// The following example creates two type-erased hashable values: `x` wraps
137-
/// an `Int` with the value 42, while `y` wraps a `UInt8` with the same
138-
/// numeric value. Because the underlying types of `x` and `y` are
139-
/// different, the two variables do not compare as equal despite having
140-
/// equal underlying values.
141-
///
142-
/// let x = AnyHashable(Int(42))
143-
/// let y = AnyHashable(UInt8(42))
144-
///
145-
/// print(x == y)
146-
/// // Prints "false" because `Int` and `UInt8` are different types
147-
///
148-
/// print(x == AnyHashable(Int(42)))
149-
/// // Prints "true"
150-
///
151136
/// - Parameter base: A hashable value to wrap.
152137
public init<H : Hashable>(_ base: H) {
153138
if let custom =
@@ -210,21 +195,6 @@ extension AnyHashable : Equatable {
210195
/// underlying types have the same conformance to the `Equatable` protocol
211196
/// and the underlying values compare as equal.
212197
///
213-
/// The following example creates two type-erased hashable values: `x` wraps
214-
/// an `Int` with the value 42, while `y` wraps a `UInt8` with the same
215-
/// numeric value. Because the underlying types of `x` and `y` are
216-
/// different, the two variables do not compare as equal despite having
217-
/// equal underlying values.
218-
///
219-
/// let x = AnyHashable(Int(42))
220-
/// let y = AnyHashable(UInt8(42))
221-
///
222-
/// print(x == y)
223-
/// // Prints "false" because `Int` and `UInt8` are different types
224-
///
225-
/// print(x == AnyHashable(Int(42)))
226-
/// // Prints "true"
227-
///
228198
/// - Parameters:
229199
/// - lhs: A type-erased hashable value.
230200
/// - rhs: Another type-erased hashable value.

0 commit comments

Comments
 (0)