@@ -61,8 +61,7 @@ public struct RawSpan: ~Escapable, Copyable, BitwiseCopyable {
6161 @_disallowFeatureSuppression ( NonescapableTypes)
6262 @_alwaysEmitIntoClient
6363 @inline ( __always)
64- //FIXME: should be @lifetime(borrow pointer) rdar://138672380
65- @lifetime ( immortal)
64+ @lifetime ( borrow pointer)
6665 internal init (
6766 _unchecked pointer: borrowing UnsafeRawPointer ? ,
6867 byteCount: Int
@@ -90,8 +89,7 @@ extension RawSpan {
9089 /// - buffer: an `UnsafeRawBufferPointer` to initialized memory.
9190 @_disallowFeatureSuppression ( NonescapableTypes)
9291 @_alwaysEmitIntoClient
93- //FIXME: should be @lifetime(borrow <argname>) rdar://138672380
94- @lifetime ( immortal)
92+ @lifetime ( borrow buffer)
9593 public init (
9694 _unsafeBytes buffer: borrowing UnsafeRawBufferPointer
9795 ) {
@@ -110,8 +108,7 @@ extension RawSpan {
110108 /// - buffer: an `UnsafeRawBufferPointer` to initialized memory.
111109 @_disallowFeatureSuppression ( NonescapableTypes)
112110 @_alwaysEmitIntoClient
113- //FIXME: should be @lifetime(borrow <argname>) rdar://138672380
114- @lifetime ( immortal)
111+ @lifetime ( borrow buffer)
115112 public init (
116113 _unsafeBytes buffer: borrowing Slice < UnsafeRawBufferPointer >
117114 ) {
@@ -128,8 +125,7 @@ extension RawSpan {
128125 /// - buffer: an `UnsafeRawBufferPointer` to initialized memory.
129126 @_disallowFeatureSuppression ( NonescapableTypes)
130127 @_alwaysEmitIntoClient
131- //FIXME: should be @lifetime(borrow <argname>) rdar://138672380
132- @lifetime ( immortal)
128+ @lifetime ( borrow buffer)
133129 public init (
134130 _unsafeBytes buffer: borrowing UnsafeMutableRawBufferPointer
135131 ) {
@@ -138,8 +134,7 @@ extension RawSpan {
138134
139135 @_disallowFeatureSuppression ( NonescapableTypes)
140136 @_alwaysEmitIntoClient
141- //FIXME: should be @lifetime(borrow <argname>) rdar://138672380
142- @lifetime ( immortal)
137+ @lifetime ( borrow buffer)
143138 public init (
144139 _unsafeBytes buffer: borrowing Slice < UnsafeMutableRawBufferPointer >
145140 ) {
@@ -158,8 +153,7 @@ extension RawSpan {
158153 /// - byteCount: the number of initialized bytes in the span.
159154 @_disallowFeatureSuppression ( NonescapableTypes)
160155 @_alwaysEmitIntoClient
161- //FIXME: should be @lifetime(borrow <argname>) rdar://138672380
162- @lifetime ( immortal)
156+ @lifetime ( borrow pointer)
163157 public init (
164158 _unsafeStart pointer: borrowing UnsafeRawPointer ,
165159 byteCount: Int
@@ -178,8 +172,7 @@ extension RawSpan {
178172 /// - buffer: an `UnsafeRawBufferPointer` to initialized memory.
179173 @_disallowFeatureSuppression ( NonescapableTypes)
180174 @_alwaysEmitIntoClient
181- //FIXME: should be @lifetime(borrow <argname>) rdar://138672380
182- @lifetime ( immortal)
175+ @lifetime ( borrow buffer)
183176 public init < T: BitwiseCopyable > (
184177 _unsafeElements buffer: borrowing UnsafeBufferPointer < T >
185178 ) {
@@ -196,8 +189,7 @@ extension RawSpan {
196189 /// - buffer: an `UnsafeRawBufferPointer` to initialized memory.
197190 @_disallowFeatureSuppression ( NonescapableTypes)
198191 @_alwaysEmitIntoClient
199- //FIXME: should be @lifetime(borrow <argname>) rdar://138672380
200- @lifetime ( immortal)
192+ @lifetime ( borrow buffer)
201193 public init < T: BitwiseCopyable > (
202194 _unsafeElements buffer: borrowing Slice < UnsafeBufferPointer < T > >
203195 ) {
@@ -216,8 +208,7 @@ extension RawSpan {
216208 /// - buffer: an `UnsafeRawBufferPointer` to initialized memory.
217209 @_disallowFeatureSuppression ( NonescapableTypes)
218210 @_alwaysEmitIntoClient
219- //FIXME: should be @lifetime(borrow <argname>) rdar://138672380
220- @lifetime ( immortal)
211+ @lifetime ( borrow buffer)
221212 public init < T: BitwiseCopyable > (
222213 _unsafeElements buffer: borrowing UnsafeMutableBufferPointer < T >
223214 ) {
@@ -234,8 +225,7 @@ extension RawSpan {
234225 /// - buffer: an `UnsafeRawBufferPointer` to initialized memory.
235226 @_disallowFeatureSuppression ( NonescapableTypes)
236227 @_alwaysEmitIntoClient
237- //FIXME: should be @lifetime(borrow <argname>) rdar://138672380
238- @lifetime ( immortal)
228+ @lifetime ( borrow buffer)
239229 public init < T: BitwiseCopyable > (
240230 _unsafeElements buffer: borrowing Slice < UnsafeMutableBufferPointer < T > >
241231 ) {
@@ -256,8 +246,7 @@ extension RawSpan {
256246 /// - byteCount: the number of initialized bytes in the span.
257247 @_disallowFeatureSuppression ( NonescapableTypes)
258248 @_alwaysEmitIntoClient
259- //FIXME: should be @lifetime(borrow <argname>) rdar://138672380
260- @lifetime ( immortal)
249+ @lifetime ( borrow pointer)
261250 public init < T: BitwiseCopyable > (
262251 _unsafeStart pointer: borrowing UnsafePointer < T > ,
263252 count: Int
@@ -275,8 +264,10 @@ extension RawSpan {
275264 /// `RawSpan`'s lifetime and the memory it represents.
276265 @_disallowFeatureSuppression ( NonescapableTypes)
277266 @_alwaysEmitIntoClient
278- @lifetime ( span)
279- public init < Element: BitwiseCopyable > ( _elements span: consuming Span < Element > ) {
267+ @lifetime ( borrow span)
268+ public init < Element: BitwiseCopyable > (
269+ _elements span: borrowing Span < Element >
270+ ) {
280271 self . init (
281272 _unchecked: span. _pointer,
282273 byteCount: span. count &* MemoryLayout< Element> . stride
0 commit comments