Skip to content

Commit e919812

Browse files
committed
Update CXXSpan for strict @Lifetime
1 parent c6116be commit e919812

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

stdlib/public/Cxx/CxxSpan.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ internal func unsafeBitCast<T: ~Escapable, U>(
2323
@_unsafeNonescapableResult
2424
@_alwaysEmitIntoClient
2525
@_transparent
26+
@lifetime(copy dependent)
2627
public func _unsafeRemoveLifetime<T: ~Copyable & ~Escapable>(_ dependent: consuming T) -> T {
2728
dependent
2829
}
@@ -91,6 +92,7 @@ extension Span {
9192
@_alwaysEmitIntoClient
9293
@unsafe
9394
@_unsafeNonescapableResult
95+
@lifetime(borrow span)
9496
public init<T: CxxSpan<Element>>(
9597
_unsafeCxxSpan span: borrowing T,
9698
) {

0 commit comments

Comments
 (0)