Skip to content

Commit 2b916a1

Browse files
committed
[gardening] improves some comments in Span and RawSpan
1 parent dbf388c commit 2b916a1

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

stdlib/public/core/Span/RawSpan.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,6 @@ extension RawSpan {
426426
@available(SwiftStdlib 6.1, *)
427427
extension RawSpan {
428428

429-
//FIXME: mark closure parameter as non-escaping
430429
/// Calls the given closure with a pointer to the underlying bytes of
431430
/// the viewed contiguous storage.
432431
///
@@ -633,7 +632,7 @@ extension RawSpan {
633632
}
634633
}
635634

636-
//MARK: one-sided slicing operations
635+
//MARK: prefixes and suffixes
637636
@_disallowFeatureSuppression(NonescapableTypes)
638637
@available(SwiftStdlib 6.1, *)
639638
extension RawSpan {

stdlib/public/core/Span/Span.swift

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,8 @@ extension Span where Element: ~Copyable {
9595
public init(
9696
_unsafeElements buffer: borrowing UnsafeBufferPointer<Element>
9797
) {
98-
let baseAddress = buffer.baseAddress //FIXME: rdar://138665760
98+
//FIXME: Workaround for https://github.com/swiftlang/swift/issues/77235
99+
let baseAddress = buffer.baseAddress
99100
_precondition(
100101
((Int(bitPattern: baseAddress) &
101102
(MemoryLayout<Element>.alignment &- 1)) == 0),
@@ -204,7 +205,8 @@ extension Span where Element: BitwiseCopyable {
204205
public init(
205206
_unsafeBytes buffer: borrowing UnsafeRawBufferPointer
206207
) {
207-
let baseAddress = buffer.baseAddress //FIXME: rdar://138665760
208+
//FIXME: Workaround for https://github.com/swiftlang/swift/issues/77235
209+
let baseAddress = buffer.baseAddress
208210
_precondition(
209211
((Int(bitPattern: baseAddress) &
210212
(MemoryLayout<Element>.alignment &- 1)) == 0),

0 commit comments

Comments
 (0)