Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions stdlib/public/core/Span/MutableSpan.swift
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ extension MutableSpan where Element: ~Copyable {

@unsafe
@_alwaysEmitIntoClient
@_transparent
@lifetime(borrow start)
public init(
_unsafeStart start: UnsafeMutablePointer<Element>,
Expand Down Expand Up @@ -295,10 +296,12 @@ extension MutableSpan where Element: ~Copyable {
/// - Complexity: O(1)
@_alwaysEmitIntoClient
public subscript(_ position: Index) -> Element {
@_transparent
unsafeAddress {
_checkIndex(position)
return unsafe UnsafePointer(_unsafeAddressOfElement(unchecked: position))
}
@_transparent
@lifetime(self: copy self)
unsafeMutableAddress {
_checkIndex(position)
Expand All @@ -317,9 +320,11 @@ extension MutableSpan where Element: ~Copyable {
@unsafe
@_alwaysEmitIntoClient
public subscript(unchecked position: Index) -> Element {
@_transparent
unsafeAddress {
unsafe UnsafePointer(_unsafeAddressOfElement(unchecked: position))
}
@_transparent
@lifetime(self: copy self)
unsafeMutableAddress {
unsafe _unsafeAddressOfElement(unchecked: position)
Expand Down