Skip to content

Commit 59ce19d

Browse files
committed
Remove re-definitions of _overrideLifetime()
- These have now propagated to become public in all the relevant sources of the stdlib.
1 parent 6a7f64f commit 59ce19d

File tree

1 file changed

+0
-50
lines changed

1 file changed

+0
-50
lines changed

Sources/FoundationEssentials/Data/Data.swift

Lines changed: 0 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -2970,53 +2970,3 @@ extension Data : Codable {
29702970
}
29712971
}
29722972
}
2973-
2974-
// TODO: remove once _overrideLifetime is public in the standard library
2975-
/// Unsafely discard any lifetime dependency on the `dependent` argument. Return
2976-
/// a value identical to `dependent` with a lifetime dependency on the caller's
2977-
/// borrow scope of the `source` argument.
2978-
@unsafe
2979-
@_unsafeNonescapableResult
2980-
@_alwaysEmitIntoClient
2981-
@_transparent
2982-
@lifetime(borrow source)
2983-
internal func _overrideLifetime<
2984-
T: ~Copyable & ~Escapable, U: ~Copyable & ~Escapable
2985-
>(
2986-
_ dependent: consuming T, borrowing source: borrowing U
2987-
) -> T {
2988-
dependent
2989-
}
2990-
2991-
/// Unsafely discard any lifetime dependency on the `dependent` argument. Return
2992-
/// a value identical to `dependent` that inherits all lifetime dependencies from
2993-
/// the `source` argument.
2994-
@unsafe
2995-
@_unsafeNonescapableResult
2996-
@_alwaysEmitIntoClient
2997-
@_transparent
2998-
@lifetime(copy source)
2999-
internal func _overrideLifetime<
3000-
T: ~Copyable & ~Escapable, U: ~Copyable & ~Escapable
3001-
>(
3002-
_ dependent: consuming T, copying source: borrowing U
3003-
) -> T {
3004-
dependent
3005-
}
3006-
3007-
/// Unsafely discard any lifetime dependency on the `dependent` argument.
3008-
/// Return a value identical to `dependent` with a lifetime dependency
3009-
/// on the caller's exclusive borrow scope of the `source` argument.
3010-
@unsafe
3011-
@_unsafeNonescapableResult
3012-
@_alwaysEmitIntoClient
3013-
@_transparent
3014-
@lifetime(&source)
3015-
internal func _overrideLifetime<
3016-
T: ~Copyable & ~Escapable, U: ~Copyable & ~Escapable
3017-
>(
3018-
_ dependent: consuming T,
3019-
mutating source: inout U
3020-
) -> T {
3021-
dependent
3022-
}

0 commit comments

Comments
 (0)