Skip to content

Commit

Permalink
[Docs] Clarifies ObjectIdentifier guarantees (swiftlang#31472)
Browse files Browse the repository at this point in the history
[SR-13564](https://bugs.swift.org/browse/SR-13564)
rdar://69169351
  • Loading branch information
sunbohong committed Oct 19, 2020
1 parent 5d30503 commit cd74534
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions stdlib/public/core/ObjectIdentifier.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@
/// In Swift, only class instances and metatypes have unique identities. There
/// is no notion of identity for structs, enums, functions, or tuples.
@frozen // trivial-implementation
///
/// `ObjectIdentifier` is only guaranteed to remain unique for the
/// lifetime of an object. If an object has a stronger notion of identity, it
/// may be appropriate to provide a custom implementation.

public struct ObjectIdentifier {
@usableFromInline // trivial-implementation
internal let _value: Builtin.RawPointer
Expand Down

0 comments on commit cd74534

Please sign in to comment.