@@ -258,6 +258,7 @@ extension MutableSpan where Element: ~Copyable {
258258 _precondition ( indices. contains ( position) , " index out of bounds " )
259259 return unsafe UnsafePointer( _unsafeAddressOfElement ( unchecked: position) )
260260 }
261+ @lifetime ( self : copy self )
261262 unsafeMutableAddress {
262263 _precondition ( indices. contains ( position) , " index out of bounds " )
263264 return unsafe _unsafeAddressOfElement( unchecked: position)
@@ -278,6 +279,7 @@ extension MutableSpan where Element: ~Copyable {
278279 unsafeAddress {
279280 unsafe UnsafePointer( _unsafeAddressOfElement ( unchecked: position) )
280281 }
282+ @lifetime ( self : copy self )
281283 unsafeMutableAddress {
282284 unsafe _unsafeAddressOfElement( unchecked: position)
283285 }
@@ -298,6 +300,7 @@ extension MutableSpan where Element: ~Copyable {
298300extension MutableSpan where Element: ~ Copyable {
299301
300302 @_alwaysEmitIntoClient
303+ @lifetime ( self: copy self)
301304 public mutating func swapAt( _ i: Index , _ j: Index ) {
302305 _precondition ( indices. contains ( Index ( i) ) )
303306 _precondition ( indices. contains ( Index ( j) ) )
@@ -306,6 +309,7 @@ extension MutableSpan where Element: ~Copyable {
306309
307310 @unsafe
308311 @_alwaysEmitIntoClient
312+ @lifetime ( self : copy self )
309313 public mutating func swapAt( unchecked i: Index , unchecked j: Index ) {
310314 let pi = unsafe _unsafeAddressOfElement( unchecked: i)
311315 let pj = unsafe _unsafeAddressOfElement( unchecked: j)
@@ -330,6 +334,7 @@ extension MutableSpan where Element: BitwiseCopyable {
330334 _precondition ( indices. contains ( position) , " index out of bounds " )
331335 return unsafe self[ unchecked: position]
332336 }
337+ @lifetime ( self : copy self )
333338 set {
334339 _precondition ( indices. contains ( position) , " index out of bounds " )
335340 unsafe self[ unchecked: position] = newValue
@@ -353,6 +358,7 @@ extension MutableSpan where Element: BitwiseCopyable {
353358 fromByteOffset: offset, as: Element . self
354359 )
355360 }
361+ @lifetime ( self : copy self )
356362 set {
357363 let offset = position&* MemoryLayout< Element> . stride
358364 unsafe _start( ) . storeBytes (
@@ -375,6 +381,7 @@ extension MutableSpan where Element: ~Copyable {
375381
376382 //FIXME: mark closure parameter as non-escaping
377383 @_alwaysEmitIntoClient
384+ @lifetime ( self : copy self )
378385 public mutating func withUnsafeMutableBufferPointer<
379386 E: Error , Result: ~ Copyable
380387 > (
@@ -405,6 +412,7 @@ extension MutableSpan where Element: BitwiseCopyable {
405412
406413 //FIXME: mark closure parameter as non-escaping
407414 @_alwaysEmitIntoClient
415+ @lifetime( self: copy self)
408416 public mutating func withUnsafeMutableBytes< E: Error, Result: ~ Copyable> (
409417 _ body: ( _ buffer: UnsafeMutableRawBufferPointer ) throws ( E ) -> Result
410418 ) throws ( E ) -> Result {
@@ -421,13 +429,15 @@ extension MutableSpan where Element: BitwiseCopyable {
421429extension MutableSpan {
422430
423431 @_alwaysEmitIntoClient
432+ @lifetime ( self : copy self )
424433 public mutating func update( repeating repeatedValue: consuming Element ) {
425434 unsafe _start( ) . withMemoryRebound ( to: Element . self, capacity: count) {
426435 unsafe $0. update ( repeating: repeatedValue, count: count)
427436 }
428437 }
429438
430439 @_alwaysEmitIntoClient
440+ @lifetime ( self : copy self )
431441 public mutating func update< S: Sequence > (
432442 from source: S
433443 ) -> ( unwritten: S . Iterator , index: Index ) where S. Element == Element {
@@ -437,6 +447,7 @@ extension MutableSpan {
437447 }
438448
439449 @_alwaysEmitIntoClient
450+ @lifetime ( self : copy self )
440451 public mutating func update(
441452 from elements: inout some IteratorProtocol < Element >
442453 ) -> Index {
@@ -450,6 +461,7 @@ extension MutableSpan {
450461 }
451462
452463 @_alwaysEmitIntoClient
464+ @lifetime ( self : copy self )
453465 public mutating func update(
454466 fromContentsOf source: some Collection < Element >
455467 ) -> Index {
@@ -472,6 +484,7 @@ extension MutableSpan {
472484 }
473485
474486 @_alwaysEmitIntoClient
487+ @lifetime ( self : copy self )
475488 public mutating func update( fromContentsOf source: Span < Element > ) -> Index {
476489 guard !source. isEmpty else { return 0 }
477490 _precondition (
@@ -489,6 +502,7 @@ extension MutableSpan {
489502 }
490503
491504 @_alwaysEmitIntoClient
505+ @lifetime ( self : copy self )
492506 public mutating func update(
493507 fromContentsOf source: borrowing MutableSpan < Element >
494508 ) -> Index {
@@ -517,6 +531,7 @@ extension MutableSpan where Element: ~Copyable {
517531// }
518532
519533 @_alwaysEmitIntoClient
534+ @lifetime ( self : copy self )
520535 public mutating func moveUpdate(
521536 fromContentsOf source: UnsafeMutableBufferPointer < Element >
522537 ) -> Index {
@@ -532,6 +547,7 @@ extension MutableSpan where Element: ~Copyable {
532547extension MutableSpan {
533548
534549 @_alwaysEmitIntoClient
550+ @lifetime ( self : copy self )
535551 public mutating func moveUpdate(
536552 fromContentsOf source: Slice < UnsafeMutableBufferPointer < Element > >
537553 ) -> Index {
@@ -543,6 +559,7 @@ extension MutableSpan {
543559extension MutableSpan where Element: BitwiseCopyable {
544560
545561 @_alwaysEmitIntoClient
562+ @lifetime ( self : copy self )
546563 public mutating func update(
547564 repeating repeatedValue: Element
548565 ) where Element: BitwiseCopyable {
@@ -556,6 +573,7 @@ extension MutableSpan where Element: BitwiseCopyable {
556573 }
557574
558575 @_alwaysEmitIntoClient
576+ @lifetime ( self : copy self )
559577 public mutating func update< S: Sequence > (
560578 from source: S
561579 ) -> ( unwritten: S . Iterator , index: Index )
@@ -566,6 +584,7 @@ extension MutableSpan where Element: BitwiseCopyable {
566584 }
567585
568586 @_alwaysEmitIntoClient
587+ @lifetime ( self : copy self )
569588 public mutating func update(
570589 from elements: inout some IteratorProtocol < Element >
571590 ) -> Index {
@@ -579,6 +598,7 @@ extension MutableSpan where Element: BitwiseCopyable {
579598 }
580599
581600 @_alwaysEmitIntoClient
601+ @lifetime ( self : copy self )
582602 public mutating func update(
583603 fromContentsOf source: some Collection < Element >
584604 ) -> Index where Element: BitwiseCopyable {
@@ -601,6 +621,7 @@ extension MutableSpan where Element: BitwiseCopyable {
601621 }
602622
603623 @_alwaysEmitIntoClient
624+ @lifetime ( self : copy self )
604625 public mutating func update(
605626 fromContentsOf source: Span < Element >
606627 ) -> Index where Element: BitwiseCopyable {
@@ -619,6 +640,7 @@ extension MutableSpan where Element: BitwiseCopyable {
619640 }
620641
621642 @_alwaysEmitIntoClient
643+ @lifetime ( self : copy self )
622644 public mutating func update(
623645 fromContentsOf source: borrowing MutableSpan < Element >
624646 ) -> Index where Element: BitwiseCopyable {
0 commit comments