@@ -61,8 +61,7 @@ public struct RawSpan: ~Escapable, Copyable, BitwiseCopyable {
61
61
@_disallowFeatureSuppression ( NonescapableTypes)
62
62
@_alwaysEmitIntoClient
63
63
@inline ( __always)
64
- //FIXME: should be @lifetime(borrow pointer) rdar://138672380
65
- @lifetime ( immortal)
64
+ @lifetime ( borrow pointer)
66
65
internal init (
67
66
_unchecked pointer: borrowing UnsafeRawPointer ? ,
68
67
byteCount: Int
@@ -90,8 +89,7 @@ extension RawSpan {
90
89
/// - buffer: an `UnsafeRawBufferPointer` to initialized memory.
91
90
@_disallowFeatureSuppression ( NonescapableTypes)
92
91
@_alwaysEmitIntoClient
93
- //FIXME: should be @lifetime(borrow <argname>) rdar://138672380
94
- @lifetime ( immortal)
92
+ @lifetime ( borrow buffer)
95
93
public init (
96
94
_unsafeBytes buffer: borrowing UnsafeRawBufferPointer
97
95
) {
@@ -110,8 +108,7 @@ extension RawSpan {
110
108
/// - buffer: an `UnsafeRawBufferPointer` to initialized memory.
111
109
@_disallowFeatureSuppression ( NonescapableTypes)
112
110
@_alwaysEmitIntoClient
113
- //FIXME: should be @lifetime(borrow <argname>) rdar://138672380
114
- @lifetime ( immortal)
111
+ @lifetime ( borrow buffer)
115
112
public init (
116
113
_unsafeBytes buffer: borrowing Slice < UnsafeRawBufferPointer >
117
114
) {
@@ -128,8 +125,7 @@ extension RawSpan {
128
125
/// - buffer: an `UnsafeRawBufferPointer` to initialized memory.
129
126
@_disallowFeatureSuppression ( NonescapableTypes)
130
127
@_alwaysEmitIntoClient
131
- //FIXME: should be @lifetime(borrow <argname>) rdar://138672380
132
- @lifetime ( immortal)
128
+ @lifetime ( borrow buffer)
133
129
public init (
134
130
_unsafeBytes buffer: borrowing UnsafeMutableRawBufferPointer
135
131
) {
@@ -138,8 +134,7 @@ extension RawSpan {
138
134
139
135
@_disallowFeatureSuppression ( NonescapableTypes)
140
136
@_alwaysEmitIntoClient
141
- //FIXME: should be @lifetime(borrow <argname>) rdar://138672380
142
- @lifetime ( immortal)
137
+ @lifetime ( borrow buffer)
143
138
public init (
144
139
_unsafeBytes buffer: borrowing Slice < UnsafeMutableRawBufferPointer >
145
140
) {
@@ -158,8 +153,7 @@ extension RawSpan {
158
153
/// - byteCount: the number of initialized bytes in the span.
159
154
@_disallowFeatureSuppression ( NonescapableTypes)
160
155
@_alwaysEmitIntoClient
161
- //FIXME: should be @lifetime(borrow <argname>) rdar://138672380
162
- @lifetime ( immortal)
156
+ @lifetime ( borrow pointer)
163
157
public init (
164
158
_unsafeStart pointer: borrowing UnsafeRawPointer ,
165
159
byteCount: Int
@@ -178,8 +172,7 @@ extension RawSpan {
178
172
/// - buffer: an `UnsafeRawBufferPointer` to initialized memory.
179
173
@_disallowFeatureSuppression ( NonescapableTypes)
180
174
@_alwaysEmitIntoClient
181
- //FIXME: should be @lifetime(borrow <argname>) rdar://138672380
182
- @lifetime ( immortal)
175
+ @lifetime ( borrow buffer)
183
176
public init < T: BitwiseCopyable > (
184
177
_unsafeElements buffer: borrowing UnsafeBufferPointer < T >
185
178
) {
@@ -196,8 +189,7 @@ extension RawSpan {
196
189
/// - buffer: an `UnsafeRawBufferPointer` to initialized memory.
197
190
@_disallowFeatureSuppression ( NonescapableTypes)
198
191
@_alwaysEmitIntoClient
199
- //FIXME: should be @lifetime(borrow <argname>) rdar://138672380
200
- @lifetime ( immortal)
192
+ @lifetime ( borrow buffer)
201
193
public init < T: BitwiseCopyable > (
202
194
_unsafeElements buffer: borrowing Slice < UnsafeBufferPointer < T > >
203
195
) {
@@ -216,8 +208,7 @@ extension RawSpan {
216
208
/// - buffer: an `UnsafeRawBufferPointer` to initialized memory.
217
209
@_disallowFeatureSuppression ( NonescapableTypes)
218
210
@_alwaysEmitIntoClient
219
- //FIXME: should be @lifetime(borrow <argname>) rdar://138672380
220
- @lifetime ( immortal)
211
+ @lifetime ( borrow buffer)
221
212
public init < T: BitwiseCopyable > (
222
213
_unsafeElements buffer: borrowing UnsafeMutableBufferPointer < T >
223
214
) {
@@ -234,8 +225,7 @@ extension RawSpan {
234
225
/// - buffer: an `UnsafeRawBufferPointer` to initialized memory.
235
226
@_disallowFeatureSuppression ( NonescapableTypes)
236
227
@_alwaysEmitIntoClient
237
- //FIXME: should be @lifetime(borrow <argname>) rdar://138672380
238
- @lifetime ( immortal)
228
+ @lifetime ( borrow buffer)
239
229
public init < T: BitwiseCopyable > (
240
230
_unsafeElements buffer: borrowing Slice < UnsafeMutableBufferPointer < T > >
241
231
) {
@@ -256,8 +246,7 @@ extension RawSpan {
256
246
/// - byteCount: the number of initialized bytes in the span.
257
247
@_disallowFeatureSuppression ( NonescapableTypes)
258
248
@_alwaysEmitIntoClient
259
- //FIXME: should be @lifetime(borrow <argname>) rdar://138672380
260
- @lifetime ( immortal)
249
+ @lifetime ( borrow pointer)
261
250
public init < T: BitwiseCopyable > (
262
251
_unsafeStart pointer: borrowing UnsafePointer < T > ,
263
252
count: Int
@@ -275,8 +264,10 @@ extension RawSpan {
275
264
/// `RawSpan`'s lifetime and the memory it represents.
276
265
@_disallowFeatureSuppression ( NonescapableTypes)
277
266
@_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
+ ) {
280
271
self . init (
281
272
_unchecked: span. _pointer,
282
273
byteCount: span. count &* MemoryLayout< Element> . stride
0 commit comments