Skip to content

Commit 3c133d5

Browse files
committed
Revert "[stdlib] unsafeBitCast: generalize for ~Escapable input types"
This reverts commit 0d7cab5.
1 parent 8a7fcc3 commit 3c133d5

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

stdlib/public/core/Builtin.swift

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,11 +91,8 @@ func _canBeClass<T>(_: T.Type) -> Int8 {
9191
/// Returns: A new instance of type `U`, cast from `x`.
9292
@inlinable // unsafe-performance
9393
@_transparent
94-
@_preInverseGenerics
9594
@unsafe
96-
public func unsafeBitCast<T: ~Escapable, U>(
97-
_ x: T, to type: U.Type
98-
) -> U {
95+
public func unsafeBitCast<T, U>(_ x: T, to type: U.Type) -> U {
9996
_precondition(MemoryLayout<T>.size == MemoryLayout<U>.size,
10097
"Can't unsafeBitCast between types of different sizes")
10198
return Builtin.reinterpretCast(x)

0 commit comments

Comments
 (0)