@@ -1161,19 +1161,24 @@ extension ContiguousArray {
11611161 ) throws ( E) -> R {
11621162 return try unsafe _buffer. withUnsafeBufferPointer ( body)
11631163 }
1164+ }
11641165
1165- @available ( SwiftStdlib 6 . 2 , * )
1166+ @available ( SwiftCompatibilitySpan 5 . 0 , * )
1167+ @_originallyDefinedIn ( module: " Swift;CompatibilitySpan " , SwiftCompatibilitySpan 6 . 2 )
1168+ extension ContiguousArray {
1169+ @_alwaysEmitIntoClient
11661170 public var span : Span < Element > {
11671171 @lifetime ( borrow self)
1168- @_alwaysEmitIntoClient
11691172 borrowing get {
11701173 let pointer = unsafe _buffer . firstElementAddress
11711174 let count = _buffer. immutableCount
11721175 let span = unsafe Span( _unsafeStart: pointer, count: count)
11731176 return unsafe _overrideLifetime ( span, borrowing: self )
11741177 }
11751178 }
1179+ }
11761180
1181+ extension ContiguousArray {
11771182 // Superseded by the typed-throws version of this function, but retained
11781183 // for ABI reasons.
11791184 @_semantics ( " array.withUnsafeMutableBufferPointer " )
@@ -1251,8 +1256,11 @@ extension ContiguousArray {
12511256 // Invoke the body.
12521257 return try unsafe body( & inoutBufferPointer)
12531258 }
1259+ }
12541260
1255- @available ( SwiftStdlib 6 . 2 , * )
1261+ @available ( SwiftCompatibilitySpan 5 . 0 , * )
1262+ @_originallyDefinedIn ( module: " Swift;CompatibilitySpan " , SwiftCompatibilitySpan 6 . 2 )
1263+ extension ContiguousArray {
12561264 @_alwaysEmitIntoClient
12571265 public var mutableSpan : MutableSpan < Element > {
12581266 @lifetime ( & self )
@@ -1272,7 +1280,9 @@ extension ContiguousArray {
12721280 return unsafe _override Lifetime ( span, mutating: & self )
12731281 }
12741282 }
1283+ }
12751284
1285+ extension ContiguousArray {
12761286 @inlinable
12771287 public __consuming func _copyContents(
12781288 initializing buffer: UnsafeMutableBufferPointer < Element >
0 commit comments