File tree Expand file tree Collapse file tree 2 files changed +7
-10
lines changed Expand file tree Collapse file tree 2 files changed +7
-10
lines changed Original file line number Diff line number Diff line change @@ -274,12 +274,9 @@ extension RawSpan {
274
274
/// - span: An existing `Span<T>`, which will define both this
275
275
/// `RawSpan`'s lifetime and the memory it represents.
276
276
@_disallowFeatureSuppression ( NonescapableTypes)
277
- @unsafe // remove when fixing the lifetime annotation
278
277
@_alwaysEmitIntoClient
279
278
@lifetime ( span)
280
- public init < Element: BitwiseCopyable > (
281
- _unsafeSpan span: consuming Span < Element >
282
- ) {
279
+ public init < Element: BitwiseCopyable > ( _elements span: consuming Span < Element > ) {
283
280
self . init (
284
281
_unchecked: span. _pointer,
285
282
byteCount: span. count &* MemoryLayout< Element> . stride
Original file line number Diff line number Diff line change @@ -320,14 +320,14 @@ extension Span where Element: BitwiseCopyable {
320
320
/// Create a `Span` over the bytes represented by a `RawSpan`
321
321
///
322
322
/// - Parameters:
323
- /// - rawSpan : An existing `RawSpan`, which will define both this
324
- /// `Span`'s lifetime and the memory it represents.
323
+ /// - bytes : An existing `RawSpan`, which will define both this
324
+ /// `Span`'s lifetime and the memory it represents.
325
325
@_disallowFeatureSuppression ( NonescapableTypes)
326
326
@_alwaysEmitIntoClient
327
- @lifetime ( rawSpan )
328
- public init ( _bytes rawSpan : consuming RawSpan ) {
327
+ @lifetime ( bytes )
328
+ public init ( _bytes bytes : consuming RawSpan ) {
329
329
self . init (
330
- _unsafeBytes: . init( start: rawSpan . _pointer, count: rawSpan . byteCount)
330
+ _unsafeBytes: . init( start: bytes . _pointer, count: bytes . byteCount)
331
331
)
332
332
}
333
333
}
@@ -712,7 +712,7 @@ extension Span where Element: BitwiseCopyable {
712
712
public func withUnsafeBytes< E: Error , Result: ~ Copyable> (
713
713
_ body: ( _ buffer: UnsafeRawBufferPointer ) throws ( E ) -> Result
714
714
) throws ( E ) -> Result {
715
- try RawSpan( _unsafeSpan : self ) . withUnsafeBytes( body)
715
+ try RawSpan( _elements : self ) . withUnsafeBytes( body)
716
716
}
717
717
}
718
718
You can’t perform that action at this time.
0 commit comments