Skip to content

Commit 0f03880

Browse files
committed
[stdlib] improve more accessor declarations
1 parent 5f362ac commit 0f03880

File tree

5 files changed

+6
-5
lines changed

5 files changed

+6
-5
lines changed

stdlib/public/core/Array.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1744,9 +1744,9 @@ extension Array {
17441744
}
17451745

17461746
@available(SwiftStdlib 6.2, *)
1747+
@_alwaysEmitIntoClient
17471748
public var mutableSpan: MutableSpan<Element> {
17481749
@lifetime(&self)
1749-
@_alwaysEmitIntoClient
17501750
mutating get {
17511751
// _makeMutableAndUnique*() inserts begin_cow_mutation.
17521752
// LifetimeDependence analysis inserts call to end_cow_mutation_addr since we cannot schedule it in the stdlib for mutableSpan property.

stdlib/public/core/ArraySlice.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1301,9 +1301,9 @@ extension ArraySlice {
13011301
}
13021302

13031303
@available(SwiftStdlib 6.2, *)
1304+
@_alwaysEmitIntoClient
13041305
public var mutableSpan: MutableSpan<Element> {
13051306
@lifetime(&self)
1306-
@_alwaysEmitIntoClient
13071307
mutating get {
13081308
// _makeMutableAndUnique*() inserts begin_cow_mutation.
13091309
// LifetimeDependence analysis inserts call to end_cow_mutation_addr since we cannot schedule it in the stdlib for mutableSpan property.

stdlib/public/core/CollectionOfOne.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,9 +173,9 @@ extension CollectionOfOne {
173173
}
174174

175175
@available(SwiftStdlib 6.2, *)
176+
@_alwaysEmitIntoClient
176177
public var mutableSpan: MutableSpan<Element> {
177178
@lifetime(&self)
178-
@_alwaysEmitIntoClient
179179
mutating get {
180180
let pointer = unsafe UnsafeMutablePointer<Element>(
181181
Builtin.addressOfBorrow(self)

stdlib/public/core/ContiguousArray.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1243,9 +1243,9 @@ extension ContiguousArray {
12431243
}
12441244

12451245
@available(SwiftStdlib 6.2, *)
1246+
@_alwaysEmitIntoClient
12461247
public var mutableSpan: MutableSpan<Element> {
12471248
@lifetime(&self)
1248-
@_alwaysEmitIntoClient
12491249
mutating get {
12501250
// _makeMutableAndUnique*() inserts begin_cow_mutation.
12511251
// LifetimeDependence analysis inserts call to end_cow_mutation_addr since we cannot schedule it in the stdlib for mutableSpan property.

stdlib/public/core/InlineArray.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -472,9 +472,10 @@ extension InlineArray where Element: ~Copyable {
472472
}
473473

474474
@available(SwiftStdlib 6.2, *)
475+
@_alwaysEmitIntoClient
475476
public var mutableSpan: MutableSpan<Element> {
476477
@lifetime(&self)
477-
@_alwaysEmitIntoClient
478+
@_transparent
478479
mutating get {
479480
let pointer = unsafe _mutableAddress
480481
let span = unsafe MutableSpan(_unsafeStart: pointer, count: count)

0 commit comments

Comments
 (0)