Merge pull request #81225 from glessard/override-lifetime-publicly-6.2

[6.2, stdlib] make _overrideLifetime() functions public
This commit is contained in:
Guillaume Lessard
2025-05-08 08:59:21 -07:00
committed by GitHub
10 changed files with 3 additions and 256 deletions

View File

@@ -1,21 +1,3 @@
@_unsafeNonescapableResult
@_alwaysEmitIntoClient
@_transparent
@lifetime(borrow source)
internal func _overrideLifetime<T: ~Copyable & ~Escapable, U: ~Copyable & ~Escapable>(
_ dependent: consuming T, borrowing source: borrowing U) -> T {
dependent
}
@_unsafeNonescapableResult
@_alwaysEmitIntoClient
@_transparent
@lifetime(copy source)
internal func _overrideLifetime<T: ~Copyable & ~Escapable, U: ~Copyable & ~Escapable>(
_ dependent: consuming T, copying source: borrowing U) -> T {
dependent
}
public struct AnotherView : ~Escapable {
@usableFromInline let _ptr: UnsafeRawBufferPointer
@usableFromInline let _count: Int