Skip to content

Commit 48278c1

Browse files
committed
Remove effect annotations from types that don't currently use them
1 parent 1e415f4 commit 48278c1

File tree

2 files changed

+0
-14
lines changed

2 files changed

+0
-14
lines changed

stdlib/public/core/ArraySlice.swift

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -856,7 +856,6 @@ extension ArraySlice: RangeReplaceableCollection {
856856

857857
@inlinable
858858
@_semantics("array.make_mutable")
859-
@_effects(notEscaping self.**)
860859
internal mutating func _makeUniqueAndReserveCapacityIfNotUnique() {
861860
if _slowPath(!_buffer.beginCOWMutation()) {
862861
_copyToNewBuffer(oldCount: _buffer.count)
@@ -865,7 +864,6 @@ extension ArraySlice: RangeReplaceableCollection {
865864

866865
@inlinable
867866
@_semantics("array.mutate_unknown")
868-
@_effects(notEscaping self.**)
869867
internal mutating func _reserveCapacityAssumingUniqueBuffer(oldCount: Int) {
870868
// Due to make_mutable hoisting the situation can arise where we hoist
871869
// _makeMutableAndUnique out of loop and use it to replace
@@ -886,7 +884,6 @@ extension ArraySlice: RangeReplaceableCollection {
886884

887885
@inlinable
888886
@_semantics("array.mutate_unknown")
889-
@_effects(notEscaping self.**)
890887
internal mutating func _appendElementAssumeUniqueAndCapacity(
891888
_ oldCount: Int,
892889
newElement: __owned Element
@@ -921,7 +918,6 @@ extension ArraySlice: RangeReplaceableCollection {
921918
/// same array.
922919
@inlinable
923920
@_semantics("array.append_element")
924-
@_effects(notEscaping self.value**)
925921
public mutating func append(_ newElement: __owned Element) {
926922
_makeUniqueAndReserveCapacityIfNotUnique()
927923
let oldCount = _getCount()
@@ -948,7 +944,6 @@ extension ArraySlice: RangeReplaceableCollection {
948944
/// array.
949945
@_alwaysEmitIntoClient
950946
@_semantics("array.append_contentsOf")
951-
@_effects(notEscaping self.value**)
952947
public mutating func append(contentsOf newElements: __owned some Collection<Element>) {
953948
let newElementsCount = newElements.count
954949
// This check prevents a data race writing to _swiftEmptyArrayStorage
@@ -990,7 +985,6 @@ extension ArraySlice: RangeReplaceableCollection {
990985
/// array.
991986
@inlinable
992987
@_semantics("array.append_contentsOf")
993-
@_effects(notEscaping self.value**)
994988
public mutating func append<S: Sequence>(contentsOf newElements: __owned S)
995989
where S.Element == Element {
996990

@@ -1037,7 +1031,6 @@ extension ArraySlice: RangeReplaceableCollection {
10371031

10381032
@inlinable
10391033
@_semantics("array.reserve_capacity_for_append")
1040-
@_effects(notEscaping self.**)
10411034
internal mutating func reserveCapacityForAppend(newElementsCount: Int) {
10421035
let oldCount = self.count
10431036
let oldCapacity = self.capacity

stdlib/public/core/ContiguousArray.swift

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -740,7 +740,6 @@ extension ContiguousArray: RangeReplaceableCollection {
740740

741741
@inlinable
742742
@_semantics("array.make_mutable")
743-
@_effects(notEscaping self.**)
744743
internal mutating func _makeUniqueAndReserveCapacityIfNotUnique() {
745744
if _slowPath(!_buffer.beginCOWMutation()) {
746745
_createNewBuffer(bufferIsUnique: false,
@@ -751,7 +750,6 @@ extension ContiguousArray: RangeReplaceableCollection {
751750

752751
@inlinable
753752
@_semantics("array.mutate_unknown")
754-
@_effects(notEscaping self.**)
755753
internal mutating func _reserveCapacityAssumingUniqueBuffer(oldCount: Int) {
756754
// Due to make_mutable hoisting the situation can arise where we hoist
757755
// _makeMutableAndUnique out of loop and use it to replace
@@ -774,7 +772,6 @@ extension ContiguousArray: RangeReplaceableCollection {
774772

775773
@inlinable
776774
@_semantics("array.mutate_unknown")
777-
@_effects(notEscaping self.**)
778775
internal mutating func _appendElementAssumeUniqueAndCapacity(
779776
_ oldCount: Int,
780777
newElement: __owned Element
@@ -808,7 +805,6 @@ extension ContiguousArray: RangeReplaceableCollection {
808805
/// - Complexity: O(1) on average, over many calls to `append(_:)` on the
809806
/// same array.
810807
@inlinable
811-
@_effects(notEscaping self.value**)
812808
@_semantics("array.append_element")
813809
public mutating func append(_ newElement: __owned Element) {
814810
// Separating uniqueness check and capacity check allows hoisting the
@@ -837,7 +833,6 @@ extension ContiguousArray: RangeReplaceableCollection {
837833
/// `newElements`, over many calls to `append(contentsOf:)` on the same
838834
/// array.
839835
@_alwaysEmitIntoClient
840-
@_effects(notEscaping self.value**)
841836
@_semantics("array.append_contentsOf")
842837
public mutating func append(
843838
contentsOf newElements: __owned some Collection<Element>
@@ -882,7 +877,6 @@ extension ContiguousArray: RangeReplaceableCollection {
882877
/// `newElements`, over many calls to `append(contentsOf:)` on the same
883878
/// array.
884879
@inlinable
885-
@_effects(notEscaping self.value**)
886880
@_semantics("array.append_contentsOf")
887881
public mutating func append<S: Sequence>(contentsOf newElements: __owned S)
888882
where S.Element == Element {
@@ -945,7 +939,6 @@ extension ContiguousArray: RangeReplaceableCollection {
945939
}
946940

947941
@inlinable
948-
@_effects(notEscaping self.value**)
949942
@_semantics("array.reserve_capacity_for_append")
950943
internal mutating func reserveCapacityForAppend(newElementsCount: Int) {
951944
// Ensure uniqueness, mutability, and sufficient storage. Note that

0 commit comments

Comments
 (0)