[BasicContainers] Un-deprecate withKeys while keys is miscompiled

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Swastik TripathiandClaude Opus 5.5 committed 2026-11-07 09:12:34 +05:30
1 parent 9e74a3f71f
commit b0d9a5ebbb
2 files changed
+14 -4

No files matched your search

@@ -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<E: Error, R: ~Copyable>(
_ body: (borrowing RigidSet<Key>) throws(E) -> R
@@ -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<E: Error, R: ~Copyable>(
_ body: (borrowing RigidSet<Key>) throws(E) -> R