Skip to content

Commit 0d92683

Browse files
committed
[stdlib] ObjectIdentifier: Also allow nonescapable types
1 parent a0751a4 commit 0d92683

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

stdlib/public/core/ObjectIdentifier.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public struct ObjectIdentifier: Sendable {
6767
}
6868

6969
@_alwaysEmitIntoClient
70-
public init(_ x: any ~Copyable.Type) {
70+
public init(_ x: any (~Copyable & ~Escapable).Type) {
7171
self._value = unsafeBitCast(x, to: Builtin.RawPointer.self)
7272
}
7373
}
@@ -85,7 +85,7 @@ public struct ObjectIdentifier: Sendable {
8585
}
8686

8787
@inlinable // trivial-implementation
88-
public init<T: ~Copyable>(_ x: T.Type) {
88+
public init<T: ~Copyable & ~Escapable>(_ x: T.Type) {
8989
self._value = unsafe unsafeBitCast(x, to: Builtin.RawPointer.self)
9090
}
9191
}

0 commit comments

Comments
 (0)