diff --git a/Sources/BasicContainers/RigidDictionary/RigidDictionary+Keys.swift b/Sources/BasicContainers/RigidDictionary/RigidDictionary+Keys.swift index 539ef596..e8a79f66 100644 --- a/Sources/BasicContainers/RigidDictionary/RigidDictionary+Keys.swift +++ b/Sources/BasicContainers/RigidDictionary/RigidDictionary+Keys.swift @@ -22,8 +22,13 @@ extension RigidDictionary where Key: ~Copyable, Value: ~Copyable { } } - // FIXME: Remove - @available(*, deprecated, renamed: "keys") + /// Calls the given closure with a borrowed view of the keys in this + /// dictionary. + /// + /// Until the compiler issue behind + /// https://github.com/apple/swift-collections/issues/841 is fixed, prefer + /// this method over the `keys` property: in some builds, `keys` can return + /// a view into a deallocated temporary. @_alwaysEmitIntoClient public func withKeys( _ body: (borrowing RigidSet) throws(E) -> R diff --git a/Sources/BasicContainers/UniqueDictionary/UniqueDictionary+Keys.swift b/Sources/BasicContainers/UniqueDictionary/UniqueDictionary+Keys.swift index 324f7b33..289337fd 100644 --- a/Sources/BasicContainers/UniqueDictionary/UniqueDictionary+Keys.swift +++ b/Sources/BasicContainers/UniqueDictionary/UniqueDictionary+Keys.swift @@ -22,8 +22,13 @@ extension UniqueDictionary where Key: ~Copyable, Value: ~Copyable { } } - // FIXME: Remove - @available(*, deprecated, renamed: "keys") + /// Calls the given closure with a borrowed view of the keys in this + /// dictionary. + /// + /// Until the compiler issue behind + /// https://github.com/apple/swift-collections/issues/841 is fixed, prefer + /// this method over the `keys` property: in some builds, `keys` can return + /// a view into a deallocated temporary. @_alwaysEmitIntoClient public func withKeys( _ body: (borrowing RigidSet) throws(E) -> R