@@ -288,14 +288,14 @@ extension RawSpan {
288
288
289
289
/// Unsafely create a `RawSpan` over initialized memory.
290
290
///
291
- /// The region of memory representing `byteCount` bytes starting at `pointer`
291
+ /// The region of memory representing `count` elements starting at `pointer`
292
292
/// must remain valid, initialized and immutable
293
293
/// throughout the lifetime of the newly-created `RawSpan`.
294
294
/// Failure to maintain this invariant results in undefined behaviour.
295
295
///
296
296
/// - Parameters:
297
297
/// - pointer: a pointer to the first initialized byte.
298
- /// - byteCount : the number of initialized bytes in the span.
298
+ /// - count : the number of initialized elements in the span.
299
299
@unsafe
300
300
@_alwaysEmitIntoClient
301
301
@lifetime ( borrow pointer)
@@ -561,7 +561,7 @@ extension RawSpan {
561
561
@unsafe
562
562
@_alwaysEmitIntoClient
563
563
public func unsafeLoad< T> (
564
- fromByteOffset offset: Int = 0 , as: T . Type
564
+ fromByteOffset offset: Int = 0 , as type : T . Type
565
565
) -> T {
566
566
_precondition (
567
567
UInt ( bitPattern: offset) <= UInt ( bitPattern: _count) &&
@@ -592,7 +592,7 @@ extension RawSpan {
592
592
@unsafe
593
593
@_alwaysEmitIntoClient
594
594
public func unsafeLoad< T> (
595
- fromUncheckedByteOffset offset: Int , as: T . Type
595
+ fromUncheckedByteOffset offset: Int , as type : T . Type
596
596
) -> T {
597
597
unsafe _start( ) . load ( fromByteOffset: offset, as: T . self)
598
598
}
@@ -616,7 +616,7 @@ extension RawSpan {
616
616
@unsafe
617
617
@_alwaysEmitIntoClient
618
618
public func unsafeLoadUnaligned< T: BitwiseCopyable > (
619
- fromByteOffset offset: Int = 0 , as: T . Type
619
+ fromByteOffset offset: Int = 0 , as type : T . Type
620
620
) -> T {
621
621
_precondition (
622
622
UInt ( bitPattern: offset) <= UInt ( bitPattern: _count) &&
@@ -648,7 +648,7 @@ extension RawSpan {
648
648
@unsafe
649
649
@_alwaysEmitIntoClient
650
650
public func unsafeLoadUnaligned< T: BitwiseCopyable > (
651
- fromUncheckedByteOffset offset: Int , as: T . Type
651
+ fromUncheckedByteOffset offset: Int , as type : T . Type
652
652
) -> T {
653
653
unsafe _start( ) . loadUnaligned ( fromByteOffset: offset, as: T . self)
654
654
}
@@ -664,14 +664,14 @@ extension RawSpan {
664
664
unsafe ( self . _pointer == other. _pointer) && ( self . _count == other. _count)
665
665
}
666
666
667
- /// Returns the offsets where the memory of `span ` is located within
667
+ /// Returns the offsets where the memory of `other ` is located within
668
668
/// the memory represented by `self`
669
669
///
670
- /// Note: `span ` must be a subrange of `self`
670
+ /// Note: `other ` must be a subrange of `self`
671
671
///
672
- /// Parameters:
673
- /// - span : a subrange of `self`
674
- /// Returns: A range of offsets within `self`
672
+ /// - Parameters:
673
+ /// - other : a subrange of `self`
674
+ /// - Returns: A range of offsets within `self`
675
675
@_alwaysEmitIntoClient
676
676
public func byteOffsets( of other: borrowing Self ) -> Range < Int > ? {
677
677
if other. _count > _count { return nil }
0 commit comments