Skip to content

Commit 90684a8

Browse files
committed
[stdlib] add missing unsafe annotations
1 parent 5a087d1 commit 90684a8

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

stdlib/public/core/Span/MutableRawSpan.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ extension MutableRawSpan {
125125

126126
@_alwaysEmitIntoClient
127127
public var byteOffsets: Range<Int> {
128-
.init(_uncheckedBounds: (0, byteCount))
128+
unsafe Range(_uncheckedBounds: (0, byteCount))
129129
}
130130
}
131131

stdlib/public/core/Span/MutableSpan.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ extension MutableSpan where Element: ~Copyable & ~Escapable {
224224

225225
@_alwaysEmitIntoClient
226226
public var indices: Range<Index> {
227-
Range(_uncheckedBounds: (0, _count))
227+
unsafe Range(_uncheckedBounds: (0, _count))
228228
}
229229
}
230230

@@ -721,7 +721,7 @@ extension MutableSpan where Element: ~Copyable {
721721
mutating public func _extracting(
722722
unchecked bounds: ClosedRange<Index>
723723
) -> Self {
724-
let range = Range(
724+
let range = unsafe Range(
725725
_uncheckedBounds: (bounds.lowerBound, bounds.upperBound&+1)
726726
)
727727
return unsafe _extracting(unchecked: range)

0 commit comments

Comments
 (0)